:root {
    --primary-navy: #152758;
    --secondary-navy: #1e3a8a;
    --light-navy: #1e3a8a;
    --accent-gold: #facc15;
    --accent-teal: #0fa7bb;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

.fixed-appointment-btn {
    position: fixed;
    bottom: 14%;
    right: 0;
    transform: translateY(-50%);
    width: 55px;
    height: 220px;
    background: linear-gradient(135deg, var(--accent-teal), #06548f);
    border-radius: 12px 0 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 2px 0 15px rgba(15, 167, 187, 0.4);
    border: 4px solid white;

    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.fixed-appointment-btn:hover {
    width: 70px;
    background: linear-gradient(135deg, #0891b2, var(--accent-teal));
    color: white;
}

.fixed-appointment-btn i {
    font-size: 1.5rem;
    margin-bottom: 15px;
    transform: rotate(-90deg);
}

/* Adjusted main header positioning for sticky top header */
.main-header {
    background: transparent;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    transition: all 0.3s ease;
}
.main-header.scrolled {
    background: var(--white);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}
.main-header.scrolled .navbar-toggler > i {
    color: var(--primary-navy) !important;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-navy);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 24px;
    color: var(--primary-navy);
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-item:hover {
    background: var(--secondary-navy);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3);
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    margin: 0 15px;
    position: relative;
    transition: all 0.3s ease;
    padding: 10px 15px;
    font-size: 1.1rem;
}
.main-header.main-header.scrolled .navbar-nav .nav-link {
    color: var(--primary-navy) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-gold) !important;
}

/* Enhanced dropdown functionality with proper positioning */
.navbar .dropdown {
    position: static;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu {
    background: white;
    border: none;
    border-radius: 0;
    padding: 30px;
    width: 70vw;
    left: 50% !important;
    transform: translateX(-50%) translateY(-10px) !important;
    margin-top: 0;
    position: absolute !important;
    top: 100% !important;
    opacity: 0;
    transition: all 0.3s ease;
}

.dropdown-item {
    padding: 15px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: var(--light-navy);
    color: white;
    border-left-color: var(--accent-gold);
    transform: translateX(5px);
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background: var(--primary-navy);
    z-index: 9999;
    transition: left 0.4s ease;
    padding: 30px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: var(--primary-navy);
    max-width: 900px;
    padding: 0 20px;
    z-index: 1;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 25px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 35px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.text-primary-custom {
    color: var(--primary-navy);
}

.text-primary-custom:hover {
    color: var(--light-navy);
}

.btn-primary-custom {
    background: var(--accent-gold);
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary-custom:hover {
    background: #d97706;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.section {
    padding: 100px 0;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-navy);
    margin-bottom: 20px;
    position: relative;
}

.section-title h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-gold);
}

.section-title p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.card-custom {
    border: none;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    overflow: hidden;
    height: 100%;
    background: white;
}

.card-custom:hover {
    transform: translateY(-15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-custom .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-custom:hover .card-img-top {
    transform: scale(1.05);
}

.card-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(
        135deg,
        var(--light-navy),
        var(--secondary-navy)
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Enhanced medical services slider styles */
.medical-services-slider {
    position: relative;
}

.service-nav-container {
    padding: 10px;
    display: inline-block;
    margin: 0 auto;
}

.service-nav {
    margin: 0;
    flex-wrap: wrap;
    gap: 5px;
}

.service-nav-link {
    background: transparent;
    border: none;
    color: var(--primary-navy);
    font-weight: 600;
    padding: 15px 25px;
    border-radius: 50px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.service-nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--primary-navy),
        var(--secondary-navy)
    );
    transition: left 0.4s ease;
    z-index: -1;
}

.service-nav-link:hover::before,
.service-nav-link.active::before {
    left: 0;
}

.service-nav-link:hover,
.service-nav-link.active {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}

.service-cards-container {
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 500px;
}

.service-card {
    display: none;
    padding: 20px 40px;
    animation: fadeInSlide 0.6s ease-in-out;
}

.service-card.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.service-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(
        135deg,
        var(--light-navy),
        var(--secondary-navy)
    );
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.3);
}

.service-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-navy);
}

.service-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 8px 0;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.service-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: var(--accent-gold);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    margin: 0 3rem;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.service-nav-btn:hover {
    background: #d97706;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.4);
}

.service-nav-prev {
    left: -30px;
}

.service-nav-next {
    right: -30px;
}

/* Enhanced tabbed interface with modern styling */
.nav-pills .nav-link {
    background: transparent;
    border: 2px solid var(--primary-navy);
    color: var(--primary-navy);
    font-weight: 600;
    padding: 18px 35px;
    margin: 0 8px;
    border-radius: 50px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
}

.nav-pills .nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--primary-navy),
        var(--secondary-navy)
    );
    transition: left 0.4s ease;
    z-index: -1;
}

.nav-pills .nav-link:hover::before,
.nav-pills .nav-link.active::before {
    left: 0;
}

.nav-pills .nav-link:hover,
.nav-pills .nav-link.active {
    background: transparent;
    color: white;
    border-color: var(--primary-navy);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.3);
}

.tab-content {
    margin-top: 60px;
    padding: 50px;
    position: relative;
}

.tab-content::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 3px;
}

/* Redesigned emergency button with rotated text */
.emergency-btn {
    position: fixed;
    bottom: 1%;
    right: 0;
    width: 55px;
    height: 200px;
    background: linear-gradient(135deg, #dcbe26, #b97a1c);
    border-radius: 12px 0 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 2px 0 15px rgba(220, 38, 38, 0.4);
    border: 4px solid white;
    border-right: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transition: all 0.3s ease;
}
.emergency-btn:hover {
    width: 70px;
}

.emergency-btn span {
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.footer {
    background: var(--primary-navy);
    color: white;
    padding: 80px 0 30px;
}

.footer h5 {
    color: var(--accent-gold);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 0;
    display: inline-block;
}

.footer a:hover {
    color: var(--accent-gold);
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .btn-primary-custom {
        font-size: 0.8rem;
        padding: 12px 25px;
    }
    .fixed-appointment-btn {
        width: 50px;
        height: 180px;
    }
    .main-header {
        padding: 10px 0 !important;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }

    .section {
        padding: 50px 12px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .emergency-btn {
        right: 0px;
        width: 50px;
        height: 180px;
    }

    .service-nav-btn {
        display: none;
    }

    .service-card {
        padding: 30px 20px;
    }

    .service-nav-link {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .dropdown-menu {
        position: absolute !important;
        transform: none !important;
        left: 0 !important;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }

    .tab-content {
        padding: 10px;
    }
}
