/* ==========================================================================
   1. GLOBAL STYLES & VARIABLES
   ========================================================================== */
:root {
    --primary-blue: #0b5b8c;
    --dark-blue: #074368;
    --light-blue: #0ea5e9;
    --bg-dark-blue: #0c4a6e;
    --text-dark: #333333;
    --text-light: #ffffff;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --card-gray: #a3a3a3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ==========================================================================
   2. HEADER / NAVIGATION
   ========================================================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 20px;
}

.logo img {
    height: 50px;
    display: block;
}

.main-navigation ul {
    display: flex;
    align-items: center;   /* vertically centre text links with the PLAY VIC pill */
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    text-decoration: none; /* Reset link underlines */
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    letter-spacing: 0.5px;
    display: block;
}

.main-navigation a:hover, 
.main-navigation a.active {
    color: var(--primary-blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
    color: var(--primary-blue);
}

/* Ensures the icons scale properly within the header layout */
.header-actions a img {
    height: 24px; 
    width: auto;
    display: block;
    object-fit: contain;
}

/* Optional: If your user profile picture is meant to be a perfect circle */
.header-actions .user-profile img {
    height: 32px;
    width: 32px;
    border-radius: 50%;
}

/* When signed in, show the user's initial in place of the profile icon.
   The login iframe toggles .is-authed on the anchor and fills the initial. */
.header-actions .user-profile {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.header-actions .user-profile .vic-profile-initial {
    display: none;
    height: 32px;
    width: 32px;
    border-radius: 50%;
    background: var(--primary-blue, #2B6CB0);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    line-height: 32px;
    text-align: center;
    text-transform: uppercase;
    user-select: none;
}
.header-actions .user-profile.is-authed img { display: none; }
.header-actions .user-profile.is-authed .vic-profile-initial { display: block; }

/* ── Profile dropdown ─────────────────────────────────────────────────────
   Anchored under the profile button. Hidden until the profile is clicked
   while signed in (JS toggles .open on #vic-user-menu). */
.header-actions .user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.header-actions .user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    max-width: 280px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    padding: 8px;
    z-index: 1000;
}
.header-actions .user-menu.open .user-dropdown { display: block; }

/* Little caret pointing up at the profile icon */
.header-actions .user-dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    transform: rotate(45deg);
}

.header-actions .user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px 12px;
    border-bottom: 1px solid #f1f5f9;
}
.header-actions .user-dropdown-name {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-actions .user-dropdown-email {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions .user-dropdown-signout {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #dc2626;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.header-actions .user-dropdown-signout:hover { background: #fef2f2; }

/* ==========================================================================
   DROPDOWN MENU STYLES
   ========================================================================== */

/* The parent list item acts as the anchor point */
.main-navigation ul li.dropdown {
    position: relative;
}

/* Optional: Styled CSS arrow next to the ABOUT text */
.arrow-down {
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
}

/* Hidden state for the sub-menu */
.main-navigation .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;       /* Snaps it directly under the parent link */
    left: 50%;       /* Centers the menu relative to the link */
    transform: translateX(-50%); 
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 0;
    z-index: 1100;
    flex-direction: column; /* Stacks links vertically */
    gap: 0;                 /* Resets horizontal flex gap */
}

/* Dropdown link styling */
.main-navigation .dropdown-menu a {
    color: #4b5563;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 10px 16px;
    white-space: nowrap; /* Prevents text wrapping */
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Sub-menu item hover state */
.main-navigation .dropdown-menu a:hover {
    background-color: #f9fafb;
    color: var(--primary-blue);
}

/* Hover Engine: Reveal the sub-menu list when hovering over the parent 'li' */
.main-navigation ul li.dropdown:hover .dropdown-menu {
    display: flex;
}

/* ==========================================================================
   2b. PLAY VIC — PRIMARY CTA (blue capsule)
   ==========================================================================
   The strongest action in the header: a filled brand-blue pill that stands
   apart from the plain text nav links. Keyboard focusable with a visible ring,
   and distinct hover / active states. */
.main-navigation ul li.nav-cta {
    display: flex;
    align-items: center;
}

.main-navigation a.nav-cta-play {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #2B6CB0;      /* VIC/ISN brand blue */
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
    padding: 10px 20px;
    border-radius: 999px;           /* full pill / capsule */
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.35);
    white-space: nowrap;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

/* Keep the CTA white on hover (the generic nav rule turns links blue). */
.main-navigation a.nav-cta-play:hover,
.main-navigation a.nav-cta-play:focus,
.main-navigation a.nav-cta-play.active {
    background-color: #1A4973;      /* darker brand blue */
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(26, 73, 115, 0.45);
}

/* Visible keyboard-focus ring (accessible contrast against white header). */
.main-navigation a.nav-cta-play:focus-visible {
    outline: 3px solid #90cdf4;
    outline-offset: 2px;
}

.main-navigation a.nav-cta-play:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(26, 73, 115, 0.4);
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;800&display=swap');

.hero-section {
    /* UPDATED: Path changed to the single combined asset image */
    background: url('../images/client_and_therapist_together_placeholder.png') no-repeat center center;
    background-size: cover;
    height: 480px; 
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-inner-container {
    width: 100%;
    max-width: 100%; /* Allows the banner to hug the right screen edge if needed */
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    margin-top: 60px; 
}

.cta-banner-block {
    display: block;
    
    /* Dual-Axis Gradient matching the Teal -> Dark Blue overlay */
    background: linear-gradient(135deg, rgba(44, 142, 187, 0.85) 0%, rgba(26, 97, 137, 0.85) 100%);
    
    /* UPDATED: Wider width, significantly shorter vertical height */
    width: 680px;            /* Increased width from 580px */
    padding: 20px 35px;      /* Reduced vertical padding to 20px, increased horizontal to 65px */
    
    box-shadow: -5px 10px 30px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    transition: background 0.3s ease;
    margin-right: 0; 
}

.cta-banner-block:hover {
    background: linear-gradient(135deg, rgba(39, 129, 171, 0.95) 0%, rgba(20, 81, 116, 0.95) 100%);
}

/* Typography Styling - Matching the heavy geometric font weights */
.cta-text-wrapper h2 {
    color: #ffffff;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif; /* Cleaned up fallbacks */
    font-size: 2.4rem; 
    font-weight: 600; /* Medium weight - will look noticeably slimmer now */
    line-height: 1.15;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
}

/* Inline Triangle Arrow - Placed exactly after "FOR FREE" before "HERE" breaks */
.arrow-inline {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 22px solid #ffffff; /* Sharp, thick white geometric arrow */
    margin-left: 10px;
    vertical-align: middle;
    position: relative;
    top: -4px; /* Tiny adjustment to align perfectly with text baseline */
}

/* ==========================================================================
   4. PHILOSOPHY / INTRODUCTION
   ========================================================================== */
.philosophy-section {
    padding: 60px 0;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
}

.philosophy-image img {
    width: 100%;
    border-radius: 4px;
    object-fit: cover;
}

.philosophy-quote {
    font-size: 1.8rem;
    font-weight: 700;
    color: #475569;
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
}

.philosophy-text p {
    color: #64748b;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

/* ==========================================================================
   5. FEATURES SECTION
   ========================================================================== */
.features-section {
position: relative;
    width: 100%;
    min-height: 480px; 
    display: flex;
    align-items: center;
    padding: 80px 0;
    box-sizing: border-box;

    /* 1. Explicitly sets your target graphic asset path relative to the css folder */
    background-image: url("../images/blue_client_in_office.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

/* Restricts text to the left half of the layout container */
.features-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.features-section h2 {
    color: #ffffff;
    font-family: 'Archivo', Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 35px;
    letter-spacing: 0.5px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.features-list li {
    color: #ffffff;
    font-family: 'Archivo', Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Styled inline navigation link matching the template alignment */
.read-more {
    display: block;       /* Changed to block to allow full width margin alignments */
    width: max-content;   /* Shrinks the block size tightly around the text length */
    margin: 0 auto;       /* Equals out left and right space to force center placement */
    color: #ffffff;
    font-family: 'Archivo', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.read-more:hover {
    opacity: 0.8;
}

/* ==========================================================================
   6. DASHBOARD ACTION CARDS
   ========================================================================== */
.dashboard-actions {
    padding: 60px 0;
    background-color: #f8fafc;
}

.grid-2-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.action-card {
    background-color: var(--primary-blue);
    color: var(--text-light);
    padding: 40px;
    border-radius: 4px;
    box-shadow: var(--card-shadow);
    min-height: 250px;
    position: relative;
}

.client-card h3 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.avatar-selection-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 80%;
}

.avatar-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background-color: #e2e8f0;
}

/* Right Side Shop Promo Card */
.promo-card {
    background-color: var(--dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.promo-banner-content {
    background: url('promo-asset.jpg') no-repeat center center/cover;
    width: 90%;
    height: 80%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15px;
}

.promo-tag {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000000;
    font-weight: 800;
    padding: 8px 15px;
    font-size: 0.85rem;
    border-radius: 4px;
}

/* ==========================================================================
   7. NEWS / INSIGHTS GRID
   ========================================================================== */
.news-section {
    padding: 60px 0 80px 0;
    background-color: #ffffff;
}

.grid-5-columns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.news-card {
    background-color: var(--card-gray);
    border-radius: 16px; /* Smooth rounded corners matching sketch */
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    color: var(--text-light);
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.card-description {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 20px;
}

.card-image-placeholder {
    background-color: #ffffff;
    color: #666666;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 4px;
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--bg-dark-blue);
    color: var(--text-light);
    padding-top: 40px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 40px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-column a:hover {
    opacity: 1;
}

/* Bottom Copyright Bar */
.footer-bottom {
    background-color: var(--dark-blue);
    padding: 20px 0;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-links a {
    margin: 0 5px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

/* ==========================================================================
   9. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .grid-5-columns {
        grid-template-columns: repeat(3, 1fr); /* Collapses news cards to rows of 3 */
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 15px;
    }

    /* Let the stacked nav wrap and keep the CTA one of the most obvious
       actions in the menu: it goes full width and sits visually apart. */
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px 20px;
    }

    .main-navigation ul li.nav-cta {
        width: 100%;
        justify-content: center;
        order: -1;                 /* float the CTA to the top of the menu */
        margin-bottom: 4px;
    }

    .main-navigation a.nav-cta-play {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .split-layout, 
    .grid-2-columns, 
    .footer-links-grid {
        grid-template-columns: 1fr; /* Forces blocks into structural stacking stacked on mobile */
    }

    .grid-5-columns {
        grid-template-columns: 1fr;
    }

    .hero-section {
        justify-content: center;
    }

    .hero-content {
        width: 90%;
        padding-right: 0;
        text-align: center;
    }

    .footer-bottom-flex {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}