/* ========================================
   CSS RESET & BOX SIZING
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ======================================== */
:root {
    /* Colors */
    --color-primary: #447569;
    --color-primary-dark: #03494B;
    --color-accent: #1F9A73;
    --color-accent-teal: #229085;
    --color-orange-gradient: linear-gradient(180deg, #F99522 0%, #FEE478 100%);
    --color-bg-light: #EBF3F1;
    --color-bg-chat: rgba(215, 230, 227, 0.5);
    --color-text-dark: #03494B;
    --color-text-gray: #6D6F75;
    --color-text-light-gray: rgba(88, 85, 94, 0.5);
    --color-text-muted: rgba(3, 73, 75, 0.6);
    --color-border: rgba(3, 73, 75, 0.5);
    --color-border-light: #D9D9D9;
    --color-white: #FFFFFF;
    --color-black: #212121;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-logo: 'Comfortaa', cursive;

    /* Font Sizes - Fluid Typography */
    --fs-hero: clamp(48px, 6vw, 90px);
    --fs-section-title: clamp(40px, 4.5vw, 65px);
    --fs-card-title: clamp(22px, 2vw, 26px);
    --fs-body: clamp(18px, 1.5vw, 26px);
    --fs-small: clamp(14px, 1.2vw, 20px);
    --fs-nav: clamp(18px, 1.5vw, 24px);

    /* Spacing */
    --spacing-xs: clamp(10px, 1vw, 15px);
    --spacing-sm: clamp(15px, 1.5vw, 20px);
    --spacing-md: clamp(20px, 2vw, 30px);
    --spacing-lg: clamp(30px, 3vw, 50px);
    --spacing-xl: clamp(50px, 4vw, 80px);
    --spacing-xxl: clamp(60px, 6vw, 100px);

    /* Container Width */
    --container-max-width: 1300px;
    --container-padding: clamp(20px, 3vw, 60px);

    /* Border Radius */
    --radius-sm: 13px;
    --radius-md: 20px;
    --radius-lg: 50px;
    --radius-full: 99px;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
body {
    font-family: var(--font-primary);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========================================
   HEADER SECTION
   ======================================== */
.header {
    padding: var(--spacing-md) 0;
    position: relative;
}

.header .container {
    max-width: 1400px;
    padding: 0 clamp(20px, 1vw, 20px);;
}

.header-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--spacing-lg);
}

.header-logo {
    font-family: var(--font-logo);
    font-size: 32px;
    font-weight: 500;
    color: var(--color-primary);
}

.header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
}

.header-nav a {
    font-size: var(--fs-nav);
    font-weight: 400;
    color: var(--color-text-dark);
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: var(--color-accent);
}

.header-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.header-nav-buttons {
    display: none;
}

.btn {
    padding: 12px 30px;
    font-size: 22px;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 150px;
}

.btn-primary {
    background: var(--color-orange-gradient);
    color: var(--color-white);
}

.btn-outline {
    background: transparent;
    border: 1.6px solid var(--color-primary-dark);
    color: var(--color-primary-dark);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-primary-dark);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    padding: var(--spacing-xl) 0;
}

.hero-grid {
    display: grid;
    grid-template-rows: auto auto;
    gap: var(--spacing-xl);
}

.hero-title {
    font-size: var(--fs-hero);
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    color: var(--color-text-dark);
}

.hero-title .highlight {
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-star-icon {
    width: clamp(30px, 4vw, 60px);
    height: clamp(30px, 4vw, 60px);
    display: inline-block;
    vertical-align: middle;
}

.hero-subtitle {
    font-size: var(--fs-body);
    font-weight: 500;
    text-align: center;
    color: var(--color-text-gray);
    letter-spacing: -0.03em;
    line-height: 1.5;
    margin-top: calc(var(--spacing-md) * -0.5);
}

.hero-chat-container {
    background: var(--color-bg-chat);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-lg);
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: var(--spacing-md);
    justify-items: center;
}

.hero-tracy-pic {
    width: clamp(200px, 25vw, 320px);
    height: clamp(200px, 25vw, 320px);
    border-radius: 50%;
    overflow: hidden;
}

.hero-tracy-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-chat-text {
    text-align: center;
    max-width: 850px;
}

.hero-chat-greeting {
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 700;
    line-height: 1.9;
    letter-spacing: -0.02em;
    color: var(--color-text-dark);
}

.hero-chat-greeting .tracy {
    font-style: oblique 7deg;
}

.hero-input-container {
    background: var(--color-white);
    border-radius: 120px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    max-width: 850px;
    width: 100%;
}

.hero-input-container input {
    flex: 1;
    border: none;
    outline: none;
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--color-text-light-gray);
}

.hero-input-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-input-icon img {
    width: 100%;
    height: 100%;
}

/* ========================================
   MEET TRACY SECTION
   ======================================== */
.meet-tracy {
    padding: var(--spacing-xxl) 0;
}

.meet-tracy-grid {
    display: grid;
    grid-template-rows: auto auto;
    gap: var(--spacing-xl);
}

.section-title {
    font-size: var(--fs-section-title);
    font-weight: 700;
    text-align: center;
    color: var(--color-accent);
    line-height: 1;
}

.section-title .tracy {
    font-style: oblique 7deg;
}

.tracy-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.tracy-image {
    width: clamp(250px, 30vw, 363px);
    height: clamp(250px, 30vw, 363px);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.tracy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tracy-text h3 {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-md);
}

.tracy-text p {
    font-size: var(--fs-body);
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-md);
}

.tracy-text .tracy-helps {
    font-style: normal;
}

.tracy-text .tracy {
    font-style: oblique 7deg;
}

.tracy-list {
    list-style-position: inside;
    font-size: var(--fs-body);
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: -0.03em;
}

/* ========================================
   HOW IT WORKS SECTION
   ======================================== */
.how-works {
    padding: var(--spacing-xxl) 0;
}

.how-works-grid {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: var(--spacing-xl);
}

.cards-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.work-card {
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    padding: clamp(50px, 4vw, 80px) clamp(40px, 2vw, 80px);
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: var(--spacing-lg);
    text-align: center;
    align-items: start;
    min-height: 350px;
}

.work-card-icon {
    width: 105px;
    height: 105px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-card-icon img {
    width: 100%;
    height: 100%;
}

.work-card h3 {
    font-size: var(--fs-card-title);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.work-card p {
    font-size: var(--fs-small);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--color-text-muted);
}

.work-card p em {
    font-style: oblique 7deg;
}

.btn-center {
    display: flex;
    justify-content: center;
}

.btn-large {
    padding: 20px 50px;
    font-size: 27px;
}

/* ========================================
   WHY TMATCH SECTION
   ======================================== */
.why-tmatch {
    padding: var(--spacing-xxl) 0;
}

.why-tmatch .container {
    max-width: 1400px;
    padding: 0 clamp(20px, 2vw, 40px);
}

.why-tmatch-grid {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: var(--spacing-lg);
}

.cards-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.why-card {
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg) clamp(40px, 2vw, 80px) var(--spacing-lg) clamp(30px, 2vw, 80px);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-sm);
    align-items: center;
}

.why-card-icon {
    width: 150px;
    height: 150px;
}

.why-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.why-card-text h3 {
    font-size: var(--fs-card-title);
    font-weight: 600;
    line-height: 1.7;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-xs);
}

.why-card-text p {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.03em;
}

.why-card-text .bold {
    font-weight: 600;
}

.why-card-text p em {
    font-style: oblique 7deg;
}

/* ========================================
   FIND THERAPISTS SECTION
   ======================================== */
.find-therapists {
    padding: var(--spacing-xxl) 0;
}

.find-therapists-grid {
    display: grid;
    grid-template-rows: auto auto;
    gap: var(--spacing-xl);
}

/* Carousel Wrapper - positions buttons relative to cards */
.therapist-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Carousel Container - constrains visible area */
.therapist-carousel-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Carousel Track - holds all cards and slides */
.therapist-carousel-track {
    display: grid;
    grid-template-columns: repeat(6, calc((100% - var(--spacing-md) * 2) / 3));
    gap: var(--spacing-md);
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform;
}

/* Carousel state for page 1 (cards 1-3) */
.therapist-carousel-track[data-page="1"] {
    transform: translateX(0);
}

/* Carousel state for page 2 (cards 4-6) */
.therapist-carousel-track[data-page="2"] {
    transform: translateX(calc(-100% - var(--spacing-md)));
}

/* Carousel Buttons */
.carousel-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    width: clamp(40px, 4vw, 60px);
    height: clamp(40px, 4vw, 60px);
}

.carousel-btn img {
    width: 100%;
    height: 100%;
    display: block;
}

.carousel-btn:hover {
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

/* Hide buttons based on page */
.carousel-btn.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.therapist-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.therapist-card-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
}

.therapist-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.therapist-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.therapist-card-overlay h3 {
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-white);
    text-shadow: 0px 2px 9px rgba(0, 0, 0, 0.5);
}

.therapist-card-overlay p {
    font-size: clamp(14px, 1.2vw, 17px);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--color-white);
    text-shadow: 0px 2px 9px rgba(0, 0, 0, 0.5);
}

.therapist-card-info {
    padding: var(--spacing-md);
    border: 0.88px solid var(--color-border);
    background: var(--color-white);
}

.therapist-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-bottom: var(--spacing-sm);
}

.tag {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 5px 11px;
    border-radius: 87px;
    font-size: 16px;
    font-weight: 400;
}

.therapist-details {
    display: grid;
    gap: 11px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 18px;
}

.detail-icon {
    width: 15px;
    height: 15px;
}

.therapist-card-svg {
    width: 100%;
}

.therapist-card-svg img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   FOOTER SECTION
   ======================================== */
.footer {
    border-top: 1px solid var(--color-border-light);
    padding: var(--spacing-lg) 0;
}

.footer .container {
    max-width: 1400px;
    padding: 0 clamp(20px, 2vw, 40px);
}

.footer-grid {
    display: grid;
    grid-template-rows: auto auto;
    gap: clamp(30px, 6vw, 80px);
}

.footer-main {
    display: grid;
    grid-template-columns: auto 1fr 1fr 1fr;
    gap: clamp(30px, 3vw, 50px);
}

.footer-brand {
    display: grid;
    grid-template-rows: auto auto;
    gap: clamp(10px, 1vw, 15px);
    margin-right: clamp(60px, 12vw, 160px);
}

.footer-logo {
    font-family: var(--font-logo);
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 32px;
    height: 32px;
}

.social-icon img {
    width: 100%;
    height: 100%;
}

.footer-column h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-sm);
}

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

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

.footer-column a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-black);
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--color-accent);
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: var(--color-border-light);
}

.footer-divider-full {
    width: 100%;
    height: 1px;
    background: var(--color-border-light);
    margin: var(--spacing-lg) 0;
}

.footer-bottom {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.footer-copyright {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-primary-dark);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-gray);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-disclaimer {
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    color: var(--color-black);
    text-align: left;
}

/* ========================================
   RESPONSIVE DESIGN - TABLET
   ======================================== */
@media (max-width: 1024px) {
    .header-nav {
        gap: var(--spacing-md);
    }

    .tracy-content {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .why-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        justify-items: center;
        text-align: center;
    }

    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-brand {
        grid-column: 1 / -1;
        justify-items: center;
        text-align: center;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */
@media (max-width: 768px) {
    /* Mobile Header - Compact Layout */
    .header-grid {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto;
        justify-items: initial;
        text-align: left;
        gap: var(--spacing-sm);
    }

    .header-logo {
        font-size: 24px;
    }

    .menu-toggle {
        display: flex;
        grid-column: 2;
        grid-row: 1;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        gap: var(--spacing-xs);
        padding: var(--spacing-md);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        grid-column: 1 / -1;
    }

    .header-nav.active {
        display: flex;
    }

    .header-nav-buttons {
        display: flex;
        flex-direction: row;
        gap: 10px;
        padding-top: var(--spacing-sm);
        border-top: 1px solid var(--color-border-light);
        margin-top: var(--spacing-sm);
        width: 100%;
    }

    .header-nav-buttons .btn {
        flex: 1;
        padding: 10px 20px;
        font-size: 16px;
        min-width: auto;
        max-width: 200px;
    }

    .header-buttons {
        display: none;
    }

    /* Mobile Hero Section */
    .hero-title {
        font-size: clamp(38px, 4.8vw, 72px);
    }

    .hero-chat-container {
        padding: var(--spacing-md);
    }

    .hero-chat-text h2 {
        font-size: 18px;
    }

    .hero-chat-text p {
        font-size: 16px;
    }

    .hero-input-container {
        flex-direction: row;
        padding: 12px 16px;
        gap: 8px;
    }

    .hero-input-container input {
        font-size: 14px;
    }

    .hero-input-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    /* Cards and Layout */
    .cards-row-3 {
        grid-template-columns: 1fr;
    }

    .cards-row-2 {
        grid-template-columns: 1fr;
    }

    /* Mobile Carousel - stack cards vertically */
    .therapist-carousel-track {
        grid-template-columns: 1fr;
    }

    .therapist-carousel-track[data-page="2"] {
        transform: translateX(0);
    }

    .carousel-btn {
        display: none;
    }

    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-disclaimer {
        text-align: center;
    }
}
