/* ====== CSS Variables ====== */
:root {
    --primary: #5831a8; /* Deep purple */
    --primary-dark: #3f227b;
    --primary-light: #efeaf7;
    --secondary: #d1ead7; /* Soft mint green */
    --text-main: #2d3e50;
    --text-light: #5f748d;
    --white: #ffffff;
    --bg-main: #fcfdfd;
    --bg-dark: #141b2e; /* Deep dark blue for footer */
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 4px 20px rgba(0,0,0,0.04);
    --shadow-md: 0 15px 35px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 45px rgba(88, 49, 168, 0.25);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-round: 50px;
}

/* ====== Resets & Global ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography Utility */
.text-center { text-align: center; }
.section-title {
    font-size: 2.8rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-round);
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(88, 49, 168, 0.4);
}

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

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

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white) !important;
}

/* ====== Header ====== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 0.8rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo .logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-main);
}

.nav-menu .nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-item .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

.nav-item .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-item .nav-link:hover::after,
.nav-item .nav-link.active::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* ====== FOOTER REBUILD ====== */
.footer {
    background-color: var(--bg-dark); /* #141b2e */
    color: rgba(255, 255, 255, 0.7);
    padding: 6rem 0 3rem;
    font-size: 0.95rem;
}

.footer-top-cta {
    background: linear-gradient(135deg, rgba(88,49,168,0.1) 0%, rgba(209,234,215,0.05) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 5rem;
}

.footer-top-cta h2 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.footer-top-cta p {
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

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

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--white);
    display: block;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.brand-col .footer-desc {
    margin-bottom: 2rem;
    line-height: 1.8;
    max-width: 90%;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1.8rem;
    font-weight: 500;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.contact-col p {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.contact-col i {
    color: var(--primary);
    margin-top: 5px;
    font-size: 1.1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-legal a {
    margin-left: 1.5rem;
}

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

/* Responsive */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .btn-book,
    .btn-call {
        display: none;
    }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .footer-legal a { margin: 0 0.5rem; }
}

/* ====== HOME PAGE ====== */
.hero-section {
    padding: 12rem 0 6rem;
    background: linear-gradient(135deg, rgba(88,49,168,0.2) 0%, rgba(209,234,215,0.4) 100%);
    position: relative;
    overflow: hidden;
}
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}
.hero-content {
    flex: 1;
    max-width: 600px;
}
.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}
.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}
.hero-actions {
    display: flex;
    gap: 1.5rem;
}
.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}
.hero-image img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.section {
    padding: 6rem 0;
}
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

.treatments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}
.treatment-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.treatment-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}
.treatment-card-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md); /* Slightly curved boxes */
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.machine-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-md) !important;
}
.treatment-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.treatment-card:hover img {
    transform: scale(1.05);
}
.treatment-card h3 {
    color: var(--text-main);
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.reviews-section {
    background-color: var(--primary-light);
    text-align: center;
    overflow: hidden; /* Hide horizontal scroll from slider */
    padding: 6rem 0;
}
.review-slider-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 3rem;
}
.review-slider {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.review-slide {
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.review-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.review-stars {
    color: #eab308;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}
.review-quote {
    font-size: 1.5rem;
    font-style: italic;
    max-width: 800px;
    margin: 0 auto 2rem;
    font-family: var(--font-heading);
    line-height: 1.6;
}
.review-author {
    font-size: 1.1rem;
    color: var(--primary-dark);
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.slider-btn:hover {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}
.prev-btn { left: 0; }
.next-btn { right: 0; }

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 3rem;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(88, 49, 168, 0.4);
    cursor: pointer;
    transition: var(--transition);
}
.dot.active, .dot:hover {
    background: var(--primary);
    transform: scale(1.2);
}

.practice-section {
    background: url('../images/treatment_1.png') center/cover no-repeat;
    position: relative;
    padding: 8rem 0;
}
.practice-overlay {
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.4);
}
.practice-card {
    position: relative;
    background: var(--white);
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    z-index: 2;
}
.practice-stats {
    display: flex;
    justify-content: space-around;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.stat-item h4 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}
.stat-desc {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: center;
}
.resource-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.faq-section {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid #eee;
}
.faq-header {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.1rem;
}
.faq-icon {
    font-size: 1.25rem;
    color: var(--primary);
    transition: var(--transition);
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}
.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.faq-content {
    padding-bottom: 1.5rem;
    color: var(--text-light);
}

@media (max-width: 992px) {
    .hero-container { flex-direction: column; text-align: center; }
    .hero-actions { justify-content: center; }
    .treatments-grid { grid-template-columns: repeat(2, 1fr); }
    .practice-stats { flex-wrap: wrap; gap: 2rem; }
}
@media (max-width: 768px) {
    .treatments-grid, .resources-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 3rem; }
    .practice-card { padding: 2rem; }
}

/* ====== Glassmorphism Popup Modal ====== */
.booking-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.booking-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.booking-modal-content {
    background: rgba(255, 255, 255, 0.85); /* Increased opacity for professional contrast */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    overflow: hidden; /* Hide anything going beyond the rounded border */
}

/* The inner scrolling container */
.booking-modal-body {
    padding: 2.5rem;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 1.5rem; /* Space for the scrollbar */
}

/* Custom Scrollbar for Modal and Textarea */
.booking-modal-body::-webkit-scrollbar {
    width: 8px;
}
.booking-modal-body::-webkit-scrollbar-track {
    background: transparent;
    margin: 2rem 0; /* Keeps the scrollbar from touching the top and bottom edges */
}
.booking-modal-body::-webkit-scrollbar-thumb {
    background: rgba(88, 49, 168, 0.6); /* Primary color slightly transparent */
    border-radius: 8px;
}
.booking-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(63, 34, 123, 1); /* Primary dark color */
}

.booking-modal-body textarea::-webkit-scrollbar {
    width: 6px;
}
.booking-modal-body textarea::-webkit-scrollbar-track {
    background: transparent;
}
.booking-modal-body textarea::-webkit-scrollbar-thumb {
    background: rgba(88, 49, 168, 0.8);
    border-radius: 4px;
}

.booking-modal-overlay.active .booking-modal-content {
    transform: translateY(0);
}

.booking-modal-body h2 {
    color: var(--text-main); /* Changed from primary-dark to text-main for contrast */
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.booking-modal-body p {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.booking-modal-body .close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: var(--text-main);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 10;
}

.booking-modal-body .close-modal:hover {
    color: var(--primary);
}

.booking-modal-body .form-group {
    margin-bottom: 1rem;
}

.booking-modal-body .form-label, 
.booking-modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600; /* Increased font weight */
    color: var(--text-main);
    font-size: 0.95rem;
}

.booking-modal-body .form-control,
.booking-modal-body input,
.booking-modal-body select,
.booking-modal-body textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.15); /* Darker border for contrast */
    background: rgba(255, 255, 255, 0.8); /* Whiter background for clearer inputs */
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--text-main);
}

.booking-modal-body .form-control:focus,
.booking-modal-body input:focus,
.booking-modal-body select:focus,
.booking-modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff; /* Solid white focus */
    box-shadow: 0 0 0 3px rgba(88, 49, 168, 0.3);
}

.booking-modal-body .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.booking-modal-body textarea {
    resize: vertical;
    min-height: 80px;
}

/* ========================================= */
/* ====== COMPREHENSIVE MEDIA QUERIES ====== */
/* ========================================= */

.mobile-only {
    display: none;
}

/* Laptop / Tablets Landscape (Max 1200px) */
@media (max-width: 1200px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Tablets Portrait (Max 992px) */
@media (max-width: 992px) {
    .mobile-only {
        display: block;
        width: 100%;
    }
    .booking-modal-content {
        width: 95%;
    }
}

/* Large Mobile (Max 768px) */
@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }
    .hero-section {
        padding: 8rem 0 4rem;
    }
    .hero-content h1 {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .review-quote {
        font-size: 1.2rem;
        padding: 0 1rem;
    }
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .review-slider-wrapper {
        padding: 0 2rem;
    }
    .booking-modal-body .form-row {
        grid-template-columns: 1fr;
    }
    .booking-modal-body {
        padding: 1.5rem;
    }
    .booking-modal-body h2 {
        font-size: 1.6rem;
    }
    .practice-card {
        padding: 2rem 1rem;
    }
    .stat-item h4 {
        font-size: 2rem;
    }
}

/* Small Mobile (Max 480px) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.4rem;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .footer {
        padding: 4rem 0 2rem;
    }
    .footer-top-cta {
        padding: 2.5rem 1.5rem;
    }
    .footer-top-cta h2 {
        font-size: 1.8rem;
    }
    .slider-btn {
        display: none; /* Hide side arrows on very small screens, rely on dots/swipe */
    }
    .review-slider-wrapper {
        padding: 0;
    }
}

@media (max-width: 600px) {
    .booking-modal-body .form-row {
        grid-template-columns: 1fr;
    }
    .booking-modal-body {
        padding: 1.5rem;
    }
}

.btn-submit-popup {
    width: 100%;
    margin-top: 1rem;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}
