/* 
  Kynesia Physio Rehab - Main Stylesheet
  Mobile-first, modern medical aesthetic.
*/

:root {
    /* Pamphlet Branding Colors */
    --primary: #4A154B;        /* Deep Plum / Purple */
    --primary-light: #6C2C6A;  
    --accent: #E91E63;         /* Crimson / Pink */
    --accent-light: #F06292;
    --bg-light: #f4f5f7;       /* Soft light gray background */
    --bg-white: #ffffff;
    
    /* Typography Colors */
    --text-main: #333333;
    --text-muted: #666666;
    
    /* Utility Variables */
    --transition-speed: 0.3s;
    --border-radius: 50px;     /* Pill shape border radius */
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 10px 20px rgba(74, 21, 75, 0.15), 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition-speed);
}

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

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

/* Layout Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--accent-light);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

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

/* Image Placeholders / Circular styles */
.placeholder-img {
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.circular-img-wrapper {
    border-radius: 50%;
    border: 5px solid var(--primary);
    overflow: hidden;
    padding: 3px;
    background-color: var(--bg-white);
    box-shadow: var(--box-shadow);
}

.circular-img-wrapper img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    position: absolute;
    text-align: center;
    padding: 1rem;
}

/* Header & Navbar */
.header {
    background-color: var(--bg-white);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: box-shadow var(--transition-speed);
}

.header.scrolled {
    box-shadow: var(--box-shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-img {
    height: 45px;
    width: auto;
    display: block;
}

.nav-links {
    display: none; /* Mobile first, hidden by default */
}

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

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    transition: all 0.3s ease-in-out;
}

/* Mobile Menu Active State */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    border-top: 1px solid var(--bg-light);
}

.nav-links.active a {
    padding: 1rem 2rem;
    font-weight: 500;
}

/* Hero Section */
.hero {
    margin-top: 70px; /* Offset for fixed header */
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--bg-white);
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--bg-white);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* Video Background Additions */
.video-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--primary); /* Fallback color for empty spaces */
}

.hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: contain; /* Ensures the entire video is visible */
    z-index: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(74, 21, 75, 0.75); /* Deep plum overlay with 75% opacity */
    z-index: 2;
}

.relative-content {
    position: relative;
    z-index: 3;
}

/* Services Section (Flexbox for perfect alignment) */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.service-card {
    background: var(--bg-white);
    border-radius: 20px;
    border: 2px solid var(--primary);
    overflow: visible;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    text-align: center;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-top: 50px;
    width: 100%;
    max-width: 350px; /* Ensures consistent sizing like a 3-column grid */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--accent);
}

.service-image {
    width: 150px;
    height: 150px;
    margin-top: -80px;
    margin-bottom: 1.5rem;
}

.service-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.service-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* About Section */
.about-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.about-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 6px solid var(--primary);
    box-shadow: var(--box-shadow);
    flex-shrink: 0;
    position: relative;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg-white);
}

.doctor-name {
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.credentials {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* Contact Section */
.contact-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.info-block {
    margin-bottom: 1.5rem;
}

.info-block h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-block p {
    color: var(--text-muted);
}

.contact-form-wrapper {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

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

/* Footer */
.footer {
    background-color: var(--primary);
    color: var(--bg-white);
    padding: 3rem 0 1rem;
}

.footer-map {
    margin-bottom: 2rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.footer-bottom p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* What We Do Section */
.what-we-do-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.what-we-do-content p {
    margin-bottom: 1.5rem;
}

/* Reviews Section */
.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.review-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    border: 1px solid #eaeaea;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info h4 {
    margin-bottom: 0.2rem;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.stars {
    color: #FFD700;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.review-text {
    font-style: italic;
    color: var(--text-muted);
}

/* Media Queries for Desktop */
@media (min-width: 768px) {
    .section {
        padding: 6rem 0;
    }
    
    .nav-links {
        display: flex;
        gap: 2rem;
        align-items: center;
    }
    
    .nav-links a {
        font-weight: 500;
    }

    .mobile-menu-btn {
        display: none;
    }
    
    .hero {
        padding: 8rem 0;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-container {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .about-content {
        flex: 1;
    }
    
    .contact-container {
        flex-direction: row;
    }
    
    .contact-info,
    .contact-form-wrapper {
        flex: 1;
    }
}

@media (min-width: 1024px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   FAQ Section
   ========================================= */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--transition-speed);
}

.faq-question:hover {
    background-color: #fcfcfc;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: #fafafa;
}

.faq-item.active .faq-answer {
    max-height: 300px; /* Safe height for content */
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    margin: 0;
    color: var(--text-muted);
}

/* =========================================
   WhatsApp Floating Button
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0px 6px 15px rgba(0,0,0,0.4);
    color: white;
}

/* =========================================
   Scroll Animations
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Social Links
   ========================================= */
.social-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bg-white);
    opacity: 0.9;
    font-weight: 500;
    font-size: 1.1rem;
    transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
    color: var(--accent-light);
    transform: translateY(-2px);
}
