/* Tyrrell & Jones Pharmacy - Custom Styles */

:root {
    --medical-blue: #2C78FF;
    --pharmacy-green: #1FA774;
    --button-green: #0E4D2D;
    --light-gray: #F5F5F5;
    --dark-text: #1A1A1A;
    --gold: #D4AF37;
    --white: #FFFFFF;
}

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

body {
    font-family: 'Frutiger', 'Inter', 'Poppins', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
}

/* Header Styles */
.navbar {
    background-color: var(--white) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

body {
    padding-top: 76px;
}

.navbar-brand {
    font-weight: 600;
    color: #000000 !important;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.navbar-brand img {
    height: 65px;
    width: auto;
}

.navbar-nav .nav-item {
    position: relative;
    margin: 0 0.5rem;
}

.navbar-nav .nav-link {
    color: var(--dark-text) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
    position: relative;
}

/* Animated underline effect */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    background-color: var(--button-green);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateX(-50%);
    border-radius: 2px;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

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

.btn-book {
    background-color: var(--button-green);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-book:hover {
    background-color: #0a3d22;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(14, 77, 45, 0.4);
    color: var(--white);
}

/* Mobile Toggler Animation */
.navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    outline: none !important;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: none !important;
    background-color: var(--dark-text);
    height: 2px;
    width: 24px;
    margin: auto;
    display: block;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    background-color: var(--dark-text);
    height: 2px;
    width: 24px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    top: 8px;
}

/* Animated Hamburger State */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Location Search Section */
.location-search-section {
    min-height: calc(100vh - 76px);
    padding: 3rem 0 !important;
}

.location-search-box {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.location-search-box .input-group {
    border-radius: 10px;
    overflow: hidden;
}

.location-search-box .form-control {
    font-size: 1.1rem;
    padding: 1rem;
}

.location-search-box .btn-primary {
    background: var(--button-green);
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
}

.location-result-item {
    background: var(--white);
    transition: all 0.3s ease;
}

.location-result-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Location Selection Page */
.location-selection {
    min-height: 100vh;
    min-height: 100vh;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.location-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0;
}

/* Ensure grid layout for location containers */
#allLocations.row,
#resultsList.row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
}

#allLocations>.col-lg-4,
#resultsList>.col-lg-4,
#allLocations>.col-md-6,
#resultsList>.col-md-6 {
    display: flex;
    flex-direction: column;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-bottom: 0;
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 768px) {

    #allLocations>.col-md-6,
    #resultsList>.col-md-6 {
        width: 50% !important;
    }
}

@media (min-width: 992px) {

    #allLocations>.col-lg-4,
    #resultsList>.col-lg-4 {
        width: 33.333333% !important;
    }
}

.location-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.location-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--button-green), var(--pharmacy-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.location-card h3 {
    color: var(--dark-text);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.location-card p {
    color: #666;
    text-align: center;
    margin-bottom: 1.5rem;
}

.btn-select-location {
    background-color: var(--button-green);
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-select-location:hover {
    background-color: #0a3d22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 77, 45, 0.3);
    color: var(--white);
}

/* Hero Slider Section */
.hero-slider-section {
    position: relative;
    margin-top: 16px;
}

.hero-slide {
    position: relative;
    min-height: 600px;
    padding-top: 0;
}

.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%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 30px;
}

.carousel-control-next {
    right: 30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.carousel-indicators {
    bottom: 30px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.carousel-indicators button.active {
    background: var(--white);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--medical-blue) 0%, var(--pharmacy-green) 100%);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-explore {
    background-color: var(--button-green);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    transition: all 0.3s ease;
}

.btn-explore:hover {
    background-color: #0a3d22;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: var(--white);
}

/* Treatments Section */
.treatments-section {
    padding: 2rem 0 !important;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.treatment-card {
    background: transparent;
    border-radius: 0;
    padding: 2rem 1rem;
    box-shadow: none;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
    text-align: center;
}

.treatment-card:hover {
    transform: translateY(-5px);
    box-shadow: none;
    border: none;
}

.treatment-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--button-green), var(--pharmacy-green));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.treatment-icon-simple {
    font-size: 4rem;
    color: var(--medical-blue);
    margin-bottom: 1.5rem;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
}

.treatment-card:hover .treatment-icon-simple {
    color: var(--pharmacy-green);
    transform: scale(1.15);
}

.treatment-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.treatment-card p {
    color: #666;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.treatment-card a.text-primary {
    transition: all 0.3s ease;
    display: inline-block;
}

.treatment-card a.text-primary:hover {
    color: var(--pharmacy-green) !important;
    transform: translateX(5px);
}

.btn-treatment-book {
    background-color: var(--button-green);
    color: var(--white);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-treatment-book:hover {
    background-color: #0a3d22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 77, 45, 0.3);
    color: var(--white);
}

/* Why Choose Us Section */
.why-choose-section {
    padding: 5rem 0;
    background-color: var(--white);
}

.feature-box {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--button-green), var(--pharmacy-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2.5rem;
}

.feature-box h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.feature-box p {
    color: #666;
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background-color: var(--white);
}

.team-photo {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
}

/* Footer */
.footer {
    background-color: var(--dark-text);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer p,
.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--pharmacy-green);
}

.footer-location {
    margin-bottom: 1rem;
}

.footer-location strong {
    color: var(--gold);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--pharmacy-green);
    transform: translateY(-3px);
    color: var(--white) !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Treatment Detail Page */
.treatment-detail-hero {
    background: var(--white);
    color: var(--dark-text);
    padding: 4rem 0;
    margin-top: 16px;
}

.treatment-detail-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.treatment-detail-content {
    padding: 4rem 0;
}

.benefit-item {
    display: flex;
    align-items: start;
    margin-bottom: 1.5rem;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    background: var(--pharmacy-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-right: 1rem;
    flex-shrink: 0;
}

.price-box {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--medical-blue);
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

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

    .location-card {
        margin-bottom: 2rem;
    }

    /* Search Box Mobile Fixes */
    .location-search-box {
        padding: 1rem;
    }

    .location-search-box .btn-primary {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    .location-search-box .form-control {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

/* Pharmacy First Service Cards */
/* Pharmacy First & Private Service Cards */
.service-link-card {
    display: block;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    position: relative;
    text-decoration: none !important;
}

.service-link-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(31, 167, 116, 0.2);
    /* Subtle green border on hover */
}

.service-link-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0), rgba(31, 167, 116, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-link-card:hover::after {
    opacity: 1;
}

.service-link-card:hover i {
    transform: scale(1.2);
    color: var(--pharmacy-green) !important;
    filter: drop-shadow(0 4px 6px rgba(31, 167, 116, 0.2));
}

.service-link-card:hover h5 {
    color: var(--pharmacy-green) !important;
    text-decoration: none !important;
}

/* Pharmacy Details Section Refinement */
.pharmacy-details-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pharmacy-details-card:hover {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .1) !important;
}

.icon-wrapper {
    width: 32px;
    height: 32px;
    background-color: rgba(14, 77, 45, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


.decoration-circle {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(14, 77, 45, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.map-wrapper {
    min-height: 250px;
    background-color: #eee;
}

.info-item {
    transition: transform 0.2s ease;
}




/* Unified Premium Background for All Sections */
.premium-section-bg {
    margin-top: 0;
    margin-bottom: 0;
    padding: 6rem 0;
    /* Location Search Page Gradient */
    background: var(--white);
    color: var(--dark-text);
    /* White text for contrast */
    position: relative;
    overflow: hidden;
}

/* Ensure headings and text inside are white */
.premium-section-bg h1,
.premium-section-bg h2,
.premium-section-bg h3,
.premium-section-bg h4,
.premium-section-bg h5,
.premium-section-bg h6,
.premium-section-bg p,
.premium-section-bg .section-title,
.premium-section-bg .section-subtitle,
.premium-section-bg .feature-icon i {
    color: var(--dark-text) !important;
}

/* ...BUT reset to dark for content inside white cards */
.premium-section-bg .card *,
.premium-section-bg .bg-white *,
.premium-section-bg .pharmacy-details-card *,
.premium-section-bg .service-link-card * {
    color: var(--dark-text) !important;
}

.premium-section-bg .text-primary {
    color: var(--button-green) !important;
}

.premium-section-bg .text-muted {
    color: #6c757d !important;
}

.premium-section-bg .btn-primary {
    background-color: var(--button-green) !important;
    border-color: var(--button-green) !important;
    color: var(--white) !important;
}

.premium-section-bg .btn-primary:hover {
    background-color: #0a3d22 !important;
    border-color: #0a3d22 !important;
}

.premium-section-bg .text-success {
    color: var(--pharmacy-green) !important;
}

/* Pattern Overlay (Optional - kept subtle if needed, or removed) */
.premium-section-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.premium-section-bg .container {
    position: relative;
    z-index: 1;
}

/* Pharmacy Location Hero Section - Reuse Premium */
.pharmacy-location-hero {
    margin-top: 0;
    margin-bottom: 0;
    padding: 2rem 0;
    background: var(--white);
    color: var(--dark-text);
    position: relative;
    overflow: hidden;
}

/* Add a subtle pattern overlay */
.pharmacy-location-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(#0E4D2D 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.pharmacy-location-hero .container {
    position: relative;
    /* Bring content above the pattern */
    z-index: 1;
}

/* Fix for Pharmacy Name Visibility in Map Section */
.pharmacy-details-card,
.pharmacy-details-card h1,
.pharmacy-details-card h2,
.pharmacy-details-card h3,
.pharmacy-details-card h4,
.pharmacy-details-card h5,
.pharmacy-details-card h6,
.pharmacy-details-card p,
.pharmacy-details-card span,
.pharmacy-details-card div {
    color: var(--dark-text) !important;
}

.pharmacy-details-card .text-muted {
    color: #6c757d !important;
}

.pharmacy-details-card .text-primary {
    color: var(--button-green) !important;
}

.pharmacy-details-card .text-success {
    color: var(--pharmacy-green) !important;
}

/* Fix for button icons changing color inside service-link-card */
.service-link-card .btn i,
.service-link-card:hover .btn i {
    color: inherit !important;
    transform: none !important;
    filter: none !important;
}

/* Ensure pointer cursor on buttons */
.btn,
a.btn {
    cursor: pointer !important;
}

/* Fix for static service cards (NHS Flu) */
.service-link-card.static-card:hover h5 {
    color: var(--dark-text) !important;
    text-decoration-color: var(--dark-text) !important;
}

.service-link-card.static-card .btn {
    position: relative;
    z-index: 50;
    cursor: pointer !important;
}

/* Global Button Overrides */
.btn-primary {
    background-color: var(--button-green) !important;
    border-color: var(--button-green) !important;
    color: var(--white) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #0a3d22 !important;
    border-color: #0a3d22 !important;
    color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(14, 77, 45, 0.4) !important;
}

.btn-outline-primary {
    color: var(--button-green) !important;
    border-color: var(--button-green) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--button-green) !important;
    border-color: var(--button-green) !important;
    color: var(--white) !important;
}

/* Ensure icons inside buttons inherit color correctly */
.btn-primary i,
.btn-outline-primary:hover i {
    color: var(--white) !important;
}

/* CSS for Multilevel Hover Dropdown */
@media (min-width: 992px) {

    /* Main Dropdown Hover */
    .navbar .nav-item.dropdown:hover>.dropdown-menu {
        display: block;
        margin-top: 18px;
        /* Pushed down as requested */
        animation: menuFadeIn 0.3s ease-out forwards;
    }

    /* Bridge main dropdown gap */
    .navbar .nav-item.dropdown>.dropdown-menu::before {
        content: '';
        position: absolute;
        top: -18px;
        left: 0;
        width: 100%;
        height: 18px;
        background: transparent;
    }

    /* Submenu Hover (Dropend) - Open to Left */
    .navbar .dropend:hover>.dropdown-menu {
        display: block;
        top: 0;
        left: auto;
        right: 100%;
        /* Fix: Open to the left */
        margin-top: -10px;
        margin-right: -5px;
        /* Pull closer from right */
        margin-left: 0;
        animation: menuFadeIn 0.3s ease-out forwards;
    }
}

/* Mobile Dropdown Fixes */
@media (max-width: 991px) {
    .navbar .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 15px;
        margin-top: 0;
        width: 100%;
    }

    .navbar .dropend .dropdown-menu {
        display: block;
        /* Expand naturally */
        position: static;
        width: 100%;
        margin: 0;
        padding-left: 15px;
        background: transparent;
        /* Scroll if too long */
        max-height: 400px;
        overflow-y: auto;
        /* Optional: aesthetic scrollbar */
        border-left: 2px solid rgba(0, 0, 0, 0.05);
    }

    .navbar .dropend .dropdown-toggle::after {
        display: none;
    }

    .navbar .dropdown-item {
        white-space: normal;
        padding: 10px;
    }

    /* Ensure scrolling if needed */
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
    }
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Fix Conflict: Remove Default Bootstrap Caret so our Custom Underline works */
.navbar-nav .nav-item.dropdown .dropdown-toggle::after {
    border: none !important;
    margin: 0 !important;
    vertical-align: 0 !important;
    /* content property is shared, but we need it for underline. 
       The underline styles (position: absolute etc) are applied by .nav-link::after
       We just need to ensure borders don't mess it up. */
}

/* Ensure Underline works on Dropdown too */
.navbar-nav .nav-item.dropdown .nav-link::after {
    display: block !important;
    /* Restore it */
    content: '' !important;
}

/* Optional: Add a custom chevron if needed, but for now just fix the glitch */


/* Submenu Arrow - pointing left (for Desktop) */
@media (min-width: 992px) {
    .navbar .dropend .dropdown-toggle::after {
        border-top: 0.35em solid transparent;
        border-right: 0.35em solid;
        border-bottom: 0.35em solid transparent;
        border-left: 0;
        margin-left: auto;
        vertical-align: middle;
        opacity: 0.5;
    }
}

/* Dropdown Menu Styling */
.navbar .dropdown-menu {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
    min-width: 220px;
    /* Slightly wider for better readability */
    background-color: var(--white);
}

/* Dropdown Items */
.navbar .dropdown-item {
    padding: 0.6rem 1rem;
    font-weight: 500;
    color: var(--dark-text);
    transition: all 0.2s ease;
    display: flex;
    /* Allow flex layout for arrow alignment */
    align-items: center;
    justify-content: space-between;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus,
.navbar .dropdown-item:active {
    background-color: rgba(31, 167, 116, 0.06);
    color: var(--pharmacy-green);
    padding-left: 1.3rem;
    /* Slight slide effect */
}

/* Active/Hover state for the parent item in a submenu */
.navbar .dropend:hover>.dropdown-item {
    background-color: rgba(31, 167, 116, 0.06);
    color: var(--pharmacy-green);
}

/* Remove default blue background on active */
.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
    background-color: rgba(31, 167, 116, 0.1);
    color: var(--pharmacy-green);
}