/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    /* This offsets the scroll position to account for your sticky header */
    scroll-padding-top: 100px; 
    
    /* Bonus: This makes the scrolling smooth instead of instantly jumping! */
    scroll-behavior: smooth; 
}
:root {
    --primary-color: #4d3ce7; /* A professional, calming teal/green */
    --secondary-color: #776bd4;
    --accent-color: #ff9800; /* Warm accent */
    --text-dark: #263238;
    --text-light: #546e7a;
    --bg-light: #f5f7f8;
    --white: #ffffff;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

/* Top Contact Banner */
.top-banner {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.top-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-banner-left,
.top-banner-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 300px;
    height: auto;
}

.nav-links {
    display: flex;
    gap: 1.5rem; /* Reduced gap slightly to fit more items */
    list-style: none;
}

.nav-links a {
    font-weight: 700; /* Made font thicker (from 500 to 600) */
    color: var(--text-dark);
    transition: color 0.3s ease;
}


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

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: inline-block;
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}
/* Hamburger Menu Button */
.hamburger {
    display: none; /* Hidden on desktop */
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    position: relative; /* <-- Added this */
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    position: absolute; /* <-- Changed to absolute */
    left: 0;
    transform-origin: center;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

/* Hamburger Animation */
.hamburger.active span:first-child { 
    transform: translateY(9px) rotate(45deg); 
}
.hamburger.active span:nth-child(2) { 
    opacity: 0; 
}
.hamburger.active span:nth-child(3) { 
    transform: translateY(-9px) rotate(-45deg); 
}

/* Mobile Menu Overlay */
.mobile-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--bg-light);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu ul li {
    margin-bottom: 1.5rem;
}

.mobile-menu ul a {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-dark);
}
/* Hero Section */
.hero {
    position: relative;
    color: var(--white);
    text-align: center;
    padding: 8rem 2rem;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fadeAnimation 15s infinite;
}

/* Delay each slide so they show up one after another */
.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 5s; }
.slide:nth-child(3) { animation-delay: 10s; }

/* Dark overlay so the white text is always readable */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 77, 64, 0.75); /* Teal tint */
    z-index: -1;
}

@keyframes fadeAnimation {
    0% { opacity: 0; transform: scale(1); }
    5% { opacity: 1; }
    33% { opacity: 1; }
    38% { opacity: 0; transform: scale(1.05); } /* Slight zoom effect */
    100% { opacity: 0; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/* NEW CSS RULE ADDED BELOW */
.hero h1 {
    font-size: 3.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-text-container {
    display: grid;
    grid-template-areas: "overlap";
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.hero-text {
    grid-area: overlap;
    margin: 0;
    opacity: 0;
    animation: fadeTextAnimation 15s infinite;
}

@keyframes fadeTextAnimation {
    0% { opacity: 0; }
    5% { opacity: 1; }
    33% { opacity: 1; }
    38% { opacity: 0; }
    100% { opacity: 0; }
}

/* Services Section */
.services {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.services h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-subtitle {
    color: var(--text-light);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Forces exactly 4 columns on desktop */
    gap: 2.5rem;
}

/* --- Flip Card Styles --- */
.service-card {
    background-color: transparent;
    perspective: 1000px; /* Gives the 3D depth effect */
    height: 320px; /* Fixed height is required for flip cards */
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d; /* Allows children to live in 3D space */
}

/* The flip trigger */
.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

/* Shared styles for front and back */
.service-card-front, .service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Hides the back of the element when turned around */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.25rem; /* Changed this from 2rem to 1.25rem */
    overflow: hidden;
}

/* Front of the card */
.service-card-front {
    background-color: var(--white);
    background-size: cover;
    background-position: center;
}

/* Semi-transparent overlay so text is readable over the image */
.front-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* CHANGED THIS LINE: */
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 1;
}

.front-content {
    position: relative;
    z-index: 2;
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.service-card-front h3 {
    font-size: 1.5rem;
    /* CHANGED THESE TWO LINES: */
    color: var(--white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    margin: 0;
}

/* Back of the card */
.service-card-back {
    color: var(--white);
    transform: rotateY(180deg); /* Starts flipped around */
}

/* Individual card background colors pulled from the logo */
.service-card:nth-child(1) .service-card-back { background-color: #0b1a8f; /* Dark Blue from CHANGE */ }
.service-card:nth-child(2) .service-card-back { background-color: #007b22; /* Green from CHIROPRACTIC */ }
.service-card:nth-child(3) .service-card-back { background-color: #00838f; /* Teal from CLINIC */ }
.service-card:nth-child(4) .service-card-back { background-color: #dc2626;  /* Orange from the flame */ }

.service-card .service-card-back h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.service-card .service-card-back p {
    color: var(--white); /* Changed to pure white to ensure it overrides */
    font-size: 0.95rem; /* Reduced slightly */
    line-height: 1.5;
    margin: 0; /* Ensures no extra spacing at the bottom */
    -webkit-font-smoothing: antialiased; /* Forces Chrome to render the text crisply in 3D */
}

.service-card p {
    color: var(--text-light);
}

/* About Section */
.about {
    background-color: var(--white);
    padding: 4rem 2rem;
}

.about-container {
     max-width: 1200px;
     margin: 0 auto;
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 4rem;
+    align-items: flex-start;  /* Add this line */
 }

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about-content h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
}

.features-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.features-list li::before {
    content: "✓";
    color: var(--accent-color);
    font-weight: bold;
}

/* Prices Section */
.prices {
    padding: 4rem 2rem;
    background-color: var(--bg-light);
    text-align: center;
}

.prices h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-top: 4px solid var(--secondary-color);
    /* We add "box-shadow" to the transition so the shadow animates smoothly too */
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}

.pricing-card:hover {
    transform: translateY(-12px); /* Makes the card lift higher than the previous -5px */
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); /* Adds a noticeable, soft shadow underneath */
}

.pricing-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* FAQ Section */
.faq {
    padding: 4rem 2rem;
    background-color: var(--white);
    text-align: center;
}

.faq h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    background-color: var(--bg-light);
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.faq-item summary {
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none; /* Remove default arrow */
    position: relative;
     transition: color 0.3s ease;
}

.faq-item summary:hover {
    color: var(--primary-color);
}

.faq-item summary::-webkit-details-marker {
    display: none; /* Remove default arrow in WebKit */
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-item p {
     padding: 0 1.5rem 1.5rem;
     color: var(--text-light);
+    text-align: justify;
 }

/* Testimonials */

.testimonials {
    padding: 4rem 2rem;
    background-color: var(--bg-light);
    text-align: center;
}

.testimonials h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}
.testimonial-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    font-style: italic;
    color: var(--text-light);
    font-size: 1.2rem;
    /* NEW: Hide by default and animate */
    display: none;
    animation: fadeEffect 0.5s;
}

/* NEW: Class to display current slide */
.testimonial-card.active {
    display: block;
}

/* NEW: Fade-in animation */
@keyframes fadeEffect {
    from { opacity: 0; }
    to { opacity: 1; }
}

.testimonial-author {
    margin-top: 1.5rem;
    font-weight: 600;
    font-style: normal;
    color: var(--text-dark);
}

/* NEW: Carousel Layout Styles */
.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.carousel-track {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.carousel-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    padding: 0 10px;
    user-select: none;
}

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

.carousel-indicators {
    text-align: center;
    margin-top: 1.5rem;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: var(--primary-color);
}

/* Contact Form Section */
.contact-section {
    padding: 4rem 2rem;
    background-color: var(--white);
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info-block h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info-block p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item {
    color: var(--text-dark); /* Changed from --text-light */
    font-size: 1.1rem;       /* Increased from 0.95rem */
    line-height: 1.6;
}

.detail-item strong {
    color: var(--primary-color); /* Changed from --text-dark to your theme color */
    display: inline-block;
    margin-bottom: 0.4rem;       /* Increased slightly from 0.25rem */
    font-size: 1.2rem;           /* Increased from 1.05rem */
}

.detail-item a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.detail-item a:hover {
    color: var(--secondary-color);
}

.detail-item.hours {
    grid-column: 1 / -1; /* Makes the hours span across both columns */
}

.map-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    background-color: #eee; /* placeholder color while loading */
}

.contact-form-block {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
    font-weight: 600;
}

.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* <-- ADD THIS NEW BLOCK HERE --> */
    .contact-details {
        grid-template-columns: 1fr;
    }
}
/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 4rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.25rem;
}

.footer-section p {
    color: #b0bec5;
    margin-bottom: 0.75rem;
}

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

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul a {
    color: #b0bec5;
    transition: color 0.3s ease;
}

.footer-section ul a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
    color: #90a4ae;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Switch to mobile menu earlier (at 1024px) to prevent menu items from crashing into the button */
    .nav-links, .desktop-btn {
        display: none; /* Hide desktop nav */
    }
    
    .hamburger {
        display: flex; /* Show hamburger button */
    }
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* Forces 2x2 grid on medium screens */
    }
    .about-container {
        grid-template-columns: 1fr;
    }
    .about-image {
        order: -1;
    }
}

   @media (max-width: 768px) {
    .top-banner-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    .heading {
        text-align: center;
    }
    .services-grid {
        grid-template-columns: 1fr; /* Forces 1 column on mobile screens */
    }
    .hero {
        padding: 5rem 1rem;
    }
    .hero-content {
        padding: 0 1.5rem; /* Adds extra padding on the sides for mobile */
    }
    /* ... rest of the code stays the same ... */
    
    .services, .about, .prices, .faq, .testimonials {
        padding: 2.5rem 1rem;
    }
}