/* --- Global Styles & Variables --- */
:root {
    --primary-blue: #2B82C3; /* Extracted from logo */
    --primary-green: #5EAD4B; /* Extracted from logo */
    --heading-text: #1E293B; /* Dark blue-gray for text */
    --body-text: #333333;
    --background-light: #EAF2F8; /* A slightly more pronounced light blue for gradient */
    --background-white: #FFFFFF;
    --background-gray: #f1f5f9; /* Light gray for the bottom of the gradient */
    --border-color: #E2E8F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--body-text);
    background: linear-gradient(180deg, var(--background-light) 0%, var(--background-white) 50%, var(--background-gray) 100%);
    line-height: 1.7;
    font-weight: 400;
}

h1, h2, h3, h4 {
    font-family: 'DM Serif Display', serif;
    color: var(--heading-text);
    font-weight: 400;
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.25rem; margin-bottom: 2rem; text-align: center; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; }
a { color: #2b82c3; text-decoration: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}

.page-section {
    display: none; /* Hide sections acting as pages by default */
    padding-top: 150px; /* Add padding for absolute header */
}

/* --- PRELOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- HEADER & NAVIGATION --- */
.main-header {
    padding: 15px 0;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: transparent;
}

.main-header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 30px;
}

.logo {
    justify-self: start;
}

.main-nav {
    justify-self: center;
}

.nav-cta {
    justify-self: end;
}

.logo img {
    height: 120px;
    width: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--heading-text);
    transition: all 0.3s ease;
    padding: 8px 18px;
    border-radius: 50px;
    border: 2px solid transparent;
    display: inline-block;
    white-space: nowrap;
}

.main-nav a:not(.nav-cta):hover, .main-nav a.active {
    color: var(--primary-blue);
    background-color: var(--background-white);
}

.nav-cta {
    background-color: var(--primary-blue);
    color: var(--background-white) !important;
    padding: 10px 22px;
    border-radius: 50px;
    animation: pulse 2s infinite;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-cta:hover {
    background-color: #226da8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ADDED RULE: Hide mobile-only CTA on desktop */
.mobile-only-cta {
    display: none;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex !important;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle svg {
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    background-color: var(--background-white);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 200px;
    z-index: 1000;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    padding: 10px 20px;
    display: block;
    width: 100%;
    text-align: left;
    border-radius: 0;
}

.dropdown-menu li a:hover {
    background-color: #eef6fc;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(43, 130, 195, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(43, 130, 195, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(43, 130, 195, 0);
    }
}

.mobile-nav-toggle {
    display: none;
    z-index: 1001;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--heading-text);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

.mobile-nav-toggle.is-active .icon-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-nav-toggle.is-active .icon-bar:nth-child(2) {
    opacity: 0;
}
.mobile-nav-toggle.is-active .icon-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- FLOATING CTA BUTTON --- */
.floating-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background-color: var(--primary-blue);
    color: var(--background-white);
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-weight: 700;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(150%);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
    animation: pulse 2s infinite 1s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-cta.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- HERO SECTION --- */
.hero {
    padding-top: 180px; /* Increased padding */
    padding-bottom: 100px;
    background-color: transparent;
    text-align: center; /* Center align all content */
}

.hero-text {
    margin-bottom: 50px; /* Increased margin */
}

.hero h1 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    /* IMPROVED: Fluid font scaling */
    font-size: clamp(2.5rem, 8vw, 5rem); 
    line-height: 1.4;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-main-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
    margin-top: 0; /* Removed negative margin */
}
.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-image-wrapper {
    width: 450px;
    height: 450px;
    border-radius: 50%;
    overflow: hidden;
    padding: 10px;
    background: linear-gradient(145deg, #2b82c30f, #5ead4b8f);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    animation: subtle-pulse 8s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero-detail-item {
    text-align: center;
}

.hero-detail-item h4 {
    margin-bottom: 10px;
}

/* --- WHY CHOOSE US SECTION --- */
#why-choose-us {
    background-color: transparent;
}
.slider-container {
    position: relative;
}
.slider-viewport {
    overflow: hidden;
    margin: 40px 0;
}
.why-choose-us-points {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(33.333% - 14px);
    gap: 20px;
    transition: transform 0.5s ease-in-out;
}
.point-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    background:linear-gradient(40deg, #cfeaff8a, #e5ecf91a 50%, #cfeaff8a);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.point-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.point-card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}
.point-card h4 {
    margin-bottom: 5px;
    font-weight: bolder;
}
.slider-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
.slider-btn {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}
.slider-btn:hover:not(:disabled) {
    background-color: var(--primary-blue);
    color: white;
}
.slider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- SERVICES SECTION --- */
#services {
    background-color: transparent;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: var(--background-white);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card-content {
    padding: 20px;
    background:linear-gradient(40deg, #44947e2e, #e5ecf91a 50%, #44947e2e);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-card-content p {
    flex-grow: 1;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.service-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-top: 15px;
    text-align: center;
    align-self: auto;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--primary-blue);
    border-radius: 20px;
}
.btn-sm .arrow {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.btn-sm:hover .arrow {
    opacity: 1;
    transform: translateY(-2px);
}


/* --- ABOUT & NEW PATIENT SECTIONS --- */
#about, #new-patient, #patient-info, #privacy, #fees {
    background-color: transparent;
}
.about-intro, .info-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.about-intro {
    text-align: center;
    margin-bottom: 50px;
}
.about-intro .subheading {
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    display: block;
}
.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.team-member {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.team-member-image {
    flex: 0 0 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.team-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-member-info h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
}
.team-member-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 10px;
}
.team-member-info p {
    font-size: 0.95rem;
    margin-bottom: 0;
}
.about-outro {
    text-align: center;
    max-width: 800px;
    margin: 40px auto 0 auto;
    font-style: italic;
}

.fee-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}
.fee-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--background-white);
}
.fee-table th, .fee-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.fee-table th {
    background-color: var(--primary-blue);
    color: var(--background-white);
    font-weight: 600;
}
.fee-table tbody tr:nth-child(even) {
    background-color: var(--background-gray);
}
.fee-table tbody tr:hover {
    background-color: #eef6fc;
}

/* --- NEWS SECTION --- */
#news {
    background-color: transparent;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.news-card {
    background-color: var(--background-white);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.news-date {
    font-size: 0.9rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

/* --- TESTIMONIALS --- */
#testimonials {
    background-color: transparent;
}
.testimonial-card {
    background-color: var(--background-white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    border-left: 5px solid var(--primary-blue);
}
.testimonial-card p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.testimonial-card .author {
    font-weight: 700;
    color: var(--heading-text);
}

/* --- CONTACT SECTION --- */
#contact {
     background-color: transparent;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}
.contact-info ul {
    list-style: none;
}
.contact-info li {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}
.contact-info li strong {
    margin-right: 10px;
    color: var(--heading-text);
}
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.contact-form {
    background: linear-gradient(40deg, #cfeaff8a, #e5ecf91a 50%, #cfeaff8a);
    padding: 30px;
    border-radius: 12px;
}
.contact-form .form-group {
    margin-bottom: 20px;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: inherit;
}
.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}
.contact-form button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s ease;
}
.contact-form button:hover {
    background-color: #226da8;
}

/* --- FOOTER --- */
.main-footer {
    background-color: var(--heading-text);
    color: var(--background-light);
    padding: 40px 0;
    text-align: center;
}
.footer-nav {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.footer-nav a {
    color: var(--background-white);
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}
.footer-nav a:hover {
    text-decoration: underline;
}
.main-footer p {
    margin-bottom: 0.5rem;
}

/* --- ANIMATION STYLES --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.emergency-notice {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.emergency-notice p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background-color: #d9534f;
    padding: 15px 25px;
    border-radius: 50px;
    display: inline-block;
    animation: pulse-red 2s infinite;
    box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.7);
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(217, 83, 79, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(217, 83, 79, 0);
    }
}

/* --- RESPONSIVE STYLES --- */
@media (max-width: 992px) {
    .main-header {
        padding: 15px 0;
    }
    .main-header .container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center; /* This will center the logo now */
        position: initial;
        gap: 17px;
        align-content: center;
        flex-wrap: nowrap;
    }

    .logo {
        order: 1;
    }
    
    .nav-cta {
        display: none; /* This hides the "Book Appointment" button */
    }

    /* ADDED RULES for mobile CTA */
    .mobile-only-cta {
        display: block;
        margin-bottom: 0;
    }

    .mobile-only-cta .nav-cta {
        display: inline-block;
        width: auto;
        font-size: 1.5rem;
        animation: none;
    }

    .mobile-nav-toggle {
        display: block;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
    }

    .main-nav {
        transform: translateX(100%);
        display: none;
    }

    .main-nav.is-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--background-white);
        justify-content: flex-start;
        padding-top: 120px;
        align-items: center;
        transform: translateX(0);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        overflow-y: auto; /* Added for scrollability */
    }

    .main-nav.is-active ul {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav.is-active a {
        font-size: 1.5rem;
        padding: 10px 25px;
    }

    .main-nav .dropdown-toggle {
        display: none !important;
    }

    .dropdown-menu {
        display: contents;
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
        min-width: unset;
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .dropdown-menu li a {
        font-size: 1.8rem;
        color: var(--heading-text);
        padding: 10px 25px;
        text-align: center;
    }
    
    .page-section {
        padding-top: 150px; /* Adjusted padding */
    }
    
   
    .hero-text {
        margin-bottom: 20px; 
    }
    
    /* REMOVED: Redundant h1 font-size rule */

    .why-choose-us-points {
        grid-auto-columns: calc(50% - 10px);
    }
    .hero-main-content {
        grid-template-columns: 1fr;
        margin-top: 0;
    }
}
@media (max-width: 768px) {
    h2 { font-size: 1.8rem; }
    section { padding: 40px 0; }
    .page-section {
        padding-top: 120px;
    }
    .hero { padding-top: 120px; }
    
    /* REMOVED: Redundant h1 font-size rule */
    
    .hero-content-wrapper {
        flex-direction: column;
    }
    .hero-image-container {
        width: 100%;
        height: 300px;
    }
    .hero-image-wrapper {
        width: 250px;
        height: 250px;
    }
    
   .about-content, .team-grid, .contact-grid, .news-grid {
        grid-template-columns: 1fr;
    }
   .about-intro, .team-member, .about-outro {
       text-align: left;
   }
   .team-member {
       align-items: flex-start;
   }
    .about-image {
        flex: 0 0 250px;
        height: 250px;
    }
    .why-choose-us-points {
        grid-auto-columns: 100%;
    }
    .hero-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
@keyframes tada {
    0% {transform: scale(1);}
    10%, 20% {transform: scale(0.95) rotate(-3deg);}
    30%, 50%, 70%, 90% {transform: scale(1.05) rotate(3deg);}
    40%, 60%, 80% {transform: scale(1.05) rotate(-3deg);}
    100% {transform: scale(1) rotate(0);}
  }