/* ==========================================================================
   TRANSFORM THERAPY: GLOBAL STYLESHEET
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS VARIABLES 
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Nanum Gothic';
    src: url('assets/fonts/NanumGothic-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nanum Gothic';
    src: url('assets/fonts/NanumGothic-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nanum Gothic';
    src: url('assets/fonts/NanumGothic-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nanum Myeongjo';
    src: url('assets/fonts/NanumMyeongjo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nanum Myeongjo';
    src: url('assets/fonts/NanumMyeongjo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nanum Myeongjo';
    src: url('assets/fonts/NanumMyeongjo-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('assets/fonts/EBGaramond-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('assets/fonts/EBGaramond-VariableFont_wght.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Brand Colors */
    --primary-teal: #3eb0a5;       /* Signature Teal for main elements */
    --dark-teal: #2d8a82;          /* Deeper Teal for hover states & contrast */
    --bg-cream: #f5f3e4bf;         /* Antique Cream for warm section backgrounds */
    --white: #ffffff;
    --link: #fefefd;
    
    /* Typography Colors */
    --text-dark: #1c1c1c;          /* High contrast for headings to ensure readability */
    --text-main: #444444;          /* Soft grey for body text to reduce eye strain */
    --border-color: rgba(255, 255, 255, 0.75);       /* Subtle grey for dividers */
    
    /* Font Families */
    --font-serif: 'Nanum Myeongjo', serif;         /* Elegant, clinical headings */
    --font-sans: 'Nanum Gothic', sans-serif;       /* Clean body text */
    --font-quote: 'EB Garamond', serif;            /* Elegant serif for testimonials */
    
    /* Spacing Scale (Standardized gaps and padding) */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;

    /* Container system */
    --container-max-width: 1920px;
    --container-gutter: clamp(25px, 2vw, 25px);
    --container-main-max-width: 1520px;
    --container-main-gutter: var(--container-gutter);
    --container-header-max-width: 1200px;
    --main-section-edge-padding: clamp(40px, 6vw, 72px);

}

/* --------------------------------------------------------------------------
   BASE RESETS & GLOBAL TYPOGRAPHY
   -------------------------------------------------------------------------- */
* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box; /* Ensures padding doesn't affect overall width */
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 0;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.8; /* Generous line height for readable therapy content */
    color: var(--text-main);
    background-color: var(--white);
    font-weight: 400;
    font-size: 15px;
    overflow-x: hidden; /* Prevents horizontal scrolling bugs on mobile */
    overflow-wrap: break-word; /* Ensures long words or URLs wrap gracefully */
}

h1, h2, h3, h4, blockquote {
    font-family: var(--font-serif);
}

.solid {
    border-top: 2px solid var(--border-color);
    width: 75%;
    position: relative;
    margin: 1.5em auto;
}

/* Global Content Wrapper */
.container,
header .header-content {
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - (var(--container-gutter) * 2));
    width: min(var(--container-max-width), calc(100% - (var(--container-gutter) * 2)));
    margin-inline: auto;
}

/* Slightly wider content area for sections between home and footer */
main .container {
    width: calc(100% - (var(--container-main-gutter) * 2));
    width: min(var(--container-main-max-width), calc(100% - (var(--container-main-gutter) * 2)));
}

header .header-content {
    width: calc(100% - (var(--container-gutter) * 2));
    width: min(var(--container-header-max-width), calc(100% - (var(--container-gutter) * 2)));
}

/* --------------------------------------------------------------------------
   HEADER & DESKTOP NAVIGATION
   -------------------------------------------------------------------------- */
header {
    text-align: center;
    padding: 40px 0 20px;
    background: var(--primary-teal);
    color: var(--white);

    .logo-area {
        padding-bottom: 10px;
    }

    .logo-area a {
        display: inline-block;
    }

    .logo-area img {
        width: clamp(120px, 14vw, 200px);
        height: auto;
        display: block;
        margin: 0 auto;
    }

    h1 { 
        font-size: 1.8rem; 
        margin: 5px 20px; 
        line-height: 39px;
        font-family: "Nanum Myeongjo", serif;
        font-weight: 800;
    }
    
    p { 
        font-size: 0.75rem; 
        letter-spacing: 1px; 
        text-transform: uppercase;
        font-weight: 800;
    }
    
    nav {
        padding: clamp(12px, 1.8vw, 18px) 0;
        
        ul {
            list-style: none;
            display: flex;
            justify-content: center;
            flex-wrap: wrap; /* Allows links to wrap gracefully on smaller screens */
            gap: clamp(12px, 2vw, 25px);
            row-gap: 3px;

            li a {
                text-decoration: none;
                color: var(--white);
                font-size: 0.9rem;
                transition: color 0.3s ease;

                &:hover {
                    color: var(--link);
                }
            }
        }
    }
}

/* --------------------------------------------------------------------------
   MOBILE NAVIGATION & DRAWER LOGIC
   -------------------------------------------------------------------------- */

/* Dark background overlay behind the sliding drawer */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998; /* Sits just below the nav drawer */
    opacity: 0;
    visibility: hidden;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hamburger Menu Button */
.mobile-nav-toggle {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin: 0 auto;
    z-index: 1000; 
}

.mobile-nav-toggle .bar {
    display: block;
    width: 20px;
    height: 3px;
    margin: 3px auto;
    background-color: var(--white);
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}

/* Hide the "Menu" title on Desktop */
@media (min-width: 769px) {
    .mobile-menu-label { display: none; }
}

/* Mobile Layout Overrides (Max-width 768px) */
@media (max-width: 768px) {
    main .container {
        width: 100%;
    }

    .mobile-menu-label {
        display: block;
        color: var(--white);
        text-align: center;
        padding: 12px 0;
        font-size: .9rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .mobile-nav-toggle {
        display: block;
        padding: 25px 15px;
    }

    /* Converts standard nav into a sliding sidebar drawer */
    header nav {
        position: fixed;
        top: 0;
        left: -80%; /* Hidden off-screen to the left initially */
        width: 80%;  
        height: 100vh;
        background-color: var(--primary-teal); 
        z-index: 999;
        -webkit-transition: left 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99);
        transition: left 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99); /* Smooth slide effect */
        padding: 0; 
        margin: 0; 
        display: block;
        overflow-y: auto; /* Allows scrolling if menu is taller than phone screen */
        -webkit-overflow-scrolling: touch;
    }

    header nav.active {
        left: 0; /* Slides into view when active class is added via JS */
    }

    header nav ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start; 
        justify-content: flex-start;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    header nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        display: flex;
        align-items: center;
    }
    
    header nav ul li a {
        color: var(--white) !important;
        padding: 10px 20px; 
        display: block;
        width: 100%;
        font-size: 1rem;
        font-weight: 400;
        text-align: left;
        text-transform: none;
        line-height: 1; 
        text-decoration: none;
        transition: background-color 0.3s ease;
    }
    
    /* Hamburger to 'X' Transformation Animation */
    .mobile-nav-toggle.active .bar:nth-child(1) {
        -webkit-transform: translateY(9px) rotate(45deg);
        transform: translateY(9px) rotate(45deg);
    }
    .mobile-nav-toggle.active .bar:nth-child(2) { opacity: 0; }
    .mobile-nav-toggle.active .bar:nth-child(3) {
        -webkit-transform: translateY(-9px) rotate(-45deg);
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* Prevents background from scrolling when menu is open */
    body.no-scroll {
        overflow: hidden;
    }
}

/* --------------------------------------------------------------------------
   Compatibility Fallbacks (Older Browser Support)
   -------------------------------------------------------------------------- */

/* Flex gap fallback for browsers that do not support gap in flex layouts. */
@supports not (gap: 1rem) {
    header nav ul {
        margin-right: -12px;
    }

    header nav ul li {
        margin-right: 12px;
        margin-bottom: 3px;
    }

    .contact-email-wrapper > * {
        margin-right: 8px;
    }

    .contact-email-wrapper > *:last-child {
        margin-right: 0;
    }
}

/* Grid fallback for browsers that do not support CSS Grid. */
@supports not (display: grid) {
    #about .about-grid,
    .contact-grid,
    .practice-info-grid,
    #logos .logos-grid,
    body.cbt-page .cbt-three-panel-grid,
    body.play-therapy-page .play-therapy-highlights-grid,
    body.training-page .training-overview-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
    }

    #about .about-grid > *,
    .contact-grid > *,
    .practice-info-grid > *,
    body.cbt-page .cbt-three-panel-grid > *,
    body.play-therapy-page .play-therapy-highlights-grid > *,
    body.training-page .training-overview-grid > * {
        flex: 1 1 50%;
        min-width: 0;
    }

    #logos .logos-grid > * {
        flex: 1 1 33.333%;
        min-width: 180px;
    }

    @media (max-width: 990px) {
        .contact-grid > *,
        body.play-therapy-page .play-therapy-highlights-grid > *,
        body.training-page .training-overview-grid > * {
            flex-basis: 100%;
        }
    }

    @media (max-width: 768px) {
        #about .about-grid > *,
        .practice-info-grid > *,
        #logos .logos-grid > *,
        body.cbt-page .cbt-three-panel-grid > * {
            flex-basis: 100%;
        }
    }
}

/* --------------------------------------------------------------------------
   REUSABLE SECTION UTILITIES
   -------------------------------------------------------------------------- */
section {
    h2 {
        color: var(--text-main);
        margin-bottom: 25px;
        font-size: 2rem;
    }

    /* Callout sections */
    &.bg-teal {
        background-color: var(--primary-teal);
        color: var(--white);
        
        h2, h3, p { color: var(--white); }
    }
}

.scroll-fade {
    opacity: 0;
    transform: none;
    transition: opacity 1.6s ease;
    will-change: opacity;
}

.scroll-fade.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-fade,
    .scroll-fade.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --------------------------------------------------------------------------
    MAIN CONTENT (HOMEPAGE) 
    -------------------------------------------------------------------------- */

@keyframes heroBoxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hero Image Banner */
.hero {
    background-image: url('assets/images/hero-bg.jpg');
    background-position: 48% 51%;
    background-attachment: scroll;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 140px 0;
    text-align: center;
    position: relative;

    .hero-box {
        display: inline-block;
        padding: 50px;
        border-radius: 4px;
        position: relative;
        z-index: 2; 
        opacity: 0;
        animation: heroBoxFadeIn 0.9s ease-out 0.45s forwards;
        will-change: opacity;
        
        h2 { font-size: 3rem; margin-bottom: 15px; }
        p { font-size: 1.1rem; margin-bottom: 25px; }
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero .hero-box {
        animation: none;
        opacity: 1;
    }
}

/* Semi-transparent tint overlay for readability over the hero image */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(245, 243, 228, 0.65), rgba(245, 243, 228, 0.65));
    z-index: 1;
    pointer-events: none; /* Prevents overlay from blocking button clicks */
}

/* Introduction Text Block */
#intro {
    background: var(--white);
    color: var(--text-main);
    padding: 80px 0;
}

#intro .intro-content {
    margin: 0 auto;
    padding: 0 var(--main-section-edge-padding);
    font-size: 1.75rem;
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

@media (min-width: 769px) {
    #intro .intro-content {
        max-width: 1080px;
    }
}

/* About Section Split Grid */
#about {
    padding: 0;
}

#about .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xs);
    background: var(--bg-cream);
    align-items: center;
    padding: 0;
}

#about .about-content {
    padding: 90px var(--main-section-edge-padding);

    p {
        line-height: 1.85;
    }
    
    h2 {
        font-size: 2.4rem;
        line-height: 1.15;
        margin-bottom: 28px;
        font-weight: 700;
        font-family: "Nanum Myeongjo", serif;
        color: var(--primary-teal);
    }

    p + p {
        margin-top: var(--spacing-lg);
    }

    a {
        color: var(--primary-teal);
    }
}

/* Decorative image area behind the portrait */
#about .about-media {
    align-self: stretch;
    position: relative;
    margin: 0;
    padding: 0;
    min-height: 360px;
    height: 100%;
    background-color: rgba(221, 215, 172, 0.11);
    background-image: url('assets/images/hero-bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    overflow: hidden;
    border-radius: 6px;
    background-position: 0% 0%;
}

/* Framed Portrait Box */
#about .portrait-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: clamp(220px, 28vw, 340px);
    -webkit-filter: brightness(110%) hue-rotate(0deg) saturate(100%) contrast(100%);
    filter: brightness(110%) hue-rotate(0deg) saturate(100%) contrast(100%);
    
    img {
        display: block;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 990px) {
    :root {
        --container-gutter: 0px;
        --container-main-gutter: 0px;
    }

    header .header-content {
        width: min(var(--container-header-max-width), calc(100% - 40px));
    }

    #about .about-grid {
        gap: 0;
    }

    #about .about-content {
        padding: 60px var(--main-section-edge-padding);
    }

    #about .about-content h2 {
        font-size: 2rem;
    }
}

/* --------------------------------------------------------------------------
    SHARED UI ELEMENTS (BUTTONS, FORMS)
    -------------------------------------------------------------------------- */
.btn {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-teal);
    color: var(--white);
    padding: 16px 35px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;

    &:hover {
        background: var(--dark-teal);
        -webkit-transform: translateY(-2px);
        transform: translateY(-2px); /* Slight lift effect */
    }
}

/* Hero CTA button-specific hover styling */
.hero .btn {
    border: 2px solid transparent;
}

.hero .btn:hover {
    border: 2px solid rgba(221, 215, 172, 0.8);
    background-color: rgb(221, 215, 172);
    -webkit-transform: none;
    transform: none;
}

/* Arrow inside the button */
.btn-arrow {
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}

.btn:hover .btn-arrow {
    -webkit-transform: translateX(3px);
    transform: translateX(3px); /* Arrow nudges right on hover */
}

/* Contact Section */
#contact {
    background-color: var(--primary-teal);
    color: var(--white);
    width: min(var(--container-main-max-width), calc(100% - (var(--container-main-gutter) * 2)));
    margin-left: auto;
    margin-right: auto;
    margin-inline: auto;
    padding: clamp(60px, 8vw, 120px) var(--main-section-edge-padding);
    text-align: left;
}

#contact h2 {
    font-size: 2.8rem;
    color: var(--white);
    text-align: center;
    margin: 0;
}

.contact-divider {
    border: none;
    border-top: 2px solid rgba(245, 243, 228, 0.75);
    width: 70%;
    margin: 0 auto 60px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.contact-content {
    padding: 10px 40px 0 0;
}
.contact-content h2 {
    font-size: 2.8rem;
    margin-bottom: 28px;
}

.contact-content p {
    line-height: 1.85;
}

.contact-content p + p {
    margin-top: var(--spacing-lg);
}

.contact-content a {
    color: var(--white);
    font-weight: bold;
    text-decoration: none;
}

.contact-content a:hover {
    text-decoration: underline;
}

.contact-email-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: var(--spacing-lg) 0;

    a {
        display: flex;
        align-items: center;
        line-height: 1;
    }
}

#contact p svg,
#contact .email-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.contact-form-wrapper {
    padding: 10px 40px 0 0;
}

@media (max-width: 768px) {
    .contact-email-wrapper {
        justify-content: center;
    }
}
/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    #contact {
        padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 40px);
        margin-top: var(--spacing-xl);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .contact-content h2 {
        font-size: 2rem;
    }

    .contact-content p {
        font-size: 0.95rem;
        text-align: left;
    }

    .contact-email-wrapper + p {
        text-align: center;
    }

    .contact-form-wrapper {
        padding: 0;
    }

    .practice-info-panel--text h2 {
        text-align: center;
    }
}

/* Contact Form Styling */
#contact-form,
.tt-global-form {
    width: 100%;
    margin: 0;

    label {
        display: block;
        color: rgb(245, 243, 228);
        font-weight: 700;
        font-size: 0.85rem;
        text-transform: uppercase;
        margin-bottom: 8px;
        letter-spacing: 0.5px;
    }

    input, textarea {
        width: 100%;
        padding: 18px;
        margin-bottom: 20px;
        border: 1px solid var(--white);
        background: rgba(255, 255, 255, 0.9);
        font-family: var(--font-sans);
        -webkit-transition: background-color 0.3s ease, outline 0.3s ease, border-color 0.3s ease;
        transition: background-color 0.3s ease, outline 0.3s ease, border-color 0.3s ease;
        
        &:focus { 
            outline: 2px solid var(--dark-teal); 
            background: var(--white);
        }
        
        &:user-invalid {
            border: 2px solid #ff4444;
        }

        &:not(:placeholder-shown):invalid {
            border: 2px solid #ff4444;
        }

        &:user-invalid:focus {
            outline: none;
            border: 2px solid #ff4444;
        }

        &:focus:invalid {
            outline: none;
            border: 2px solid #ff4444;
        }
        
        &::placeholder {
            color: rgba(0, 0, 0, 0.4);
        }
    }

    button {
        background: rgb(245, 243, 228);
        color: var(--primary-teal);
        font-family: var(--font-sans);
        border: 2px solid rgb(245, 243, 228);
        padding: 18px 80px;
        font-weight: 700;
        font-size: 1.1rem;
        cursor: pointer;

        &:hover {
            background: rgb(221, 215, 172);
            color: var(--dark-teal);
        }
    }
}

.tt-global-form .form-status {
    margin-top: 10px;
    min-height: 1.2em;
    color: rgb(245, 243, 228);
    font-size: 0.9rem;
}

/* Tablet-and-down form field sizing */
@media (max-width: 990px) {

    #contact-form button,
    .tt-global-form button {
        width: 100%;
    }

    .contact-form-wrapper {
        padding-right: 0;
    }
}

/* Mobile responsive form adjustments */
@media (max-width: 768px) {
    #contact h2 {
        font-size: 2rem;
        margin-bottom: 16px;
    }

    .contact-divider {
        width: 95%;
        margin: 0 auto 20px;
    }

    .contact-content {
        padding: 30px 10px 0;
    }

}

/* Testimonials */
#testimonials {
    background-image: url('assets/images/hero-bg.jpg');
    background-position: 48% 51%;
    background-attachment: scroll;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: linear-gradient(rgba(245, 243, 228, 0.65), rgba(245, 243, 228, 0.65));
        z-index: 0;
        pointer-events: none;
    }
}

#testimonials .container {
    position: relative;
    z-index: 1;
}

.testimonials-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    position: relative;
    z-index: 2;
}

.testimonial-card {
    flex: 1 1 25%;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;

    .testimonial-quote {
        margin-bottom: 20px;
        text-align: center;
        border: none;
        padding: 0;
        font-family: var(--font-quote);
        font-size: 1.5rem;
    }

    .testimonial-author {
        text-align: center;
        font-style: normal;
    }
}

/* --------------------------------------------------------------------------
   LAYOUT UTILITIES: FLEX & GRID COMPONENTS
   -------------------------------------------------------------------------- */
.testimonials-grid,
.testimonial-card,
.contact-email-wrapper,
.flex-row,
#highlights .flex-row,
#highlights .highlight-card-icon,
#logos .logo-item,
#therapy-benefits .therapy-benefit,
.accreditations-row,
.practice-info-panel,
footer .footer-grid,
footer .flex-row,
footer .flex-col {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.flex-row {
    flex-wrap: wrap;
}

.flex-col {
    padding: 15px;
    flex: 1 1 300px; /* Flex-grow, Flex-shrink, Flex-basis */
}

#highlights .flex-col {
    padding: clamp(44px, 6vw, 108px) var(--main-section-edge-padding);
    flex: 1 1 260px;
    min-width: 0;
}

#highlights .flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
}

#highlights .highlight-card-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-teal);
}

#highlights .highlight-card-icon-svg {
    display: block;
}

#highlights .highlight-card-icon-svg--plant g {
    fill: none;
    stroke: var(--white);
    stroke-miterlimit: 10;
}

#highlights .highlight-card-icon-svg--plant {
    width: 100px;
    height: 100px;
}

#highlights .highlight-card-icon-svg--plant * {
    stroke-width: 2.5;
}

#highlights .highlight-card-icon-svg--award g {
    fill: none;
    stroke: var(--primary-teal);
    stroke-miterlimit: 10;
}

#highlights .highlight-card-icon-svg--award {
    width: 100px;
    height: 100px;
}

#highlights .highlight-card-icon-svg--award * {
    stroke-width: 2.5;
}

#highlights .highlight-card-icon-svg--heart g {
    fill: none;
    stroke: var(--white);
    stroke-miterlimit: 10;
}

#highlights .highlight-card-icon-svg--heart {
    width: 100px;
    height: 100px;
}

#highlights .highlight-card-icon-svg--heart * {
    stroke-width: 2.5;
}

#highlights .flex-col p {
    line-height: 1.9;
}

#highlights .flex-col:first-child,
#highlights .flex-col:last-child {
    background: var(--primary-teal);
    color: var(--white);
}

#highlights .flex-col:nth-child(2) {
    background: var(--bg-cream);
    color: var(--text-main);
}

#highlights .flex-col:first-child .highlight-card-icon,
#highlights .flex-col:last-child .highlight-card-icon {
    color: var(--white);
}

/* Logo section beneath highlights */
#logos {
    padding: 90px var(--main-section-edge-padding);
}

#logos .logos-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px 20px;
    align-items: center;
}

#logos .logo-item {
    grid-column: span 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

#logos .logo-item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    outline: none;
}

#logos .logo-item-4 {
    grid-column: 2 / span 2;
}

#logos .logo-item-5 {
    grid-column: 4 / span 2;
}

#logos .logo-item img {
    width: min(220px, 100%);
    height: auto;
    display: block;
    opacity: 0.92;
    transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

#logos .logo-item-2 img {
    width: min(150px, 100%);
}

#logos .logo-item a:hover img,
#logos .logo-item a:focus-visible img {
    transform: translateY(-2px) scale(1.02);
    opacity: 1;
    filter: saturate(1.05);
}

#logos .logo-item a:focus-visible {
    outline: 2px solid var(--primary-teal);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    #logos .logo-item img {
        transition: opacity 0.2s ease;
    }

    #logos .logo-item a:hover img,
    #logos .logo-item a:focus-visible img {
        transform: none;
    }
}

.section-divider {
    display: block;
    --section-divider-space: 80px;
    border: 0;
    border-top: 2px solid rgba(235, 235, 235, 0.98);
    width: calc(90% - 126px);
    margin: var(--section-divider-space) auto;
}

/* Therapy Benefits section */

#therapy-benefits .therapy-benefits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

#therapy-benefits .therapy-benefit {
    flex: 1 1 33.333%;
    min-width: 0;
    display: flex;
}

#therapy-benefits .therapy-benefit article {
    width: 100%;
    padding: clamp(48px, 6vw, 84px) var(--main-section-edge-padding);
}

#therapy-benefits .therapy-benefit:nth-child(2),
#therapy-benefits .therapy-benefit:nth-child(4),
#therapy-benefits .therapy-benefit:nth-child(6) {
    background: var(--primary-teal);
    color: var(--white);
}

#therapy-benefits .therapy-benefit:nth-child(1),
#therapy-benefits .therapy-benefit:nth-child(3),
#therapy-benefits .therapy-benefit:nth-child(5) {
    background: var(--bg-cream);
    color: var(--text-main);
}

#therapy-benefits .therapy-benefit h3 {
    margin-bottom: 30px;
    line-height: 1.3;
    font-size: 1.85rem;
}

#therapy-benefits .therapy-benefit:nth-child(1) h3,
#therapy-benefits .therapy-benefit:nth-child(3) h3,
#therapy-benefits .therapy-benefit:nth-child(5) h3 {
    color: var(--primary-teal);
}

#therapy-benefits .therapy-benefit:nth-child(5) h3,
#therapy-benefits .therapy-benefit:nth-child(5) p {
    color: var(--text-main);
}

#therapy-benefits .therapy-benefit:nth-child(5) p {
    color: var(--primary-teal);
    font-weight: 700;
}

#therapy-benefits .therapy-benefit:nth-child(2) h3,
#therapy-benefits .therapy-benefit:nth-child(4) h3,
#therapy-benefits .therapy-benefit:nth-child(6) h3,
#therapy-benefits .therapy-benefit:nth-child(2) p,
#therapy-benefits .therapy-benefit:nth-child(4) p,
#therapy-benefits .therapy-benefit:nth-child(6) p {
    color: var(--white);
}

#therapy-benefits .therapy-benefit:nth-child(5) article,
#therapy-benefits .therapy-benefit:nth-child(6) article {
    font-weight: 700;
}

#therapy-benefits .therapy-benefit p {
    margin: 0;
    line-height: 1.8;
}

@media (max-width: 990px) {
    footer {
        .footer-grid,
        .flex-row {
            flex-wrap: wrap;
            gap: 30px;
        }

        .flex-col {
            flex: 1 1 280px;
            padding: 20px;
        }
    }

    #highlights .flex-col {
        flex-basis: 100%;
    }

    #logos .logos-grid {
        gap: 18px 16px;
    }

    #logos .logo-item img {
        width: min(170px, 100%);
    }

    #logos .logo-item-2 img {
        width: min(145px, 100%);
    }

    #therapy-benefits .therapy-benefit {
        padding: 0;
    }

    #therapy-benefits .therapy-benefit article {
        padding: clamp(38px, 5vw, 54px) var(--main-section-edge-padding);
    }

    .testimonials-grid {
        align-items: stretch;
    }

    .testimonial-card {
        flex: 1 1 50%;
        padding: 40px;
        border: none;
        display: flex;
        flex-direction: column;
    }

    .testimonial-card:nth-child(1) {
        border-right: 1px solid rgba(68, 68, 68, 0.3);
        border-bottom: 1px solid rgba(68, 68, 68, 0.3);
    }

    .testimonial-card:nth-child(2) {
        border-bottom: 1px solid rgba(68, 68, 68, 0.3);
    }

    .testimonial-card:nth-child(3) {
        border-right: 1px solid rgba(68, 68, 68, 0.3);
    }
}

@media (max-width: 768px) {
    #logos {
        padding: 40px var(--main-section-edge-padding) 26px;
    }

    #logos .logos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
    }

    #logos .logo-item,
    #logos .logo-item-4,
    #logos .logo-item-5 {
        grid-column: auto;
    }

    #logos .logo-item img {
        width: min(132px, 100%);
    }

    .section-divider {
        display: none;
    }

    #therapy-benefits {
        padding: 0 0 60px;
    }

    #therapy-benefits .therapy-benefit {
        flex-basis: 100%;
        padding: 0;
    }

    #therapy-benefits .therapy-benefit:nth-child(5),
    #therapy-benefits .therapy-benefit:nth-child(6) {
        text-align: center;
    }

    #therapy-benefits .therapy-benefit article {
        padding: 38px var(--main-section-edge-padding);
    }

    #therapy-benefits .therapy-benefit h3 {
        text-align: center;
        font-size: 1.45rem;
    }

    .testimonial-card {
        flex: 1 1 100%;
        padding: 30px;
        border: none;
        border-bottom: 1px solid rgba(68, 68, 68, 0.3);
        border-right: none;
    }

    .testimonial-card:nth-child(1),
    .testimonial-card:nth-child(2),
    .testimonial-card:nth-child(3) {
        border-right: none;
    }

    .testimonial-card:last-child {
        border-bottom: none;
    }
}

/* Professional Badge Row */
.accreditations-row {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;

    img {
        height: 65px;
        -webkit-filter: grayscale(1);
        filter: grayscale(1); /* Muted by default so they don't overpower */
        opacity: 0.6;
        -webkit-transition: -webkit-filter 0.4s ease, opacity 0.4s ease;
        transition: filter 0.4s ease, opacity 0.4s ease;

        &:hover {
            -webkit-filter: grayscale(0);
            filter: grayscale(0); /* Full color on hover */
            opacity: 1;
        }
    }
}

/* Testimonial Quote Blocks */
blockquote {
    font-size: 1.1rem;
    font-style: italic;
    padding: 20px;
    position: relative;

    cite {
        display: block;
        margin-top: 15px;
        font-style: normal;
        font-weight: bold;
        color: var(--primary-teal);
        text-transform: uppercase;
        font-size: 0.8rem;
    }
}

/* --------------------------------------------------------------------------
   PRACTICE INFO: 2x2 PANEL GRID
   -------------------------------------------------------------------------- */
.practice-info {
    width: 100%;
}

.practice-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(460px, 1fr);
}

/* Shared panel base */
.practice-info-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Image panels */
.practice-info-panel--img-1 {
    background-image: url('assets/images/what-words-come-to-mind-when-you-think-of-counselling.jpg');
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: rgba(40, 43, 50, 1);
}

.practice-info-panel--img-2 {
    background-image: url('assets/images/tree-of-aura.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Text panels */
.practice-info-panel--text {
    background-color: var(--bg-cream);
    padding: clamp(48px, 6vw, 90px) clamp(40px, 5vw, 80px);

    h2 {
        font-family: var(--font-serif);
        font-size: 2rem;
        font-weight: 700;
        color: var(--primary-teal);
        line-height: 1.2;
        margin-bottom: var(--spacing-lg);
    }

    p + p {
        margin-top: var(--spacing-lg);
    }

    a {
        color: var(--primary-teal);
        font-weight: 700;
    }
}

/* Responsive: stack to single column below 768px */
@media (max-width: 768px) {
    .practice-info-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .practice-info-grid > :nth-child(3) h2 {
        text-align: center;
    }

    .practice-info-panel--img-1 {
        aspect-ratio: 1 / 1;
        background-size: contain;
    }

    .practice-info-panel--img-2 {
        aspect-ratio: 5 / 4;
        background-size: cover;
    }

    /* Swap panels 3 & 4: move the second text panel after the image */
    .practice-info-grid > :nth-child(3) {
        order: 1;
    }

    .practice-info-panel--text {
        padding: 48px var(--main-section-edge-padding);
    }
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
footer {
    background: var(--primary-teal);
    color: var(--white);
    padding: 70px 0 30px;

    .container {
        width: min(var(--container-main-max-width), calc(100% - (var(--container-main-gutter) * 2)));
    }

    .footer-grid,
    .flex-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 50px;
        margin-bottom: 50px;
    }

    .flex-col {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    h4 { 
        color: var(--white); 
        margin-bottom: 0; 
        font-size: 1.75rem; 
    }
    
    ul {
        list-style: none;
        line-height: 1.2;
        
        li { margin-bottom: 8px; }
        
        a { 
            color: var(--white); 
            text-decoration: underline;
            font-size: 0.85rem;
            opacity: 0.9;
            
            &:hover { 
                opacity: 1; 
                text-decoration: underline; 
            }
        }
    }

    .flex-col:not(:first-child) p {
        font-size: 0.85rem;
    }

    p a {
        color: var(--white);
        text-decoration: underline;

        &:hover {
            color: var(--white);
            opacity: 1;
        }
    }

    .back-to-top-wrap {
        text-align: center;
    }

    .back-to-top-link {
        display: -webkit-inline-box;
        display: -ms-inline-flexbox;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        text-decoration: none;
        opacity: 0.95;

        &:hover {
            color: var(--white);
            opacity: 1;
        }

        svg {
            width: 49px;
            height: 49px;
            display: block;
        }
    }

    .bottom-bar {
        border-top: 2px solid rgba(255, 255, 255, 0.5);
        margin: 14px 0;
    }

    .copyright-text {
        text-align: center;
        padding: 10px 0 0;
        font-size: 0.75rem;
        letter-spacing: 1px;

        a {
            color: var(--white);
            text-decoration: underline;
            margin-left: 10px;

            &:hover {
                opacity: 1;
            }
        }
    }

}

/* --------------------------------------------------------------------------
   Legacy Fallbacks: Browsers Without CSS Nesting
   Keep critical header/contact/footer styles available without nested syntax.
   -------------------------------------------------------------------------- */

header h1 {
    font-size: 1.8rem;
    margin: 5px 20px;
    line-height: 39px;
    font-family: "Nanum Myeongjo", serif;
    font-weight: 800;
}

header p {
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 800;
}

header nav {
    padding: clamp(12px, 1.8vw, 18px) 0;
}

header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(12px, 2vw, 25px);
    row-gap: 3px;
}

header nav ul li a {
    text-decoration: none;
    color: var(--white);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--link);
}

#contact-form label,
.tt-global-form label {
    display: block;
    color: rgb(245, 243, 228);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

#contact-form input:focus,
#contact-form textarea:focus,
.tt-global-form input:focus,
.tt-global-form textarea:focus {
    outline: 2px solid var(--dark-teal);
    background: var(--white);
}

#contact-form input:user-invalid:focus,
#contact-form textarea:user-invalid:focus,
#contact-form input:focus:invalid,
#contact-form textarea:focus:invalid,
.tt-global-form input:user-invalid:focus,
.tt-global-form textarea:user-invalid:focus,
.tt-global-form input:focus:invalid,
.tt-global-form textarea:focus:invalid {
    outline: none;
    border: 2px solid #ff4444;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder,
.tt-global-form input::placeholder,
.tt-global-form textarea::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

#contact-form button,
.tt-global-form button {
    background: rgb(245, 243, 228);
    color: var(--primary-teal);
    font-family: var(--font-sans);
    border: 2px solid rgb(245, 243, 228);
    padding: 18px 80px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
}

#contact-form button:hover,
.tt-global-form button:hover {
    background: rgb(221, 215, 172);
    color: var(--dark-teal);
}

footer .container {
    width: min(var(--container-main-max-width), calc(100% - (var(--container-main-gutter) * 2)));
}

footer .footer-grid,
footer .flex-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 50px;
    margin-bottom: 50px;
}

footer .flex-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

footer h4 {
    color: var(--white);
    margin-bottom: 0;
    font-size: 1.75rem;
}

footer ul {
    list-style: none;
    line-height: 1.2;
}

footer ul li {
    margin-bottom: 8px;
}

footer ul a {
    color: var(--white);
    text-decoration: underline;
    font-size: 0.85rem;
    opacity: 0.9;
}

footer ul a:hover {
    opacity: 1;
    text-decoration: underline;
}

footer .flex-col:not(:first-child) p {
    font-size: 0.85rem;
}

footer p a {
    color: var(--white);
    text-decoration: underline;
}

footer p a:hover {
    color: var(--white);
    opacity: 1;
}

footer .back-to-top-wrap {
    text-align: center;
}

footer .back-to-top-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    opacity: 0.95;
}

footer .back-to-top-link:hover {
    color: var(--white);
    opacity: 1;
}

footer .back-to-top-link svg {
    width: 49px;
    height: 49px;
    display: block;
}

footer .bottom-bar {
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    margin: 14px 0;
}

footer .copyright-text a {
    color: var(--white);
    text-decoration: underline;
    margin-left: 10px;
}

footer .copyright-text a:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.6rem;
        margin: 8px auto;
        line-height: 1.4;
        max-width: 100%;
    }

    header .solid {
        margin: 1em auto;
        margin-bottom: 0;
    }

    footer {
        padding: 32px 0 30px;
    }

    footer .footer-grid,
    footer .flex-row {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }

    footer .flex-col {
        flex: 1 1 100%;
        width: 100%;
        text-align: center;
        padding: 20px;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    footer .flex-col:nth-child(2) {
        background: #58bcb3;
        padding-bottom: 52px;
    }

    footer .flex-col:nth-child(1) {
        order: 3;
    }

    footer .flex-col:nth-child(2) {
        order: 2;
    }

    footer .flex-col:nth-child(3) {
        order: 1;
    }

    footer h4 {
        font-size: 1.5rem;
    }

    footer h4,
    footer p,
    footer ul,
    footer li {
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   PAGES
   -------------------------------------------------------------------------- */
body.play-therapy-page main section h2,
body.cbt-page main section h2,
body.group-psychoeducation-page main section h2,
body.training-page main section h2 {
     color: var(--primary-teal);
}

.play-therapy-feature {
    background: var(--bg-cream);
    background-color: rgb(245, 243, 228);
    padding: clamp(44px, 6vw, 84px) var(--main-section-edge-padding);
    margin-top: var(--spacing-xl);
    text-align: center;
}

.play-therapy-feature h1 {
    color: var(--primary-teal);
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    line-height: 1.2;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.play-therapy-feature h2 {
    color: var(--primary-teal);
}

.play-therapy-feature p {
    color: var(--text-main);
    line-height: 1.85;
}

.play-therapy-feature p + p {
    margin-top: var(--spacing-lg);
}

body.privacy-policy-page .privacy-policy-details {
    background: var(--bg-cream);
    padding: clamp(44px, 6vw, 84px) var(--main-section-edge-padding);
    margin-bottom: var(--spacing-xl);
    text-align: left;
}

body.privacy-policy-page .privacy-policy-details--intro {
    background: var(--primary-teal);
}

body.privacy-policy-page .privacy-policy-details h3 {
    color: var(--primary-teal);
    font-weight: 700;
}

body.privacy-policy-page .privacy-policy-details--intro h3 {
    color: var(--white);
}

body.privacy-policy-page .privacy-policy-details p,
body.privacy-policy-page .privacy-policy-details li,
body.privacy-policy-page .privacy-policy-details a {
    color: var(--text-main);
}

body.privacy-policy-page .privacy-policy-details--intro p,
body.privacy-policy-page .privacy-policy-details--intro li,
body.privacy-policy-page .privacy-policy-details--intro a {
    color: var(--white);
}

body.privacy-policy-page .privacy-policy-details ul {
    margin-left: 1.2rem;
}

body.privacy-policy-page .play-therapy-feature hr,
body.privacy-policy-page .privacy-policy-details hr {
    border: 0;
    border-top: 1px solid rgba(235, 235, 235, 0.98);
    margin: var(--spacing-md) 0 var(--spacing-lg);
}

body.privacy-policy-page .privacy-policy-details--intro hr {
    border-top-color: rgba(255, 255, 255, 0.5);
}

.play-therapy-feature--teal {
    background: var(--primary-teal);
    background-color: var(--primary-teal);
}

.play-therapy-feature--teal h1,
.play-therapy-feature--teal h2,
.play-therapy-feature--teal p {
    color: var(--white);
}

/* Keep headings visible inside teal sections even when page-level h2 colors are applied. */
.play-therapy-feature.play-therapy-feature--teal h2 {
    color: var(--white);
}

body.cbt-page .cbt-three-panel {
    margin-top: var(--spacing-xl);
}

body.cbt-page .cbt-three-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

body.cbt-page .cbt-three-panel-item {
    min-height: 360px;
    padding: clamp(40px, 5.5vw, 72px) var(--main-section-edge-padding);
}

body.cbt-page .cbt-three-panel-item h3 {
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

body.cbt-page .cbt-three-panel-item p {
    line-height: 1.85;
}

body.cbt-page .cbt-three-panel-item p + p {
    margin-top: var(--spacing-lg);
}

body.cbt-page .cbt-three-panel-item--teal {
    background: var(--primary-teal);
    color: var(--white);
}

body.cbt-page .cbt-three-panel-item--teal h3 {
    color: var(--white);
}

body.cbt-page .cbt-three-panel-item--cream {
    background: var(--bg-cream);
    color: var(--text-main);
}

body.cbt-page .cbt-three-panel-item--cream h3 {
    color: var(--primary-teal);
}

body.play-therapy-page .play-therapy-highlights {
    margin-top: 0;
}

body.play-therapy-page .play-therapy-highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

body.play-therapy-page .play-therapy-highlight {
    min-height: 360px;
    padding: clamp(40px, 5.5vw, 72px) var(--main-section-edge-padding);
}

body.play-therapy-page .play-therapy-highlight h3 {
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

body.play-therapy-page .play-therapy-highlight p {
    line-height: 1.85;
}

body.play-therapy-page .play-therapy-highlight--cream {
    background: var(--bg-cream);
    color: var(--text-main);
}

body.play-therapy-page .play-therapy-highlight--cream h3 {
    color: var(--primary-teal);
}

body.play-therapy-page .play-therapy-highlight--teal {
    background: var(--primary-teal);
    color: var(--white);
}

body.play-therapy-page .play-therapy-highlight--teal h3 {
    color: var(--white);
}

body.play-therapy-page .play-therapy-highlight--teal p + p {
    margin-top: var(--spacing-lg);
}

body.play-therapy-page .play-therapy-highlight--image {
    background: var(--bg-cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--spacing-md);
}

body.play-therapy-page .play-therapy-highlight--image img {
    width: min(320px, 100%);
    max-height: 230px;
    object-fit: cover;
    display: block;
}

body.play-therapy-page .play-therapy-highlight--image span {
    display: block;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 400;
    text-align: center;
}

body.training-page .training-overview {
    margin-top: var(--spacing-xl);
}

body.training-page .training-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

body.training-page .training-overview-panel {
    padding: clamp(40px, 5.5vw, 72px) var(--main-section-edge-padding);
}

body.training-page .training-overview-panel h2,
body.training-page .training-overview-panel h3 {
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

body.training-page .training-overview-grid .training-overview-panel:first-child {
    background: var(--primary-teal);
    color: var(--white);
}

body.training-page .training-overview-grid .training-overview-panel:first-child h2,
body.training-page .training-overview-grid .training-overview-panel:first-child h3 {
    color: var(--white);
}

body.training-page .training-overview-grid .training-overview-panel:first-child p {
    line-height: 1.85;
}

body.training-page .training-overview-grid .training-overview-panel:first-child p + p {
    margin-top: var(--spacing-lg);
}

body.training-page .training-overview-grid .training-overview-panel:last-child {
    background: var(--bg-cream);
    color: var(--text-main);
}

body.training-page .training-overview-grid .training-overview-panel:last-child h2,
body.training-page .training-overview-grid .training-overview-panel:last-child h3 {
    color: var(--primary-teal);
}

body.training-page .training-overview-grid .training-overview-panel:last-child ul {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.85;
}

body.training-page .training-overview-grid .training-overview-panel:last-child ul + ul {
    margin-top: var(--spacing-lg);
}

body.training-page .training-overview-grid .training-overview-panel:last-child ul + p {
    margin-top: var(--spacing-lg);
}

body.training-page .training-logos {
    padding: 0;
}

body.training-page .training-logos-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

body.training-page .training-logos-panel {
    flex: 1 1 50%;
    min-width: 0;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 5vw, 64px) var(--main-section-edge-padding);
}

body.training-page .training-logos-panel img {
    display: block;
    width: min(360px, 100%);
    height: auto;
}

body.training-page .training-detail-panels {
    padding: 0;
}

body.training-page .training-cosca-panels {
    margin-top: var(--spacing-xl);
}

body.training-page .training-detail-panels-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

body.training-page .training-detail-panel {
    flex: 1 1 50%;
    min-width: 0;
    background: var(--bg-cream);
    padding: clamp(38px, 5vw, 68px) var(--main-section-edge-padding);
    color: var(--text-main);
}

body.training-page .training-detail-panel h2 {
    color: var(--primary-teal);
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

body.training-page .training-detail-panel p {
    line-height: 1.85;
}

body.training-page .training-detail-panel p + p,
body.training-page .training-detail-panel p + ul,
body.training-page .training-detail-panel ul + p {
    margin-top: var(--spacing-lg);
}

body.training-page .training-detail-panel h3.training-inline-heading,
body.training-page .training-followup-panel h3.training-inline-heading {
    color: inherit;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.85;
    margin: 0;
}

body.training-page .training-detail-panel p + h3.training-inline-heading,
body.training-page .training-detail-panel ul + h3.training-inline-heading {
    margin-top: var(--spacing-lg);
}

body.training-page .training-detail-panel h3.training-inline-heading + p,
body.training-page .training-detail-panel h3.training-inline-heading + ul {
    margin-top: 0;
}

body.training-page .training-detail-panel ul {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.85;
}

body.training-page .training-detail-panel ul + ul {
    margin-top: var(--spacing-lg);
}

body.training-page .training-followup-panels {
    padding: 0;
    margin-top: var(--spacing-xl);
}

body.training-page .training-followup-panels-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

body.training-page .training-followup-panel {
    flex: 1 1 50%;
    min-width: 0;
    background: var(--bg-cream);
    color: var(--text-main);
    padding: clamp(38px, 5vw, 68px) var(--main-section-edge-padding);
}

body.training-page .training-followup-panel h2 {
    color: var(--primary-teal);
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

body.training-page .training-followup-panel p {
    line-height: 1.85;
}

body.training-page .training-followup-panel p + p,
body.training-page .training-followup-panel p + ul,
body.training-page .training-followup-panel ul + p,
body.training-page .training-followup-panel p + .training-followup-logos {
    margin-top: var(--spacing-lg);
}

body.training-page .training-followup-panel p + h3.training-inline-heading,
body.training-page .training-followup-panel ul + h3.training-inline-heading,
body.training-page .training-followup-panel .training-followup-logos + h3.training-inline-heading {
    margin-top: var(--spacing-lg);
}

body.training-page .training-followup-panel h3.training-inline-heading + p,
body.training-page .training-followup-panel h3.training-inline-heading + ul,
body.training-page .training-followup-panel h3.training-inline-heading + .training-followup-logos {
    margin-top: 0;
}

body.training-page .training-followup-panel ul {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.85;
}

body.training-page .training-followup-logos {
    display: flex;
    gap: clamp(16px, 2.2vw, 26px);
    align-items: center;
}

body.training-page .training-followup-logos img {
    width: auto;
    max-width: 60%;
    height: clamp(120px, 12vw, 180px);
    object-fit: contain;
    display: block;
}

body.training-page .training-followup-logos img[src*="TT_logo"] {
    width: clamp(180px, 38vw, 420px);
    max-width: 100%;
}

body.training-page .training-harm {
    padding: 0 var(--main-section-edge-padding) 0;
}

body.training-page .training-harm img {
    display: block;
    width: clamp(150px, 31vw, 280px);
    max-width: 100%;
    height: auto;
    margin: clamp(32px, 4.5vw, 56px) 0 var(--spacing-lg);
}

body.training-page .training-harm h2 {
    color: #619fc5;
    font-size: clamp(2.3rem, 3.6vw, 3rem);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

body.training-page .training-harm h3 {
    color: #374595;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
}

body.training-page .training-harm p {
    color: #374595;
    line-height: 1.85;
}

body.training-page .training-harm ul {
    color: #374595;
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.85;
}

body.training-page .training-harm h3 + p,
body.training-page .training-harm h3 + ul,
body.training-page .training-harm ul + p {
    margin-top: var(--spacing-md);
}

body.training-page .training-harm p + h3 {
    margin-top: var(--spacing-xl);
}

@media (min-width: 769px) and (max-width: 990px) {
    footer h4 {
        font-size: 1.45rem;
    }

    body.training-page .training-harm img {
        width: clamp(130px, 28vw, 230px);
    }

    body.training-page .training-followup-logos {
        justify-content: center;
    }

    .section-divider {
        --section-divider-space: 49px;
    }

    footer .container {
        padding-left: clamp(30px, 4vw, 40px);
        padding-right: clamp(30px, 4vw, 40px);
    }

}

@media (max-width: 990px) {
    body.play-therapy-page .play-therapy-highlights-grid {
        grid-template-columns: 1fr;
    }

    body.training-page .training-overview-grid {
        grid-template-columns: 1fr;
    }

    body.training-page .training-logos-panel {
        flex-basis: 100%;
        min-height: 220px;
    }

    body.training-page .training-detail-panel {
        flex-basis: 100%;
    }

    body.training-page .training-followup-panel {
        flex-basis: 100%;
    }

    body.training-page .training-harm {
        padding: 0 var(--main-section-edge-padding) 0;
    }

    body.training-page .training-harm img {
        margin-left: auto;
        margin-right: auto;
    }

    body.training-page .training-harm h2 {
        text-align: center;
    }

    body.training-page .training-overview-panel h2,
    body.training-page .training-overview-panel h3 {
        text-align: center;
    }

    body.training-page .training-detail-panel h2,
    body.training-page .training-followup-panel h2 {
        text-align: center;
    }

    body.play-therapy-page .play-therapy-highlight--cream h3 {
        text-align: center;
    }

    body.play-therapy-page .play-therapy-highlight {
        min-height: auto;
    }

    body.play-therapy-page .play-therapy-highlight--image img {
        width: min(460px, 100%);
        max-height: 320px;
    }
}

@media (max-width: 768px) {
    body.training-page .training-harm {
        padding-top: clamp(24px, 6vw, 36px);
        padding-bottom: clamp(72px, 12vw, 110px);
    }

    body.training-page .training-harm h2 {
        font-size: clamp(2rem, 7vw, 2.35rem);
    }

    body.training-page .training-harm img {
        width: clamp(96px, 42vw, 160px);
        max-width: 100%;
    }

    body.training-page .training-followup-logos {
        flex-direction: column;
        align-items: center;
    }

    body.training-page .training-followup-logos img {
        width: min(260px, 100%);
        max-width: none;
        height: auto;
    }

    body.training-page .training-followup-logos img[src*="TT_logo"] {
        width: clamp(96px, 42vw, 160px);
        max-width: 100%;
    }

    body.play-therapy-page main > .play-therapy-feature:first-of-type p,
    body.cbt-page main > .play-therapy-feature:first-of-type p,
    body.cbt-page main > .play-therapy-feature:nth-of-type(2) p,
    body.group-psychoeducation-page main > .play-therapy-feature:first-of-type p {
        text-align: left;
    }

    body.cbt-page .cbt-three-panel-grid {
        grid-template-columns: 1fr;
    }

    body.cbt-page .cbt-three-panel-item {
        min-height: auto;
    }

    body.play-therapy-page .play-therapy-highlight--image img {
        width: min(540px, 100%);
        max-height: 380px;
    }
}

@media (max-width: 768px) {
    .play-therapy-feature {
        background-color: var(--bg-cream);
    }

    .play-therapy-feature--teal {
        background-color: var(--primary-teal);
    }
}

/* --------------------------------------------------------------------------
    12. GLOBAL MOBILE RESPONSIVENESS
    -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    header {
        padding: 0 20px;

        .logo-area img {
            margin-top: 25px;
        }

        h1 {
            font-size: 1.6rem;
            margin: 8px auto;
            line-height: 1.4;
            max-width: 100%;
        }
        
        .solid {
            margin: 1em auto;
            margin-bottom: 0;
        }
    }

    body.play-therapy-page main section h2,
    body.cbt-page main section h2,
    body.group-psychoeducation-page main section h2,
    body.training-page main section h2 {
        font-size: 1.6rem;
    }

    .hero {
        background-size: cover;
        background-position: 48% 51%;
        padding: 100px 0;
        
        .hero-box {
            padding: 25px;
            
            h2 { 
                font-size: 2rem;
                line-height: 1.2;
            }
        }
        
        &::before {
            background-image: linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.69));
            -webkit-filter: brightness(100%) hue-rotate(0deg) saturate(50%) contrast(84%);
            filter: brightness(100%) hue-rotate(0deg) saturate(50%) contrast(84%);
        }
    }

    #intro {
        padding: 40px 0;
        
        .intro-content {
            font-size: 1.45rem;
            padding: 0 25px;
        }
    }

    #about {
        .about-grid {
            grid-template-columns: 1fr;
        }

        .about-media {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 220px;
            padding: 32px 0;
        }

        .portrait-wrapper {
            position: relative;
            left: auto;
            top: auto;
            transform: none;
            width: clamp(240px, 72vw, 360px);
            margin: 0 auto;
        }

        .about-content { 
            padding: 25px; 
            text-align: left; 

            h2 {
                font-size: 1.8rem;
                text-align: center;
            }
        }
    }

    .hero-box .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 5px;
        font-size: 0.75rem;
    }

    .hero-box .btn-arrow {
        width: 18px;
        height: 14px;
    }

    footer {
        padding: 32px 0 30px;

        .footer-grid,
        .flex-row {
            flex-direction: column;
            align-items: center;
            gap: 24px;
        }

        .flex-col {
            flex: 1 1 100%;
            width: 100%;
            text-align: center;
            padding: 20px;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

        .flex-col:nth-child(2) {
            background: #58bcb3;
            padding-bottom: 52px;
        }

        .flex-col:nth-child(1) {
            order: 3;
        }

        .flex-col:nth-child(2) {
            order: 2;
        }

        .flex-col:nth-child(3) {
            order: 1;
        }

        h4 {
            font-size: 1.5rem;
        }

        h4,
        p,
        ul,
        li {
            text-align: center;
        }
    }
}