/* Brand Variables - Updated Palette */
:root {
    --bg-page: #f4f4f9;
    --bg-dark-section: #32468d;
    --bg-card: #ffc36d;
    --text-main: #32468d;
    --text-on-dark: #f4f4f9;
    --headline-hero: #ffc36d;
    --accent-cta: #ff686d;
    --link-interactive: #52acad;
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
    
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }
.hidden { display: none !important; }
.max-w-lg { max-width: 900px; margin-left: auto; margin-right: auto; }

/* Header & Nav */
.main-header {
    position: fixed;
    top: 0; width: 100%; z-index: 50;
    background: rgba(244, 244, 249, 0.95);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(50, 70, 141, 0.1);
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
}

.logo a, .logo-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
}

.desktop-nav-wrapper, .desktop-nav-group { display: none; align-items: center; gap: 1.5rem; }

.nav-links, .main-nav { display: flex; gap: 1rem; }
.nav-link, .main-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active, .main-nav a:hover, .main-nav a.active { color: var(--link-interactive); }

/* Buttons & Interactive */
.btn-primary, .btn-cta {
    background-color: var(--accent-cta);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover, .btn-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-main);
}

.text-link { color: var(--link-interactive); font-weight: bold; text-decoration: underline; }
.text-link:hover { text-decoration: none; }

/* Home Page Specifics (Hero, Intro) */
.content-push, .page-content { padding-top: 5rem; flex-grow: 1; }

.hero-section {
    position: relative;
    padding: 5rem 0;
    background-color: var(--bg-dark-section);
    color: var(--text-on-dark);
    text-align: center;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    inset: 0; background: rgba(0,0,0,0.4);
}

.hero-content-inner { position: relative; z-index: 10; }

.hero-headline {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--headline-hero);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.intro-section {
    padding: 4rem 0;
    background: #fff;
    border-bottom: 1px solid rgba(50, 70, 141, 0.1);
}

.intro-flex { display: flex; flex-direction: column; gap: 3rem; align-items: center; }

.section-title, .section-heading {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

/* About Page Specifics (Layout & Components) */
.content-limiter { max-width: 900px; margin: 0 auto; }
.page-title { text-align: center; margin-bottom: 3rem; }
.page-title h1 { font-family: var(--font-serif); font-size: 2.5rem; color: var(--text-main); }

.bio-grid { display: flex; flex-direction: column; gap: 2.5rem; margin-bottom: 4rem; }
.profile-image { 
    width: 200px; height: 200px; border-radius: 50%; 
    object-fit: cover; box-shadow: var(--shadow-lg); align-self: center;
}

.accent-title { color: var(--accent-cta); font-family: var(--font-serif); font-size: 1.75rem; margin-bottom: 1rem; }
.sub-headline { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.copy-stack p { margin-bottom: 1.25rem; }

.highlight-box { 
    background: rgba(255, 195, 109, 0.15); 
    padding: 1.5rem; 
    border-left: 5px solid var(--bg-card);
    border-radius: 4px;
}

/* Update this existing class */
.logo-text-split { 
    display: flex; 
    flex-direction: column; 
    gap: 2rem; 
    align-items: center; 
    text-align: center;
    max-width: 900px; /* Added this to keep it consistent with the other sections */
    margin: 0 auto;   /* Centers the section on the page */
}

/* Update this existing class */
.card-section {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 4rem auto; /* Changed '4rem 0' to '4rem auto' to center it */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
width: 100%;
    max-width: 900px; /* Added this to stop it from getting "ugly" and too wide */
}.cartoon-image { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }

.stepper-list { list-style-position: inside; max-width: 600px; margin: 0 auto; }
.stepper-list li { margin-bottom: 1.5rem; }

.icon-list { list-style: none; max-width: 600px; margin: 2rem auto 0; }
.icon-list li { display: flex; gap: 1rem; margin-bottom: 1.25rem; align-items: flex-start; }

.closing-statement { text-align: center; font-style: italic; font-weight: 700; margin-top: 4rem; opacity: 0.9; }

/* Grid & Cards (Shared) */
.grid-three, .grid-two { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 3rem; }

.feature-card, .testimonial-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

/* --- UNIVERSAL FOOTER & LAYOUT FIX --- */

/* 1. Ensure page takes full height so footer stays at bottom */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.page-content {
    flex: 1 0 auto; /* This pushes the footer down */
}

/* 2. Refined Footer Styling */
.main-footer {
    background: var(--bg-dark-section);
    color: var(--text-on-dark);
    padding: 4rem 1.5rem; /* Better horizontal padding for mobile */
    margin-top: auto;
    text-align: center; /* Ensures everything inside is centered */
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem; /* Consistent spacing between CTA, Nav, and Copyright */
}

.footer-cta {
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 1.25rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-nav a {
    color: var(--text-on-dark);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--headline-hero);
    opacity: 1;
}

.copyright {
    opacity: 0.6;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Responsive Queries */
@media (min-width: 768px) {
    .desktop-nav-wrapper, .desktop-nav-group { display: flex; }
    .mobile-toggle { display: none; }
    .hero-headline, .page-title h1 { font-size: 3.5rem; }
    .grid-three { grid-template-columns: repeat(3, 1fr); }
    .grid-two { grid-template-columns: repeat(2, 1fr); }
    .section-title { font-size: 2.5rem; }
    
    .bio-grid { flex-direction: row; align-items: flex-start; }
    .profile-image { align-self: flex-start; flex-shrink: 0; }
    .logo-text-split { flex-direction: row; text-align: left; }
    .card-section { flex-direction: row; text-align: left; }
}

@media (min-width: 1024px) {
    .intro-flex { flex-direction: row; text-align: left; }
    .intro-text { width: 60%; }
    .intro-embed-wrapper { width: 40%; }
}
/* This targets the container div in your HTML */
.icon-circle {
    width: 64px;
    height: 64px;
    background-color: #f8f9fa; /* A light professional gray */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

/* This targets the SVG class "icon-large" from your HTML */
.icon-large {
    width: 32px;
    height: 32px;
    stroke-width: 2;
    color: #2d3748; /* A deep, authoritative slate */

}
/* --- P2P UNIVERSAL GRID FIX --- */
/* This section forces any container with these classes to behave 
   identically: 1 column on mobile, 3 columns on desktop. */

.feature-container, .card-wrapper, .library-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card, .library-card, .p2p-card {
    flex: 1 1 100% !important; /* Forces stacking on mobile */
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .feature-card, .library-card, .p2p-card {
        flex: 0 1 calc(33.333% - 20px) !important; /* Forces 3-across on desktop */
    }
}

/* --- UNIVERSAL CARD BEHAVIOR --- */
/* This ensures cards stack on mobile and 3-across on desktop */

.feature-card {
    flex: 1 1 100%; /* Default: Full width for mobile */
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .feature-card {
        /* Desktop: Calculate 3 across minus the gap */
        flex: 0 1 calc(33.333% - 1.5rem); 
    }
    
    .p2p-grid-container {
        justify-content: flex-start; /* Aligns them neatly to the left */
    }
}
/* --- MOBILE MENU FIX --- */
@media (max-width: 767px) {
    /* Position the menu below the fixed header */
    .desktop-nav-wrapper.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 5rem; /* Matches your header height */
        left: 0;
        width: 100%;
        background: var(--bg-page);
        padding: 2rem;
        border-bottom: 2px solid var(--text-main);
        box-shadow: var(--shadow-lg);
        z-index: 49;
        gap: 1.5rem;
    }

    /* Stack the nav links and the CTA button */
    .main-nav {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .main-nav a {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
    }

    .desktop-nav-wrapper.active .btn-cta {
        width: 100%;
        text-align: center;
    }
}