/* 
   QAC Therapy Design System 
   Theme: Nature, Calm, Premium, Trusted
*/

:root {
    /* Color Palette */
    --primary-sage: #8DA399;
    --primary-sage-dark: #768a80;
    --secondary-beige: #F9F9F7;
    /* Slightly lighter for backgrounds */
    --accent-olive: #6B705C;
    --text-charcoal: #333333;
    --text-gray: #555555;
    --text-light: #888888;
    --white: #FFFFFF;
    --soft-border: rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Globals */
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --transition-speed: 0.3s;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-gray);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-charcoal);
    font-weight: 600;
    line-height: 1.25;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
}

.bg-light {
    background-color: var(--secondary-beige);
}

.bg-sage-light {
    background-color: rgba(141, 163, 153, 0.1);
}

.center-text {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 500;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-sage);
    color: var(--white);
    border: 1px solid var(--primary-sage);
}

.btn-primary:hover {
    background-color: var(--primary-sage-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--primary-sage);
    color: var(--primary-sage);
}

.btn-secondary:hover {
    background-color: var(--primary-sage);
    color: var(--white);
}

.btn-outline {
    color: var(--text-charcoal);
    border-bottom: 1px solid var(--text-charcoal);
    border-radius: 0;
    padding: 10px 0;
    margin-left: var(--spacing-md);
}

.btn-outline:hover {
    opacity: 0.7;
    margin-left: calc(var(--spacing-md) + 5px);
    /* Gentle slide */
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--soft-border);
    transition: padding 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    /* Adjust based on logo aspect ratio */
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-olive);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-links a:not(.btn) {
    font-size: 0.95rem;
    color: var(--text-charcoal);
    font-weight: 500;
}

.nav-links a:not(.btn):hover {
    color: var(--primary-sage);
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background-color: var(--text-charcoal);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: var(--spacing-xl);
    background-color: var(--secondary-beige);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--accent-olive);
    margin-bottom: var(--spacing-sm);
    line-height: 1.15;
}

.hero-subtext {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-md);
    max-width: 600px;
    color: var(--text-gray);
}

.hero-cta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Sections & Layout */
.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-olive);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-sage);
    opacity: 0.5;
}

.center-text .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-header {
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.text-content p {
    margin-bottom: var(--spacing-sm);
    font-size: 1.05rem;
}

/* Visual Placeholders */
.calm-shape {
    width: 100%;
    height: 400px;
    background: radial-gradient(circle at 70% 30%, var(--white), transparent),
        linear-gradient(135deg, #e0e6e3 0%, #d8dedb 100%);
    border-radius: 50% 40% 30% 70% / 60% 30% 70% 40%;
    opacity: 0.8;
    animation: morph 10s ease-in-out infinite;
}

@keyframes morph {
    0% {
        border-radius: 50% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 50% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.portrait-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    /* Ensures the photo fills the area beautifully without stretching */
    object-position: top center;
    /* Focus on the face */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--soft-border);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--soft-border);
    transition: var(--transition-speed);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(141, 163, 153, 0.3);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-olive);
}

.service-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.85rem;
}

.for-who {
    color: var(--text-light);
    font-style: italic;
}

.link-arrow {
    color: var(--primary-sage);
    font-weight: 600;
}

.link-arrow:hover {
    text-decoration: underline;
}

/* Process */
.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-md);
    text-align: center;
    margin-top: var(--spacing-md);
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-sage);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.step h4 {
    margin-bottom: 0.5rem;
}

.step-line {
    flex: 1;
    height: 1px;
    background-color: var(--primary-sage);
    margin-top: 25px;
    /* align with center of icon */
    opacity: 0.3;
}

/* Why Choose */
.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-sage);
    font-weight: bold;
}

.circle-graphic {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: conic-gradient(from 180deg at 50% 50%, #F5F5F0 0deg, #E8ECE9 180deg, #F5F5F0 360deg);
    margin: 0 auto;
}

/* CTA Section */
.cta-section {
    background-color: var(--accent-olive);
    color: var(--white);
}

.cta-section .section-title {
    color: var(--white);
}

.cta-section .section-title::after {
    background-color: var(--white);
}

.cta-text {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.big-btn {
    background-color: var(--white);
    color: var(--accent-olive);
    border: none;
    font-size: 1.1rem;
    padding: 18px 36px;
}

.big-btn:hover {
    background-color: #f0f0f0;
    color: var(--accent-olive);
}

/* Footer */
.footer {
    background-color: var(--secondary-beige);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid var(--soft-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-brand h3 {
    margin-bottom: 0.2rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: var(--spacing-sm);
}

/* Animations - fade up */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: var(--spacing-lg) 0;
    }

    .hero {
        padding-top: 100px;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-cta {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .btn-outline {
        margin-left: 0;
        border: none;
    }

    .grid-2-col {
        grid-template-columns: 1fr;
    }

    .reverse-mobile {
        display: flex;
        flex-direction: column-reverse;
    }

    .nav-links {
        display: none;
        /* Hide for now, toggle with JS will be added */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--white);
        padding: var(--spacing-md);
        box-shadow: var(--shadow-soft);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .step-line {
        display: none;
    }

    .process-steps {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .step-icon {
        margin: 0 auto 10px;
    }
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.testimonial-card {
    background: var(--white);
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 1px solid var(--soft-border);
    box-shadow: var(--shadow-soft);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card::before {
    content: '“';
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--primary-sage);
    opacity: 0.2;
    position: absolute;
    top: -10px;
    left: 10px;
    line-height: 1;
}

.testimonial-text {
    margin-bottom: var(--spacing-sm);
    color: var(--text-gray);
    position: relative;
    z-index: 1;
    font-style: italic;
    font-size: 0.95rem;
}

.about-img_qac {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 450px;
    border-radius: var(--border-radius-lg);
    /* box-shadow: var(--shadow-soft); */
    mix-blend-mode: multiply;
    /* Optional: helps blend if the image has a white bg on a coloured background */
}

/* Gallery Marquee */
.gallery-section {
    padding-bottom: var(--spacing-lg);
    overflow: hidden;
}

.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: var(--spacing-md) 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    /* Gentle fade on edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    /* gap: var(--spacing-md); Removed for safer calculation */
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
    padding-left: var(--spacing-md);
    /* Initial offset padding */
}

.marquee-track:hover {
    animation-play-state: paused;
}

.gallery-item {
    flex: 0 0 auto;
    width: 300px;
    height: 220px;
    margin-right: var(--spacing-md);
    /* Use margin instead of gap */
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: transform var(--transition-speed);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    z-index: 2;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Move by 25% of the total width (since we have 4 indentical sets, 
           moving 1/4th of the way brings Set 2 to the start position) */
        transform: translateX(-25%);
    }
}

/* Mobile Tweak for gallery */
@media (max-width: 768px) {
    .gallery-item {
        width: 250px;
        height: 180px;
    }
}

/* Why Image styling */
.why-img {
    width: 100%;
    max-width: 400px;
    /* Keep it from getting too huge */
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    margin: 0 auto;
    display: block;
    object-fit: cover;
}