/* BigSpace Investments - Custom Styles */

:root {
    --bs-gold: #B19F4B;
    --bs-navy: #1A1B78;
    --bs-slate: #404F63;
    --bs-gray: #EDEDED;
}

/* Global Overflow Fix */
*, ::before, ::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Heebo', sans-serif;
    letter-spacing: -0.02em;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Base Body Legibility */
body {
    font-size: 16px;
    line-height: 1.6;
}

/* High Contrast Utilities */
.text-label {
    color: rgba(26, 27, 120, 0.6); /* Corporate Navy with 60% opacity for clear legibility */
}

.text-value {
    color: #1A1B78; /* Pure Corporate Navy */
}

/* Responsive Headline Scaling */
@media (max-width: 1023px) {
    h1, .text-7xl, .text-8xl, .text-9xl {
        font-size: clamp(2rem, 10vw, 4rem) !important;
        line-height: 1.1 !important;
        letter-spacing: -0.04em !important;
    }
    .text-4xl, .text-5xl, .text-6xl {
        font-size: clamp(1.75rem, 7vw, 3rem) !important;
        line-height: 1.1 !important;
    }
    .text-2xl, .text-3xl {
        font-size: clamp(1.25rem, 4vw, 1.5rem) !important;
    }
}

/* Mobile spacing adjustments */
@media (max-width: 768px) {
    /* Reduce excessive padding on mobile */
    .py-32 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    .py-40 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    .py-24 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Reduce gap sizes on mobile */
    .gap-20 {
        gap: 2rem !important;
    }
    .gap-24 {
        gap: 2rem !important;
    }

    /* Hero section mobile adjustments */
    .min-h-\[70vh\] {
        min-height: 60vh !important;
    }
    .min-h-\[90vh\] {
        min-height: 70vh !important;
    }
}

/* Mobile Padding Helper */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Reduce text sizes on very small screens */
    .text-lg {
        font-size: 1rem !important;
    }
    .text-xl {
        font-size: 1.125rem !important;
    }
    .text-2xl {
        font-size: 1.25rem !important;
    }
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile Menu Button Visibility */
#mobile-menu-button svg {
    width: 32px;
    height: 32px;
}

/* Mobile Menu Transition Refinement */
#mobile-menu {
    opacity: 0;
    transition: opacity 0.4s ease;
}

#mobile-menu.active {
    opacity: 1 !important;
}

body.overflow-hidden {
    overflow: hidden;
}

.font-gane {
    font-family: 'Inter', sans-serif; /* Placeholder for Aganè */
}

/* Custom Utilities */
.text-balance {
    text-wrap: balance;
}

/* Smooth Transitions */
.transition-all {
    transition-duration: 300ms;
}

/* Hero Section Styles */
.hero-gradient {
    background: linear-gradient(135deg, #1A1B78 0%, #10114a 100%);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(26, 27, 120, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-navy);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gold);
}

/* Button Focus States */
button:focus, a:focus {
    outline: 2px solid var(--bs-gold);
    outline-offset: 4px;
}

/* Mobile Menu Animation */
#mobile-menu {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu nav {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.active nav {
    transform: translateY(0);
}

/* Blog Content Styles */
.blog-content {
    font-family: 'Mukta', sans-serif;
    line-height: 1.9;
    color: var(--bs-slate);
    font-size: 1.125rem;
}

/* Reset any inline styles from scraped content */
.blog-content * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure proper spacing between block elements */
.blog-content > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.blog-content > * + * {
    margin-top: 1.5em !important;
}

/* Override any inline styles that might affect spacing */
.blog-content [style*="margin"],
.blog-content [style*="padding"] {
    margin-top: inherit !important;
    margin-bottom: inherit !important;
}

/* Headings */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    font-family: 'Heebo', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--bs-navy);
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.2;
    clear: both;
}

.blog-content h1 {
    font-size: 2.5rem;
    margin-top: 3em !important;
    margin-bottom: 1.5em !important;
    padding-top: 1em;
}

.blog-content h2 {
    font-size: 2rem;
    margin-top: 3.5em !important;
    margin-bottom: 1.5em !important;
    padding-top: 0.5em;
}

.blog-content h3 {
    font-size: 1.5rem;
    margin-top: 3em !important;
    margin-bottom: 1em !important;
    padding-top: 0.5em;
}

.blog-content h4 {
    font-size: 1.25rem;
    margin-top: 2em !important;
    margin-bottom: 0.75em !important;
}

/* Paragraphs */
.blog-content p {
    margin-top: 0;
    margin-bottom: 2em !important;
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--bs-slate);
}

.blog-content p:last-of-type {
    margin-bottom: 0 !important;
}

/* Extra spacing after headings */
.blog-content h1 + p,
.blog-content h2 + p,
.blog-content h3 + p,
.blog-content h4 + p {
    margin-top: 1em !important;
}

/* Spacing before headings */
.blog-content p + h1,
.blog-content p + h2,
.blog-content p + h3,
.blog-content p + h4 {
    margin-top: 2.5em !important;
}

/* Lists */
.blog-content ul,
.blog-content ol {
    margin-top: 1.5em !important;
    margin-bottom: 2em !important;
    padding-left: 2em;
    line-height: 1.9;
}

.blog-content ul li,
.blog-content ol li {
    margin-bottom: 1em !important;
    margin-top: 0.5em;
    line-height: 1.9;
    color: var(--bs-slate);
}

.blog-content ul {
    list-style-type: disc;
}

.blog-content ol {
    list-style-type: decimal;
}

.blog-content ul ul,
.blog-content ol ol,
.blog-content ul ol,
.blog-content ol ul {
    margin-top: 1em !important;
    margin-bottom: 1em !important;
}

/* Spacing around lists */
.blog-content p + ul,
.blog-content p + ol {
    margin-top: 1.5em !important;
}

.blog-content ul + p,
.blog-content ol + p {
    margin-top: 2em !important;
}

.blog-content h2 + ul,
.blog-content h2 + ol,
.blog-content h3 + ul,
.blog-content h3 + ol {
    margin-top: 1em !important;
}

/* Strong/Bold text */
.blog-content strong,
.blog-content b {
    font-weight: 700;
    color: var(--bs-navy);
}

/* Links */
.blog-content a {
    color: var(--bs-navy);
    text-decoration: underline;
    transition: color 0.2s;
}

.blog-content a:hover {
    color: var(--bs-gold);
}

/* Images */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2em auto;
    display: block;
}

.blog-content figure {
    margin: 2em 0;
}

.blog-content figure img {
    margin: 0;
}

/* Horizontal rules */
.blog-content hr,
.blog-content .wp-block-separator {
    border: none;
    border-top: 2px solid var(--bs-gray);
    margin: 4em 0 !important;
    clear: both;
    display: block;
    width: 100%;
}

.blog-content p + hr,
.blog-content hr + p {
    margin-top: 2em !important;
}

.blog-content h2 + hr,
.blog-content h3 + hr {
    margin-top: 2em !important;
}

/* Blockquotes */
.blog-content blockquote {
    border-left: 4px solid var(--bs-gold);
    padding-left: 1.5em;
    margin: 2em 0;
    font-style: italic;
    color: var(--bs-slate);
    background-color: rgba(177, 159, 75, 0.05);
    padding: 1.5em;
    border-radius: 0.5rem;
}

.blog-content blockquote p {
    margin-bottom: 0.5em;
}

.blog-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code */
.blog-content code {
    background-color: var(--bs-gray);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--bs-navy);
}

.blog-content pre {
    background-color: var(--bs-gray);
    padding: 1.5em;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2em 0;
    line-height: 1.6;
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.9em;
}

/* Divs and containers - ensure proper spacing */
.blog-content div {
    margin-top: 1em;
    margin-bottom: 1.5em;
}

.blog-content div:last-child {
    margin-bottom: 0;
}

/* Break elements - add spacing */
.blog-content br {
    display: block;
    content: "";
    margin-top: 1em;
}

/* Better spacing for nested content */
.blog-content > div > *:first-child {
    margin-top: 0;
}

.blog-content > div > *:last-child {
    margin-bottom: 0;
}

/* WordPress/Divi specific classes */
.blog-content .et_pb_section,
.blog-content .et_pb_row,
.blog-content .et_pb_column {
    margin: 0;
    padding: 0;
}

.blog-content .wp-block-group,
.blog-content .wp-block-columns {
    margin: 2em 0;
}

/* Ensure proper text flow */
.blog-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Remove any unwanted spacing from nested elements */
.blog-content > *:first-child {
    margin-top: 0 !important;
}

.blog-content > *:last-child {
    margin-bottom: 0 !important;
}

/* Force line breaks and spacing */
.blog-content p br {
    display: block;
    margin: 1em 0 !important;
    line-height: 0;
    content: "";
}

/* Ensure br tags create visual spacing */
.blog-content br {
    display: block;
    margin: 1em 0 !important;
    line-height: 0;
}

/* Better spacing for sections separated by br tags */
.blog-content br + p,
.blog-content p + br + p {
    margin-top: 1.5em !important;
}

/* Double br creates visual break */
.blog-content br + br {
    display: block;
    margin: 1.5em 0 !important;
    height: 0;
    line-height: 0;
}

/* Ensure proper spacing between all block elements */
.blog-content p + p {
    margin-top: 2em !important;
}

/* Spacing after headings */
.blog-content h1 + *:not(h1):not(h2):not(h3):not(h4),
.blog-content h2 + *:not(h1):not(h2):not(h3):not(h4),
.blog-content h3 + *:not(h1):not(h2):not(h3):not(h4) {
    margin-top: 1.5em !important;
}

/* Spacing before headings */
.blog-content *:not(h1):not(h2):not(h3):not(h4) + h1,
.blog-content *:not(h1):not(h2):not(h3):not(h4) + h2,
.blog-content *:not(h1):not(h2):not(h3):not(h4) + h3 {
    margin-top: 3em !important;
}

.blog-content h1 + p,
.blog-content h2 + p,
.blog-content h3 + p,
.blog-content h4 + p {
    margin-top: 1.5em !important;
}

.blog-content p + h1,
.blog-content p + h2,
.blog-content p + h3,
.blog-content p + h4 {
    margin-top: 3em !important;
    padding-top: 0.5em;
}

/* Hide any emojis that might slip through */
.blog-content::before,
.blog-content::after,
.blog-content *::before,
.blog-content *::after {
    content: none !important;
}

/* Remove emoji characters using CSS (fallback) */
.blog-content {
    font-variant-emoji: none;
    -webkit-font-feature-settings: "liga" off;
    font-feature-settings: "liga" off;
}

@media (max-width: 768px) {
    .blog-content {
        font-size: 1rem;
    }

    .blog-content h1 {
        font-size: 2rem;
    }

    .blog-content h2 {
        font-size: 1.75rem;
    }

    .blog-content h3 {
        font-size: 1.25rem;
    }

    .blog-content p {
        font-size: 1rem;
    }

    .blog-content ul,
    .blog-content ol {
        padding-left: 1.5em;
    }
}
