/* ================= BASE STYLES ================= */
:root {
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #e3f2fd;
    --secondary: #34a853;
    --secondary-dark: #2e7d32;
    --accent: #ea4335;
    --accent-light: #ffebee;
    --light: #ffffff;
    --dark: #202124;
    --dark-gray: #5f6368;
    --gray: #9aa0a6;
    --light-gray: #e8eaed;
    --light-bg: #f8f9fa;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--light);
    position: relative;
    isolation: isolate;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: -20%;
    pointer-events: none;
    z-index: -3;
}

body::before {
    background:
        radial-gradient(circle at 16% 20%, rgba(26, 115, 232, 0.18) 0%, transparent 34%),
        radial-gradient(circle at 84% 24%, rgba(52, 168, 83, 0.14) 0%, transparent 32%),
        radial-gradient(circle at 52% 82%, rgba(234, 67, 53, 0.12) 0%, transparent 36%),
        linear-gradient(135deg, #f8fbff 0%, #f4f8fc 45%, #f7fbff 100%);
    animation: appBgDrift 24s ease-in-out infinite alternate;
}

body::after {
    z-index: -2;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0.35) 100%);
    mix-blend-mode: soft-light;
    animation: appBgSweep 16s linear infinite;
}

@keyframes appBgDrift {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1);
    }
    100% {
        transform: translate3d(2%, 1.5%, 0) scale(1.06);
    }
}

@keyframes appBgSweep {
    0% {
        transform: translateX(-8%);
        opacity: 0.55;
    }
    50% {
        transform: translateX(6%);
        opacity: 0.9;
    }
    100% {
        transform: translateX(-8%);
        opacity: 0.55;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

.section-padding {
    padding: 100px 0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--light);
    padding: 16px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--light);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: var(--primary);
    padding: 16px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--light);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: 42px;
    color: var(--dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-subtitle {
    color: var(--dark-gray);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* ================= PRELOADER ================= */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    background:
        radial-gradient(circle at 50% 35%, rgba(26, 115, 232, 0.14), transparent 45%),
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(92vw, 760px);
    padding: 20px;
    animation: loaderFadeIn 0.5s ease-out both;
}

.preloader-content::after {
    content: '';
    width: 52px;
    height: 52px;
    margin-top: 18px;
    border-radius: 50%;
    border: 4px solid rgba(26, 115, 232, 0.18);
    border-top-color: rgba(26, 115, 232, 0.95);
    border-right-color: rgba(66, 165, 245, 0.85);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.16);
    animation: loaderSpinner 0.95s linear infinite, loaderGlow 1.8s ease-in-out infinite;
}

.preloader h3 {
    font-size: clamp(20px, 2.1vw, 30px);
    color: var(--primary);
    margin-top: 20px;
    font-weight: 600;
    line-height: 1.35;
    text-shadow: 0 4px 14px rgba(26, 115, 232, 0.18);
}

.preloader-logo-wrap {
    width: clamp(180px, 26vw, 280px);
    height: clamp(180px, 26vw, 280px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-logo {
    width: clamp(150px, 22vw, 230px);
    height: clamp(150px, 22vw, 230px);
    object-fit: contain;
    position: relative;
    z-index: 1;
}

@keyframes loaderSpinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loaderGlow {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(26, 115, 232, 0.14);
    }
    50% {
        box-shadow: 0 10px 24px rgba(26, 115, 232, 0.28);
    }
}

@keyframes loaderFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= HEADER ================= */
.top-bar {
    background: var(--dark);
    color: var(--light);
    padding: 12px 0;
    font-size: 14px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    transition: all 0.3s ease;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-info {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info i {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--light);
    font-size: 14px;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Navbar Styles */
.navbar {
    padding: 0;
    background: var(--light);
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    transform: translateY(0);
}

.navbar.fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}
.logo-image{
    height: 50px;
    transition: var(--transition);
}
.navbar .container {
    padding: 15px 20px;
}

.navbar.scrolled {
    top: 0%;
    background: rgba(255, 255, 255, 0.98);
}

.navbar.scrolled .container {
    padding: 10px 20px;
}

.navbar.scrolled .logo i {
    font-size: 28px;
}

.navbar.scrolled .logo-text h2 {
    font-size: 22px;
}

.navbar.scrolled .appointment-btn {
    padding: 10px 20px;
    font-size: 14px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 32px;
    color: var(--primary);
    transition: var(--transition);
}

.logo-text h2 {
    font-size: 24px;
    margin: 0;
    color: var(--dark);
    line-height: 1;
    transition: var(--transition);
}

.logo-text p {
    font-size: 12px;
    color: var(--gray);
    margin: 0;
    line-height: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-gray);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.appointment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 222px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--light) !important;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.25);
    transition: var(--transition);
}

.appointment-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--light) !important;
}

.appointment-btn.active {
    color: var(--light) !important;
}

.appointment-btn::after {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 5px;
    border: none;
    background: none;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ================= DROPDOWN MENU ================= */
.nav-item.dropdown {
    position: relative;
}

/* Keeps the hover state stable while moving cursor to the menu */
.nav-item.dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 10px;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 4px;
}

.dropdown-arrow {
    font-size: 12px;
    transition: var(--transition);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    display: block;
    background: var(--light);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 220px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown-item {
    padding: 10px 14px;
    display: block;
    color: var(--dark-gray);
    font-weight: 500;
    white-space: nowrap;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateX(2px);
}

.dropdown-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.dropdown-item::after {
    display: none;
}

/* Show dropdown on hover */
.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-item.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-item.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-item.dropdown:focus-within .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-item.dropdown.active > .dropdown-toggle {
    color: var(--primary);
}

.nav-item.dropdown.active > .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-item.dropdown.active > .dropdown-toggle::after {
    width: 100%;
}

/* Remove hover effect from parent link */
.nav-item.dropdown:hover > a::after {
    width: 0;
}

/* ================= HERO ================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    background: var(--dark);
    margin-top: 45px;
}

#heroCarousel {
    height: 100%;
}

#heroCarousel .carousel-item {
    height: 100vh;
    min-height: 700px;
}

#heroCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: brightness(0.4);
}

#heroCarousel .carousel-item picture {
    display: block;
    width: 100%;
    height: 100%;
}

.mobile-carousel-url {
    display: none;
}

#heroCarousel .carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 800px;
}

.carousel-caption .title {
    font-size: 56px;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: var(--light);
}

.carousel-caption .subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.pulse-effect {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(26, 115, 232, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(26, 115, 232, 0);
    }
}

.carousel-indicators {
    bottom: 40px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    margin: 0 6px;
}

.carousel-indicators button.active {
    background: var(--light);
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
    opacity: 0.7;
    transition: var(--transition);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--primary);
    opacity: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--light);
    text-align: center;
    z-index: 10;
    opacity: 0.8;
}

.scroll-indicator span {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    letter-spacing: 2px;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--light);
    border-radius: 20px;
    margin: 0 auto;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--light);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* ================= PAGE HEADER ================= */
.page-header {
    padding: 120px 0;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: var(--dark);
    text-align: center;
    color: var(--light);
    margin-top: 45px; /* Adjust based on your top-bar height */
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* ================= STATS ================= */
.stats {
    background: var(--light-bg);
    padding: 80px 0;
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

.stat-card {
    background: var(--light);
    padding: 40px 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--primary);
}

.stat-card i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
}

.stat-card h3 {
    font-size: 42px;
    color: var(--dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.stat-card p {
    color: var(--dark-gray);
    font-size: 16px;
}

/* ================= ABOUT ================= */
.about-text h3 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--dark);
}

.about-text p {
    color: var(--dark-gray);
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.8;
}

.features-list {
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.feature-item i {
    color: var(--secondary);
    font-size: 18px;
}

.feature-item span {
    color: var(--dark);
    font-weight: 500;
}

.about-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.about-image {
    position: relative;
}

.image-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.image-container img {
    width: 100%;
    height: auto;
    transition: var(--transition-slow);
}

.image-container:hover img {
    transform: scale(1.05);
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: var(--light);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    animation: float 3s ease-in-out infinite;
}

.experience-badge span {
    display: block;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.experience-badge p {
    font-size: 14px;
    margin: 5px 0 0;
    opacity: 0.9;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ================= SERVICES ================= */
.services {
    background: var(--light-bg);
}

.service-card {
    background: var(--light);
    padding: 40px 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light), transparent);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary);
    transform: scale(1.1) rotate(5deg);
}

.service-icon i {
    font-size: 36px;
    color: var(--primary);
    transition: var(--transition);
}

.service-card:hover .service-icon i {
    color: var(--light);
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark);
}

.service-card p {
    color: var(--dark-gray);
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.ent-main-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ent-main-icons i {
    font-size: 18px;
    color: var(--primary);
    transition: var(--transition);
}

.service-card:hover .ent-main-icons i {
    color: var(--light);
}

.service-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.service-link:hover {
    gap: 10px;
    color: var(--primary-dark);
}

/* ================= SERVICE PAGE ================= */
.service-page .navbar.fixed-top {
    top: 0;
}

.service-page main {
    padding-top: 90px;
}

.service-page-hero {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: var(--light);
    padding: 100px 0 70px;
}

.service-page-hero-content h1 {
    font-size: 48px;
    margin: 15px 0;
}

.service-page-hero-content p {
    margin: 0;
    max-width: 700px;
    font-size: 18px;
    opacity: 0.95;
}

.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
}

.service-content-card,
.service-side-card {
    background: var(--light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 35px;
    height: 100%;
}

.service-content-card h2,
.service-content-card h3,
.service-side-card h3 {
    color: var(--dark);
}

.service-points {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

.service-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--dark-gray);
}

.service-points i {
    color: var(--primary);
    margin-top: 3px;
}

/* ================= DOCTORS ================= */
.doctors {
    background: var(--light-bg);
}

.doctor-card {
    background: var(--light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.doctor-image {
    height: 300px;
    overflow: hidden;
}

.doctor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.doctor-card:hover .doctor-image img {
    transform: scale(1.1);
}

.doctor-info {
    padding: 30px;
    text-align: center;
}

.doctor-info h4 {
    font-size: 22px;
    color: var(--dark);
    margin-bottom: 5px;
}

.doctor-info .specialization {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 5px;
}

.doctor-info .department {
    color: var(--dark-gray);
    margin-bottom: 20px;
    font-size: 14px;
}

.doctor-contact p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--dark-gray);
    margin-bottom: 8px;
    font-size: 14px;
}

.doctor-contact i {
    color: var(--primary);
}

/* ================= GALLERY ================= */
.gallery-img {
    height: 300px;
    object-fit: cover;
    object-position: center center;
    border-radius: var(--radius);
    transition: var(--transition);
}

.gallery-img:hover {
    transform: scale(1.02);
}

#galleryCarousel .carousel-control-prev,
#galleryCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 10px;
}

/* ================= TESTIMONIALS ================= */
#testimonialCarousel {
    padding: 20px 0;
}

.testimonial-content {
    background: var(--light);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.quote-icon {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-icon i {
    font-size: 24px;
    color: var(--primary);
}

.testimonial-text {
    font-size: 18px;
    color: var(--dark-gray);
    line-height: 1.8;
    margin-bottom: 30px;
    font-style: italic;
    padding-top: 20px;
}

.testimonial-author h4 {
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 5px;
}

.testimonial-author p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.rating {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.rating i {
    color: #ffc107;
    font-size: 18px;
}

/* ================= APPOINTMENT ================= */
.appointment {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.05), rgba(52, 168, 83, 0.05));
}

.appointment-form h2 {
    font-size: 36px;
    color: var(--dark);
    margin-bottom: 10px;
}

.appointment-form p {
    color: var(--dark-gray);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: var(--transition);
    background: var(--light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray);
}

.appointment-info h2 {
    font-size: 36px;
    color: var(--dark);
    margin-bottom: 30px;
}

.info-points {
    margin-bottom: 40px;
}

.info-point {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i {
    font-size: 22px;
    color: var(--primary);
}

.info-content h4 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 8px;
}

.info-content p {
    color: var(--dark-gray);
    font-size: 15px;
    line-height: 1.6;
}

.emergency-contact {
    background: var(--primary);
    color: var(--light);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
}

.emergency-contact h3 {
    font-size: 22px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.emergency-contact p {
    font-size: 20px;
    font-weight: 600;
    margin: 5px 0;
}

/* ================= FOOTER ================= */
.footer {
    background: var(--dark);
    color: var(--light);
    padding: 80px 0 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.footer-brand-image {
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.footer-logo i {
    font-size: 36px;
    color: var(--primary);
}

.footer-logo h3 {
    font-size: 24px;
    margin: 0;
    line-height: 1;
}

.footer-logo p {
    font-size: 14px;
    color: var(--gray);
    margin: 5px 0 0;
}

.footer-description {
    color: var(--gray);
    margin-bottom: 25px;
    line-height: 1.7;
}

.contact-details {
    margin-bottom: 25px;
}

.contact-details p {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--gray);
}

.contact-details i {
    color: var(--primary);
    margin-top: 5px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--gray);
    transition: var(--transition);
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.working-hours p {
    color: var(--gray);
    margin-bottom: 10px;
    font-size: 14px;
}

.working-hours strong {
    color: var(--light);
}

.newsletter {
    margin-top: 25px;
}

.newsletter h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--light);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 10px;
}

.footer-bottom .fa-heart {
    color: var(--accent);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ================= ANIMATIONS ================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 992px) {
    .section-padding {
        padding: 80px 0;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--light);
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px 40px 40px;
        gap: 20px;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* --- Mobile Dropdown --- */
    .nav-item.dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        background: var(--light-bg);
        border: 0;
        border-radius: 0;
        padding: 10px 10px 10px 20px;
        min-width: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none; /* Hidden by default on mobile */
        margin-top: 4px;
    }

    .nav-item.dropdown.open .dropdown-menu {
        display: block; /* Show when parent has .open class */
    }

    .nav-menu .appointment-btn {
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
        padding: 13px 16px;
        border-radius: 10px;
        justify-content: center;
    }

    .service-page-hero-content h1 {
        font-size: 36px;
    }

    .carousel-caption .title {
        font-size: 42px;
    }
    
    .navbar.fixed-top {
        top: 0;
    }

    .preloader-content {
        width: min(94vw, 560px);
        padding: 16px;
    }

    .preloader-logo-wrap {
        width: clamp(140px, 34vw, 210px);
        height: clamp(140px, 34vw, 210px);
    }

    .preloader-logo {
        width: clamp(120px, 30vw, 180px);
        height: clamp(120px, 30vw, 180px);
    }
}

@media (max-width: 576px) {
    .page-header { margin-top: 0; }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 36px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .contact-info {
        justify-content: center;
    }
    
    .carousel-caption .title {
        font-size: 36px;
    }
    
    .carousel-caption .subtitle {
        font-size: 18px;
    }

    .hero,
    #heroCarousel .carousel-item {
        min-height: 560px;
        height: 70vh;
    }

    .gallery-img {
        height: 220px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .section-padding {
        padding: 60px 0;
    }

    .hero,
    #heroCarousel .carousel-item {
        min-height: 480px;
        height: 65vh;
    }

    .gallery-img {
        height: 200px;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    .carousel-caption .title {
        font-size: 28px;
    }
    
    .carousel-caption .subtitle {
        font-size: 16px;
    }
    
    .top-bar {
        display: none;
    }
    
    .navbar.fixed-top {
        top: 0;
    }
    
    .hero {
        margin-top: 40px;
    }

    .preloader-content {
        width: 92vw;
        padding: 12px;
    }

    .preloader-logo-wrap {
        width: clamp(110px, 42vw, 160px);
        height: clamp(110px, 42vw, 160px);
    }

    .preloader-logo {
        width: clamp(95px, 36vw, 140px);
        height: clamp(95px, 36vw, 140px);
    }

    .preloader h3 {
        font-size: clamp(16px, 4.2vw, 20px);
        margin-top: 14px;
    }
}

/* ================= NAVBAR + HOME UI RESPONSIVE FIXES ================= */
.navbar .container {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-image {
    display: block;
    height: 52px;
    width: auto;
}

.nav-menu {
    gap: 20px;
}

.nav-menu a {
    font-size: 15px;
}

.appointment-btn {
    width: auto;
    min-width: 205px;
}

@media (max-width: 1200px) {
    .nav-menu {
        gap: 14px;
    }

    .nav-menu a {
        font-size: 14px;
        gap: 6px;
    }

    .appointment-btn {
        min-width: 186px;
        padding: 11px 18px;
    }
}

@media (max-width: 992px) {
    .navbar .container {
        min-height: 70px;
        padding: 10px 16px;
    }

    .logo-image {
        height: 44px;
    }

    .nav-menu {
        width: min(88vw, 360px);
        right: -110%;
        padding: 90px 20px 24px;
        gap: 12px;
    }

    .nav-menu a {
        width: 100%;
        padding: 11px 4px;
        justify-content: flex-start;
    }

    .nav-item.dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        margin-top: 0;
        min-height: 620px;
    }

    #heroCarousel .carousel-item {
        min-height: 620px;
    }

    #heroCarousel .carousel-caption {
        width: min(92%, 760px);
    }

    .stat-card,
    .service-card,
    .doctor-card {
        margin-left: auto;
        margin-right: auto;
    }

    .service-card {
        max-width: 620px;
        padding: 28px 22px;
    }

    .doctor-image {
        height: 260px;
    }

    .testimonial-content {
        padding: 34px 26px;
        max-width: 100%;
    }

    #galleryCarousel .carousel-item .row {
        margin-left: -6px;
        margin-right: -6px;
    }

    #galleryCarousel .carousel-item .row > [class*="col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }

    #galleryCarousel .gallery-img {
        height: 210px;
    }
}

@media (max-width: 768px) {
    .hero,
    #heroCarousel .carousel-item {
        min-height: 540px;
        height: 76vh;
    }

    #heroCarousel .carousel-caption {
        top: 52%;
        width: 92%;
        padding: 0 8px;
    }

    .carousel-caption .title {
        font-size: clamp(30px, 6.2vw, 40px);
        margin-bottom: 14px;
        line-height: 1.2;
    }

    .carousel-caption .subtitle {
        font-size: clamp(15px, 3.5vw, 18px);
        margin-bottom: 24px;
        line-height: 1.5;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: min(100%, 320px);
    }

    .stats .col-md-3,
    .services .col-md-6,
    .doctors .col-md-4 {
        margin-bottom: 14px;
    }

    .stat-card {
        padding: 26px 14px;
    }

    .stat-card h3 {
        font-size: 34px;
    }

    .service-card {
        max-width: 100%;
        padding: 24px 18px;
    }

    .service-icon {
        width: 68px;
        height: 68px;
        margin-bottom: 18px;
    }

    .service-icon i {
        font-size: 28px;
    }

    .doctor-image {
        height: 240px;
    }

    .doctor-info {
        padding: 22px 16px;
    }

    .testimonial-content {
        padding: 30px 16px 22px;
    }

    .quote-icon {
        width: 48px;
        height: 48px;
        top: 18px;
        left: 16px;
    }

    .quote-icon i {
        font-size: 18px;
    }

    .testimonial-text {
        font-size: 16px;
        line-height: 1.65;
        margin-bottom: 18px;
    }

    #galleryCarousel .carousel-item .row {
        display: flex;
        flex-wrap: nowrap;
        margin-left: 0;
        margin-right: 0;
    }

    #galleryCarousel .carousel-item .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
    }

    #galleryCarousel .carousel-item .row > [class*="col-"]:not(:first-child) {
        display: none;
    }

    #galleryCarousel .gallery-img {
        height: 260px;
        border-radius: 12px;
    }

    #galleryCarousel .carousel-control-prev,
    #galleryCarousel .carousel-control-next,
    #testimonialCarousel .carousel-control-prev,
    #testimonialCarousel .carousel-control-next {
        width: 38px;
        height: 38px;
        margin: 0 8px;
        opacity: 0.95;
    }
}

@media (max-width: 576px) {
    .nav-menu {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.16);
    }

    .logo-image {
        height: 40px;
    }

    .hero,
    #heroCarousel .carousel-item {
        min-height: 500px;
        height: 74vh;
    }

    #heroCarousel .carousel-caption {
        top: 53%;
    }

    #heroCarousel .carousel-control-prev,
    #heroCarousel .carousel-control-next {
        display: none;
    }

    .carousel-indicators {
        bottom: 22px;
    }

    .stats .row,
    .services .row,
    .doctors .row {
        --bs-gutter-y: 12px;
    }

    .stat-card {
        padding: 22px 12px;
    }

    .stat-card i {
        font-size: 34px;
        margin-bottom: 12px;
    }

    .stat-card h3 {
        font-size: 28px;
    }

    .service-card h3 {
        font-size: 20px;
    }

    .service-card p {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .doctor-image {
        height: 215px;
    }

    #galleryCarousel .gallery-img {
        height: 220px;
    }

    #galleryCarousel .carousel-control-prev,
    #galleryCarousel .carousel-control-next,
    #testimonialCarousel .carousel-control-prev,
    #testimonialCarousel .carousel-control-next {
        width: 34px;
        height: 34px;
        margin: 0 6px;
    }
}

/* ================= TYPOGRAPHY TUNING (TABLET + MOBILE) ================= */
@media (max-width: 992px) {
    body {
        font-size: 15px;
    }

    .nav-menu a {
        font-size: 15px;
    }

    .appointment-btn {
        font-size: 14px;
    }

    .section-title {
        font-size: clamp(30px, 4.8vw, 40px);
    }

    .section-subtitle {
        font-size: clamp(15px, 2.2vw, 18px);
    }

    .carousel-caption .title {
        font-size: clamp(32px, 5.8vw, 44px);
    }

    .carousel-caption .subtitle {
        font-size: clamp(15px, 2.6vw, 19px);
    }

    .about-text h3,
    .appointment-form h2,
    .appointment-info h2 {
        font-size: clamp(28px, 4vw, 34px);
    }

    .service-card h3 {
        font-size: clamp(20px, 2.8vw, 24px);
    }

    .service-card p,
    .doctor-contact p,
    .info-content p,
    .working-hours p {
        font-size: 14px;
    }

    .doctor-info h4 {
        font-size: clamp(20px, 2.8vw, 23px);
    }

    .testimonial-text {
        font-size: clamp(15px, 2.4vw, 17px);
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .nav-menu a {
        font-size: 14px;
    }

    .appointment-btn {
        font-size: 13px;
    }

    .section-title {
        font-size: clamp(24px, 8vw, 30px);
    }

    .section-subtitle {
        font-size: 14px;
    }

    .carousel-caption .title {
        font-size: clamp(24px, 7.2vw, 32px);
    }

    .carousel-caption .subtitle {
        font-size: 14px;
        line-height: 1.45;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        font-size: 14px;
    }

    .about-text h3,
    .appointment-form h2,
    .appointment-info h2 {
        font-size: 24px;
    }

    .about-text p,
    .appointment-form p {
        font-size: 14px;
    }

    .service-card h3 {
        font-size: 18px;
    }

    .service-card p,
    .doctor-info .specialization,
    .doctor-info .department,
    .testimonial-author p,
    .footer-description,
    .footer-bottom {
        font-size: 13px;
    }

    .doctor-info h4,
    .testimonial-author h4 {
        font-size: 18px;
    }

    .testimonial-text {
        font-size: 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
    }
}

/* ================= CAROUSEL BUTTON + CONTENT OVERRIDES ================= */
.carousel-indicators {
    display: none !important;
}

#heroCarousel .carousel-caption {
    display: none !important;
}

.carousel-control-prev,
.carousel-control-next,
#galleryCarousel .carousel-control-prev,
#galleryCarousel .carousel-control-next,
#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    opacity: 0.96;
    box-shadow: 0 8px 18px rgba(26, 115, 232, 0.35);
}

.carousel-control-prev:hover,
.carousel-control-next:hover,
#galleryCarousel .carousel-control-prev:hover,
#galleryCarousel .carousel-control-next:hover,
#testimonialCarousel .carousel-control-prev:hover,
#testimonialCarousel .carousel-control-next:hover {
    background: linear-gradient(135deg, #34a853 0%, #1a73e8 100%);
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 1rem;
    height: 1rem;
}

@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next,
    #galleryCarousel .carousel-control-prev,
    #galleryCarousel .carousel-control-next,
    #testimonialCarousel .carousel-control-prev,
    #testimonialCarousel .carousel-control-next {
        width: 34px;
        height: 34px;
    }
}

/* ================= CAROUSEL IMAGE RENDERING FIX ================= */
#heroCarousel .carousel-item img {
    filter: brightness(0.45) !important;
    object-fit: cover;
    object-position: center center;
    background: transparent;
}

#galleryCarousel .gallery-img {
    width: 100%;
    height: 250px !important;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center center;
    background: transparent;
}

@media (max-width: 768px) {
    #heroCarousel .carousel-item img {
        object-position: center top;
    }

    #galleryCarousel .gallery-img {
        aspect-ratio: 4 / 3;
    }

    .mobile-carousel-url {
        display: block;
        position: absolute;
        top: 12px;
        left: 12px;
        z-index: 12;
        margin: 0;
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 12px;
        color: #fff;
        background: rgba(0, 0, 0, 0.55);
    }
}
