:root {
    --ui-primary: #0f6bff;
    --ui-primary-dark: #0a4fbe;
    --ui-accent: #1fb6a6;
    --ui-bg: #f3f7fc;
    --ui-text: #16233b;
    --ui-muted: #60708f;
    --ui-surface: #ffffff;
    --ui-shadow: 0 16px 40px rgba(12, 31, 66, 0.1);
    --ui-radius: 16px;
}

body {
    background: linear-gradient(180deg, #f7faff 0%, #eef5ff 100%);
    color: var(--ui-text);
}

.top-bar {
    position: relative;
    z-index: 1031;
    background: #0d2a5e;
    color: #e7efff;
    font-size: 0.9rem;
}

.top-bar-inner {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.top-bar p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.navbar {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(15, 107, 255, 0.1);
    padding: 10px 0;
}

.header .navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.navbar-brand {
    margin-right: 0;
    padding: 0;
}

.logo-image {
    width: clamp(112px, 10vw, 150px);
    height: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-menu .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #17305b;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-menu .nav-link i {
    font-size: 0.9rem;
}

.nav-menu .nav-link:hover,
.nav-menu .nav-link.active {
    color: var(--ui-primary-dark);
    background: rgba(15, 107, 255, 0.09);
}

.nav-item.dropdown.active > .dropdown-toggle,
.nav-item.dropdown .dropdown-item.active {
    color: var(--ui-primary-dark);
    background: rgba(15, 107, 255, 0.09);
}

.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    border: 1px solid rgba(15, 107, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 16px 32px rgba(8, 25, 64, 0.12);
    padding: 8px;
}

.dropdown-item {
    border-radius: 8px;
}

.dropdown-item:hover {
    background: rgba(15, 107, 255, 0.08);
}

/* Book Appointment in navbar: keep pill CTA readable on desktop + mobile */
.nav-menu .nav-link.appointment-btn {
    justify-content: center;
    gap: 10px;
    width: auto !important;
    min-width: 0;
    max-width: 100%;
    margin-left: 6px;
    border: none;
    text-decoration: none;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(15, 107, 255, 0.32);
}

.nav-menu .nav-link.appointment-btn:hover,
.nav-menu .nav-link.appointment-btn:focus-visible {
    color: #fff !important;
    transform: translateY(-2px);
}

.nav-menu .nav-link.appointment-btn::after {
    display: none !important;
}

.nav-menu .appointment-btn {
    color: #fff;
    padding-inline: 16px;
}

.nav-menu .appointment-btn.active {
    color: #fff !important;
    background: linear-gradient(90deg, var(--ui-primary), #1f8fff);
    box-shadow: 0 10px 25px rgba(15, 107, 255, 0.25);
}

.hamburger {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(15, 107, 255, 0.2);
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: #17305b;
    border-radius: 8px;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 28px rgba(7, 27, 62, 0.1);
}

#heroCarousel .carousel-item {
    height: clamp(420px, 78vh, 760px);
}

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

#heroCarousel .carousel-item picture img,
#heroCarousel .carousel-item > img {
    object-fit: cover;
    object-position: center;
    filter: saturate(1.05) contrast(1.04);
}

.hero .carousel-caption {
    max-width: 760px;
    margin-inline: auto;
    bottom: 13%;
    padding: 24px 28px;
    border-radius: var(--ui-radius);
    background: rgba(8, 28, 64, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--ui-shadow);
}

#heroCarousel .carousel-item:nth-child(2) img {
    object-position: center 35%;
}

#heroCarousel .carousel-item:nth-child(3) img {
    object-position: center 40%;
}

.hero .title {
    font-size: clamp(1.7rem, 4vw, 3rem);
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero .subtitle {
    color: #e8f0ff;
    margin-bottom: 20px;
}

.btn-primary,
.btn-secondary,
.appointment-btn {
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary,
.appointment-btn {
    background: linear-gradient(90deg, var(--ui-primary), #1f8fff);
    box-shadow: 0 10px 25px rgba(15, 107, 255, 0.25);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-primary:hover,
.btn-secondary:hover,
.appointment-btn:hover {
    transform: translateY(-2px);
}

.trust-strip {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.trust-grid {
    background: var(--ui-surface);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow);
    padding: 22px 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.trust-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.trust-item i {
    margin-top: 3px;
    color: var(--ui-primary);
    font-size: 1.2rem;
}

.trust-item h4 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.trust-item p {
    margin: 0;
    color: var(--ui-muted);
    font-size: 0.9rem;
}

.section-padding {
    padding-block: 84px;
}

.section-header {
    margin-bottom: 42px;
}

.section-title {
    color: #10213f;
    font-weight: 700;
}

.section-subtitle {
    color: var(--ui-muted);
}

.stat-card,
.service-card,
.doctor-card,
.testimonial-content,
.appointment-form,
.appointment-info {
    border-radius: var(--ui-radius);
    border: 1px solid rgba(15, 107, 255, 0.08);
    box-shadow: 0 14px 34px rgba(11, 37, 82, 0.08);
}

.service-card,
.doctor-card {
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.doctor-image img {
    border-radius: 14px 14px 0 0;
}

.gallery-img {
    border-radius: 14px;
    border: 1px solid rgba(16, 33, 63, 0.08);
}

.appointment {
    background: linear-gradient(180deg, #f5f9ff 0%, #edf4ff 100%);
}

.appointment-form h2,
.appointment-info h2 {
    color: #10213f;
}

.appointment-form,
.appointment-info {
    padding: 28px 26px;
    background: #fff;
}

.appointment-info {
    background: linear-gradient(165deg, #ffffff 0%, #f4f9ff 55%, #eef5ff 100%);
}

.appointment-form h2,
.appointment-info h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 10px;
}

.appointment-form > p {
    color: var(--ui-muted);
    margin-bottom: 22px;
    font-size: 0.95rem;
}

.appointment .info-points {
    margin-bottom: 22px;
}

.appointment .info-point {
    gap: 16px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(15, 107, 255, 0.1);
    background: rgba(255, 255, 255, 0.75);
    align-items: center;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.appointment .info-point:hover {
    border-color: rgba(15, 107, 255, 0.2);
    box-shadow: 0 8px 22px rgba(11, 37, 82, 0.06);
}

.appointment .info-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(15, 107, 255, 0.14), rgba(31, 182, 166, 0.12));
    border: 1px solid rgba(15, 107, 255, 0.12);
}

.appointment .info-icon i {
    color: var(--ui-primary);
    font-size: 1.1rem;
}

.appointment .info-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #10213f;
    margin-bottom: 6px;
}

.appointment .info-content p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--ui-muted);
    margin: 0;
}

.appointment .emergency-contact {
    margin-top: 8px;
    padding: 22px 20px;
    border-radius: var(--ui-radius);
    background: linear-gradient(135deg, #0f6bff 0%, #0850c4 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 14px 32px rgba(15, 107, 255, 0.35);
}

.appointment .emergency-contact h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: #fff;
}

.appointment .emergency-contact p {
    font-size: 1rem;
    font-weight: 600;
    color: #e8f2ff;
    margin: 6px 0;
}

.appointment .emergency-contact p a {
    color: #fff;
    text-decoration: none;
}

.appointment .emergency-contact p a:hover {
    text-decoration: underline;
}

/* Form plugin output inside appointment card */
.appointment-form :is(input, select, textarea) {
    border-radius: 10px;
    border-color: #c7d8f5;
}

.appointment-form :is(input, select, textarea):focus {
    border-color: #88b3ff;
    box-shadow: 0 0 0 0.2rem rgba(15, 107, 255, 0.15);
}

.appointment-form button[type="submit"],
.appointment-form input[type="submit"],
.appointment-form .btn-primary,
.appointment-form .ff-btn-submit {
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    background: linear-gradient(90deg, var(--ui-primary), #1f8fff) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(15, 107, 255, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.appointment-form button[type="submit"]:hover,
.appointment-form input[type="submit"]:hover,
.appointment-form .ff-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 107, 255, 0.35);
    color: #fff !important;
}

@media (max-width: 991px) {
    .appointment-form,
    .appointment-info {
        padding: 22px 18px;
    }

    .appointment .row > [class*="col-"] + [class*="col-"] {
        margin-top: 1.25rem;
    }
}

.footer {
    background: #0b1d3e;
}

.footer-description,
.footer p,
.footer li a {
    color: #c7d6f5;
}

.preloader {
    background:
        radial-gradient(circle at 20% 20%, rgba(31, 182, 166, 0.18), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(15, 107, 255, 0.22), transparent 45%),
        linear-gradient(135deg, #081c45 0%, #0b2f70 45%, #0e4696 100%);
}

.preloader-content {
    width: min(92vw, 440px);
    padding: 30px 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 45px rgba(3, 16, 43, 0.4);
}

.preloader-logo-wrap {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(255, 255, 255, 0.35);
    position: relative;
    isolation: isolate;
}

.preloader-logo-wrap::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #59d4ff;
    border-right-color: #8cd3ff;
    animation: loader-spin 1.1s linear infinite;
    z-index: -1;
}

.preloader-logo {
    width: 64px;
    height: auto;
}

.preloader-content::after {
    content: none !important;
    display: none !important;
}

.preloader h3 {
    margin-top: 20px;
    color: #f2f7ff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.preloader h3::after {
    content: "";
    display: block;
    width: 70px;
    height: 6px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #69ddff 0%, #4ba1ff 100%);
    animation: loader-pulse 1.4s ease-in-out infinite;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loader-pulse {
    0%,
    100% {
        transform: scaleX(0.65);
        opacity: 0.65;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
}

@media (max-width: 991px) {
    .navbar {
        padding: 8px 0;
    }

    .logo-image {
        width: 122px;
    }

    .hamburger {
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        z-index: 1102;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(84vw, 360px);
        height: 100vh;
        padding: 88px 18px 24px;
        background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
        border-left: 1px solid rgba(15, 107, 255, 0.15);
        box-shadow: -18px 0 35px rgba(7, 27, 62, 0.15);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        z-index: 1101;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 12px 14px;
        border: 1px solid rgba(18, 50, 96, 0.08);
        background: #fff;
    }

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

    .nav-item.dropdown .dropdown-menu {
        position: static;
        display: none;
        float: none;
        width: 100%;
        margin-top: 8px;
        margin-bottom: 8px;
        box-shadow: none;
        border: 1px solid rgba(15, 107, 255, 0.12);
    }

    .nav-item.dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding: 10px 12px;
    }

    .nav-menu .appointment-btn,
    .nav-menu .nav-link.appointment-btn {
        margin-top: 6px;
        margin-left: 0;
        width: 100% !important;
        max-width: 100%;
        white-space: normal;
        text-align: center;
        justify-content: center;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .trust-strip {
        margin-top: 24px;
    }

    .hero .carousel-caption {
        bottom: 7%;
        padding: 16px;
    }
}

@media (max-width: 767px) {
    #heroCarousel .carousel-item {
        height: 56vh;
        min-height: 340px;
        max-height: 520px;
    }

    #heroCarousel .carousel-item:nth-child(2) img,
    #heroCarousel .carousel-item:nth-child(3) img {
        object-position: center;
    }
}
