/* Fonts */
/* Helvetica is a standard font, no import needed usually, but we fallback */
:root {
    /* New Color Palette */
    --primary-color: #29489e;
    /* Sapphire Blue */
    --secondary-color: #9cd0f1;
    /* Sky Blue */
    --accent-color: #fff9f0;
    /* White/Cream */
    --alt-yellow: #fbb03a;
    --alt-lilac: #cbacd2;

    --text-color: #333;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);

    --font-main: 'Helvetica', 'Arial', sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: #000;
    /* Set all text to black */
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
    /* Regular for body text for readability */
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
nav a {
    font-weight: 700;
    /* Bold for headers as requested */
}

/* ... existing styles ... */

/* Accordion Styles */
.accordion-section {
    max-width: 800px;
    margin: 2rem auto;
}

.accordion-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

details {
    background: #fff;
    margin-bottom: 1.5rem;
    /* Increased spacing */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

summary {
    padding: 1.5rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-color);
}

/* Style the heading inside the summary to look consistent */
summary h2 {
    margin: 0;
    font-size: 1.8rem;
    display: inline-block;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 2rem;
    font-weight: 300;
    transition: transform 0.3s;
    color: var(--primary-color);
}

details[open] summary::after {
    transform: rotate(45deg);
}

.details-content {
    padding: 0 2rem 2rem;
    color: #000;
}

.details-content ul {
    list-style: none;
    padding: 0;
}

.details-content li {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.details-content li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.details-content h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Online Therapy Banner */
.online-therapy {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--alt-lilac);
    /* Changed to Lilac as requested */
    border-radius: 12px;
}

/* FAQ Specific Styles */
.faq-page summary {
    padding: 0.75rem 1.5rem;
    /* Half vertical padding for compact look */
    min-height: auto;
    transition: all 0.3s ease;
}

.faq-page details {
    margin-bottom: 0.8rem;
    /* Slightly reduced margin between closed cards */
}

.faq-page summary h2 {
    color: var(--primary-color);
    /* Sapphire Blue */
    font-size: 1.1rem;
    /* Smaller font for closed state (~half size visual impact) */
    transition: all 0.3s ease;
}

/* Expand to original size when open */
.faq-page details[open] summary {
    padding: 2rem 1.5rem;
    /* Increased padding */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 100px;
    /* Set a consistent min-height */
    display: flex;
    align-items: center;
}

.faq-page details[open] summary h2 {
    font-size: 1.8rem;
    /* Original size */
}

.faq-page .details-content {
    padding: 2rem;
    /* Added vertical padding as requested */
    min-height: 100px;
    /* Matching height with summary when open */
    display: flex;
    align-items: center;
}

.faq-page details[open] {
    margin-bottom: 1.5rem;
    /* Original margin */
}

.online-therapy h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Crisis Resource Grid */
.crisis-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.crisis-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    border-left: 4px solid var(--primary-color);
}

.crisis-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.2rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crisis-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.crisis-details {
    text-align: right;
    max-width: 300px;
}

.crisis-hours {
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--primary-color);
}

.crisis-desc {
    font-size: 0.95rem;
    color: #555;
}

@media (max-width: 600px) {
    .crisis-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .crisis-details {
        text-align: left;
    }
}

/* Testimonials */
.testimonials-section {
    margin: 4rem 0;
}

.testimonials-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.testimonials-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding-bottom: 2rem;
    /* Space for scrollbar if visible, or aesthetics */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.testimonials-grid::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.testimonial-card {
    flex: 0 0 100%;
    /* Show one at a time on small screens */
    min-width: 300px;
    scroll-snap-align: center;
    /* Existing styles below will be merged or overridden if repeated, but we are replacing the grid definition */
    background: #f9f9f9;
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    font-style: italic;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
}

@media (min-width: 768px) {
    .testimonial-card {
        flex: 0 0 100%;
        /* Force 1 card at a time as requested */
        min-width: 100%;
        max-width: 100%;
        /* Ensure it doesn't overflow */
    }
}

.testimonial-card {
    background: var(--alt-lilac);
    /* Use Lilac */
    padding: 3rem 2rem;
    /* Increased vertical padding */
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    font-style: italic;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Center text */
    min-height: 200px;
    /* Ensure uniform height for centering */
}

.testimonial-card::before {
    content: '"';
    font-size: 4rem;
    color: var(--secondary-color);
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.3;
    font-family: serif;
}

.testimonial-card p {
    position: relative;
    z-index: 1;
    color: #444;
}

/* Background for Home Page */
body.home {
    background: url('assets/background.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Global Navigation */
header {
    background-color: #ffffff;
    width: 100%;
    display: flex;
    justify-content: space-between;
    /* Logo left, Nav right */
    align-items: center;
    padding: 0.5rem 2.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.logo-container img {
    height: 45px;
    /* Adjust as needed */
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
}

nav a {
    text-decoration: none;
    color: var(--primary-color);
    /* Changed from white to dark for white header */
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: none;
    /* Removed shadow */
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--secondary-color);
}

/* Reduced icon size to fit in line */
.social-icon-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Footer */
footer {
    background-color: #ffffff;
    padding: 0.5rem;
    text-align: center;
    width: 100%;
    margin-top: auto;
    font-size: 0.85rem;
    /* Slightly smaller text for better fit */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    /* Adjust gap */
    flex-wrap: wrap;
}

/* Mobile Nav Tweak */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    nav ul {
        gap: 1.5rem;
    }
}

/* Page Containers */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.page {
    background-color: var(--accent-color);
}

.container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    flex: 1;
    /* Grow to fill space */
}

/* Home Hero Section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Right align content box */
    text-align: right;
    /* Right align text inside box */
    color: var(--primary-color);
    /* Darker text for better visibility without box, or keep white if image is dark */
    padding: 2rem 4rem;
    background: url('assets/background.jpg') no-repeat center center/cover;
    /* Background moved here */
    overflow: hidden;
    /* Ensure image stays contained */
}

.hero-content {
    background: none;
    /* Removed black box */
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    max-width: 600px;
    /* Optional: Add text shadow if readability is an issue on the image */
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    /* Bolder for readability */
    color: #000;
    /* Force black */
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: #000;
    /* Force black */
}

/* Specific Page Styles */
.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.content-section {
    margin-bottom: 2rem;
}

.crisis-alert {
    border-left: 5px solid #d9534f;
    padding-left: 1.5rem;
    margin-top: 2rem;
}

.crisis-alert h3 {
    color: #d9534f;
    margin-bottom: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background-color: #1e4540;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Booking Page Layout */
.booking-container {
    display: flex;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
}

.booking-form-container {
    width: 100%;
    max-width: 600px;
    /* Limit width of the central column */
}

/* Image container styles - vertically stacked now */
.booking-image-container {
    max-width: 250px;
    /* Constrain image size */
    margin: 1rem auto;
    /* Center horizontally */
    display: flex;
    justify-content: center;
}

.booking-image-container img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    aspect-ratio: 1/1;
}

/* Portrait Image on About Page */
.portrait-container {
    text-align: center;
    margin: 2rem auto;
    display: flex;
    justify-content: center;
}

.portrait-container img {
    max-width: 150px;
    /* Reduced to ~1/3 size as requested */
    width: 100%;
    /* Responsive */
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Carousel Styles */
.carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    /* Space between buttons and grid */
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.carousel-btn {
    position: static;
    /* Sit in flow beside grid */
    transform: none;
    flex-shrink: 0;
    background: rgba(44, 95, 88, 0.1);
    /* Slight bg for visibility */
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Remove old positioning */
.prev-btn {
    left: auto;
}

.next-btn {
    right: auto;
}

.testimonials-grid {
    flex: 1;
    /* Take remaining space */
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding-bottom: 0;
    /* Remove padding that might push buttons */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: stretch;
    /* Ensure cards align */
}

/* ============================================
   MOBILE RESPONSIVE OPTIMIZATIONS
   ============================================ */

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {

    /* Hero Section */
    .hero {
        padding: 1rem 1.5rem;
    }

    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    .hero h2 {
        font-size: 1.2rem !important;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem !important;
    }

    /* Navigation - Keep Horizontal but Smaller */
    nav ul {
        gap: 0.4rem;
        flex-wrap: nowrap;
        justify-content: center;
        padding: 0;
        margin: 0;
    }

    nav a {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
        white-space: nowrap;
    }

    /* Logo */
    .logo-container img {
        height: 40px;
    }

    /* Page Title */
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Container Padding */
    .container {
        margin: 1rem auto;
        padding: 1rem;
        max-width: 95% !important;
        width: 95% !important;
        overflow-x: hidden;
    }

    /* Accordion Section */
    .accordion-section {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Testimonials Section */
    .testimonials-grid {
        gap: 1rem;
    }

    .testimonial-card {
        min-width: 100% !important;
        padding: 1.5rem 1rem;
    }

    /* Portrait Image on About Page */
    .portrait-container img {
        max-width: 120px;
    }

    /* Carousel Buttons */
    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    /* Footer */
    footer {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.75rem;
    }

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

    /* Accordion */
    summary {
        padding: 1rem;
    }

    summary h2 {
        font-size: 1.3rem;
    }

    /* FAQ Page */
    .faq-page summary h2 {
        font-size: 0.95rem;
    }

    .faq-page details[open] summary {
        min-height: 80px;
        /* Reduced for mobile */
        padding: 1rem 1.5rem;
    }

    .faq-page details[open] summary h2 {
        font-size: 1.3rem;
        /* Adjusted for mobile */
    }

    .faq-page .details-content {
        padding: 1.5rem;
        /* Reduced padding for mobile */
        min-height: 80px;
        /* Matching summary height */
    }

    /* Crisis Cards */
    .crisis-card {
        padding: 1rem;
    }

    .crisis-name {
        font-size: 1rem;
    }

    .crisis-number {
        font-size: 1rem;
    }

    /* Services Page */
    .booking-image-container {
        max-width: 200px;
    }

    .online-therapy {
        padding: 1.5rem;
    }

    .online-therapy h3 {
        font-size: 1.5rem;
    }
}

/* Tablet refinements */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 90% !important;
        padding: 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem !important;
    }
}

/* Landscape Mobile Devices */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 1rem 2rem;
    }

    .hero h1 {
        font-size: 2rem !important;
    }

    header {
        padding: 0.5rem 2rem;
    }

    .logo-container img {
        height: 40px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Increase tap targets */
    nav a {
        padding: 0.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .carousel-btn {
        min-width: 44px;
        min-height: 44px;
    }

    summary {
        min-height: 44px;
    }
}