/* ===== VARIABLES ===== */
:root {
    --saomai-red: #e30613;
    --saomai-green: #3bb54a;
    --saomai-dark: #222;
    --saomai-gray: #555;
    --saomai-light-gray: #f8f9fa;
    --saomai-white: #ffffff;
    --saomai-primary: #e30613;
    --saomai-secondary: #64748b;
}

.btn-outline {
    border: 1px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: var(--saomai-primary);
    border: 1px solid var(--saomai-primary);
}

/* ===== BREADCRUMB STYLES ===== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--saomai-secondary);
    font-weight: 600;
    margin: 0 0.5rem;
}

.breadcrumb-item a {
    color: var(--saomai-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--saomai-red);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--saomai-secondary);
    font-weight: 500;
}

.breadcrumb-item i {
    font-size: 0.85rem;
    opacity: 0.8;
    color: var(--saomai-primary);
}

.breadcrumb-item.active i {
    opacity: 1;
    color: var(--saomai-secondary);
}

/* ===== GLOBAL STYLES ===== */
body {
    margin: 0;
    font-family: 'Inter', 'Inter', sans-serif;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
}

.hero-bg {
    background-image: url('https://images.unsplash.com/photo-1631815588090-d4bfec5b1ccb?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
}

/* Custom styles for better Bootstrap integration */
.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--saomai-primary);
    border-color: var(--saomai-primary);
}

.btn-primary:hover {
    background-color: var(--saomai-red);
    border-color: var(--saomai-red);
}

.bg-primary {
    background-color: var(--saomai-primary) !important;
}

.text-primary {
    color: var(--saomai-primary) !important;
}

/* ===== HEADER STYLES ===== */
.top-bar {
    background: var(--saomai-primary);
    color: var(--saomai-white);
    padding: 0.5rem 0;
}

.top-bar .contact-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-bar .contact-item {
    display: flex;
    align-items: center;
}

.top-bar .search-container {
    position: relative;
}

.top-bar .search-input {
    padding-right: 2.5rem;
    border-radius: 50px;
}

.top-bar .search-icon {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    color: var(--saomai-secondary);
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    background: var(--saomai-white) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ===== CLINIC STYLES ===== */
.clinic-hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.min-vh-50 {
    min-height: 50vh;
}

.specialty-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.specialty-card .card-img-wrapper {
    height: 200px;
}

.specialty-card .card-img-top {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.specialty-card .card-overlay {
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.specialty-card:hover .card-overlay {
    opacity: 1;
}

/* Specialty Detail Page Styles */
.specialty-hero {
    position: relative;
    overflow: hidden;
}

.specialty-hero .overlay {
    backdrop-filter: blur(1px);
}

.doctor-card {
    transition: all 0.3s ease;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.doctor-avatar img {
    border: 3px solid var(--saomai-light-gray);
    transition: border-color 0.3s ease;
}

.doctor-card:hover .doctor-avatar img {
    border-color: var(--saomai-primary);
}

.service-item {
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateX(5px);
    border-left: 4px solid var(--saomai-primary);
}

.equipment-item,
.activity-item {
    cursor: pointer;
}

.equipment-overlay {
    transition: opacity 0.3s ease;
}

.activity-overlay {
    transition: all 0.3s ease;
}

.tip-card {
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.tip-card .tip-icon {
    transition: transform 0.3s ease;
}

.tip-card:hover .tip-icon {
    transform: scale(1.1);
}

/* Stats Animation */
.stat-item {
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

/* Appointment Form */
.appointment-section .card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* ===== PHARMACY STYLES ===== */
.pharmacy-hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.product-card .card-img-wrapper {
    height: 200px;
}

.product-card .card-img-top {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-card .card-overlay {
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .card-overlay {
    opacity: 1;
}

.map-container {
    cursor: pointer;
}

.map-overlay {
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.map-container:hover .map-overlay {
    opacity: 1;
}

.region-stats .stat-row {
    transition: all 0.3s ease;
}

.region-stats .stat-row:hover {
    background-color: var(--saomai-light-gray);
    padding-left: 1rem;
}

.pharmacy-image {
    cursor: pointer;
}

.image-overlay {
    transition: all 0.3s ease;
}

.pharmacy-image:hover .image-overlay {
    background: linear-gradient(transparent, rgba(0,0,0,0.9)) !important;
}

/* Interactive Map Styles */
.interactive-map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Leaflet Map Styles */
#pharmacy-map {
    height: 450px;
    border-radius: 12px;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.leaflet-popup-tip {
    background: white;
}

.custom-pharmacy-marker,
.user-location-marker {
    background: transparent !important;
    border: none !important;
}

.map-controls .btn {
    border-radius: 0;
    border: 1px solid #dee2e6;
}

.map-controls .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.map-controls .btn:last-child {
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.map-legend {
    z-index: 1000;
    pointer-events: none;
}

.map-legend .card {
    font-size: 0.75rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    pointer-events: auto;
    min-width: 140px;
}

.map-legend .legend-icon {
    flex-shrink: 0;
}

.search-pharmacy-container .input-group-text {
    background-color: var(--saomai-light-gray);
    border-color: #ced4da;
}

.quick-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.pharmacy-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.pharmacy-item:hover {
    transform: translateX(8px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.pharmacy-stats .stat-row {
    cursor: pointer;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    padding: 0.5rem !important;
}

.pharmacy-stats .stat-row:hover {
    background-color: var(--saomai-light-gray) !important;
    transform: translateX(8px);
}

.quick-stat {
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 0.5rem;
}

.quick-stat:hover {
    background-color: var(--saomai-light-gray);
    transform: translateY(-2px);
}

.quick-stat i {
    transition: transform 0.3s ease;
}

.quick-stat:hover i {
    transform: scale(1.1);
}

/* Search filters styling */
.search-pharmacy-container .form-control:focus,
.search-pharmacy-container .form-select:focus {
    border-color: var(--saomai-primary);
    box-shadow: 0 0 0 0.2rem rgba(227, 6, 19, 0.25);
}

.nearest-pharmacies {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nearest-pharmacies::-webkit-scrollbar {
    width: 4px;
}

.nearest-pharmacies::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.nearest-pharmacies::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.nearest-pharmacies::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Loading animation for map */
@keyframes mapLoading {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

#pharmacy-map .spinner-border {
    animation: mapLoading 2s ease-in-out infinite;
}

/* Fix potential red bar issue */
.pharmacy-network-section::after,
.contact-section::after {
    content: "";
    display: block;
    clear: both;
}

/* Ensure no red borders or backgrounds leak */
.card-body {
    border: none !important;
}

.row {
    border: none !important;
}

/* News & Advice Styles */
.news-hero {
    background: linear-gradient(135deg, var(--saomai-primary) 0%, #c41e3a 100%);
}

.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.featured-article .card-img-top {
    transition: transform 0.3s ease;
}

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

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

.qa-item {
    transition: all 0.3s ease;
}

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

.video-item .play-button button {
    transition: all 0.3s ease;
}

.video-item:hover .play-button button {
    transform: scale(1.1);
}

/* News Detail Styles */
.social-share-bar {
    border-left: 4px solid var(--saomai-primary);
}

.article-body h3 {
    color: var(--saomai-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body ul, .article-body ol {
    margin-left: 1.5rem;
}

.article-body ul li, .article-body ol li {
    margin-bottom: 0.5rem;
}

.tags-list .badge:hover {
    background-color: var(--saomai-primary) !important;
    color: white !important;
    transform: translateY(-1px);
}

.comment-item {
    transition: all 0.3s ease;
}

.comment-item:hover {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin: -1rem;
}

.category-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

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

.popular-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
}

/* Doctors Slider Styles */
.doctors-section {
    overflow: hidden;
}

.doctorsSwiper {
    padding: 20px 0 60px;
}

.doctorsSwiper .swiper-slide {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
    transform: scale(0.85);
}

.doctorsSwiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
}

.doctorsSwiper .swiper-slide-next,
.doctorsSwiper .swiper-slide-prev {
    opacity: 0.8;
    transform: scale(0.9);
}

.doctor-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.doctor-image-wrapper {
    position: relative;
    display: inline-block;
}

.doctor-avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 5px solid white;
    transition: all 0.3s ease;
}

.swiper-slide-active .doctor-avatar {
    width: 180px;
    height: 180px;
    border: 6px solid var(--saomai-primary);
}

.doctor-badge {
    top: -5px;
    right: -5px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 1.2rem;
}

.swiper-slide-active .doctor-badge {
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
}

.doctor-info h4 {
    font-size: 1.25rem;
    transition: font-size 0.3s ease;
}

.swiper-slide-active .doctor-info h4 {
    font-size: 1.5rem;
}

.doctor-experience .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.swiper-slide-active .doctor-experience .badge {
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    background-color: var(--saomai-primary) !important;
    color: white !important;
}

/* Custom Navigation Buttons */
.doctors-next,
.doctors-prev {
    width: 50px;
    height: 50px;
    background: var(--saomai-primary);
    border-radius: 50%;
    color: white !important;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.doctors-next:hover,
.doctors-prev:hover {
    background: #c41e3a;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.doctors-next::after,
.doctors-prev::after {
    display: none;
}

.doctors-next {
    right: 20px;
}

.doctors-prev {
    left: 20px;
}

/* Custom Pagination */
.doctors-pagination {
    bottom: 10px !important;
}

.doctors-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ddd;
    opacity: 1;
    transition: all 0.3s ease;
}

.doctors-pagination .swiper-pagination-bullet-active {
    background: var(--saomai-primary);
    transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .doctor-avatar {
        width: 120px;
        height: 120px;
    }
    
    .swiper-slide-active .doctor-avatar {
        width: 140px;
        height: 140px;
    }
    
    .doctor-card {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .doctor-avatar {
        width: 100px;
        height: 100px;
    }
    
    .swiper-slide-active .doctor-avatar {
        width: 120px;
        height: 120px;
    }
    
    .doctor-card {
        padding: 1rem;
    }
    
    .doctors-next,
    .doctors-prev {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Recruitment Styles */
.recruitment-hero {
    background: linear-gradient(135deg, var(--saomai-primary) 0%, #c41e3a 100%);
}

.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
}

.environment-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.environment-card:hover {
    transform: translateY(-10px);
    border-left-color: var(--saomai-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-overlay {
    background: linear-gradient(45deg, rgba(220, 53, 69, 0.8), rgba(0, 0, 0, 0.6));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.job-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.job-card:hover {
    transform: translateY(-5px);
    border-left-color: var(--saomai-primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.cv-upload-area {
    transition: all 0.3s ease;
    cursor: pointer;
}

.cv-upload-area:hover {
    border-color: var(--saomai-primary);
    background-color: #f8f9fa;
}

.cv-upload-area.dragover {
    border-color: var(--saomai-primary);
    background-color: rgba(220, 53, 69, 0.1);
}

/* Job Detail Styles */
.job-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.job-meta .meta-item {
    display: flex;
    align-items: center;
}

.content-section {
    border-left: 4px solid var(--saomai-primary);
}

.responsibility-list li,
.requirement-list li,
.benefit-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.3s ease;
}

.responsibility-list li:hover,
.requirement-list li:hover,
.benefit-list li:hover {
    background-color: #f8f9fa;
    padding-left: 1rem;
    border-radius: 5px;
}

.sidebar-widget {
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.related-job-item:hover {
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 5px;
    margin: -0.5rem;
}

.application-form-card {
    border-top: 5px solid var(--saomai-primary);
}

/* Filter animations */
.job-filter .form-select:focus {
    border-color: var(--saomai-primary);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Contact Styles */
.contact-hero {
    background: linear-gradient(135deg, var(--saomai-primary) 0%, #c41e3a 100%);
}

.contact-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.contact-card:hover {
    transform: translateY(-10px);
    border-left-color: var(--saomai-primary);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.office-info {
    border-left: 4px solid var(--saomai-primary);
}

.branch-item:hover {
    background-color: #e9ecef !important;
    transform: translateX(5px);
}

.emergency-contact {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: scale(1.05);
}

.map-container {
    border: 3px solid #e9ecef;
    border-radius: 15px;
    overflow: hidden;
}

.map-controls .btn {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.map-controls .btn:hover {
    background: var(--saomai-primary);
    color: white;
    transform: scale(1.1);
}

.contact-form-card {
    border-top: 5px solid var(--saomai-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--saomai-primary);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.working-hours-card {
    border-left: 5px solid var(--saomai-primary);
}

.hour-item {
    transition: all 0.3s ease;
}

.hour-item:hover {
    background-color: #fff !important;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.note-item:hover {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 0.5rem;
    margin: -0.5rem;
}

.accordion-item {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-left-color: var(--saomai-primary);
}

.accordion-button:not(.collapsed) {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--saomai-primary);
    color: var(--saomai-primary);
}

.accordion-button:focus {
    border-color: var(--saomai-primary);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .clinic-hero,
    .pharmacy-hero {
        padding: 4rem 0 2rem;
    }
    
    .specialty-hero .hero-bg {
        height: 40vh !important;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .product-card .card-img-wrapper {
        height: 150px;
    }
    
    .map-container img {
        height: 200px;
        object-fit: cover;
    }
}

.navbar-brand {
    color: var(--saomai-red) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--saomai-dark) !important;
    font-weight: 600;
    transition: color 0.2s;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link:hover {
    color: var(--saomai-red) !important;
}

/* ===== SWIPER HERO SECTION ===== */
.hero-swiper {
    height: 500px;
    width: 100%;
}

.hero-slide {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 500px;
    display: flex;
    align-items: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(30, 64, 175, 0.8), transparent);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--saomai-white);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content .lead {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Swiper Navigation */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: var(--saomai-white);
    background: rgba(0,0,0,0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(0,0,0,0.5);
    transform: scale(1.1);
}

.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
}

/* Swiper Pagination */
.hero-swiper .swiper-pagination {
    bottom: 30px;
}

.hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--saomai-white);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--saomai-red);
    transform: scale(1.2);
}

/* ===== SECTION STYLES ===== */
.section-header {
    text-align: center;
    margin: 0 auto 3rem;
    max-width: 800px;
}

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

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--saomai-primary);
    margin: 0 auto 1rem;
}

.section-subtitle {
    color: var(--saomai-secondary);
    font-size: 1.25rem;
    line-height: 1.6;
}

/* ===== CARD STYLES ===== */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    color: var(--saomai-dark);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--saomai-secondary);
    margin-bottom: 0.75rem;
}

/* ===== SERVICE SECTION ===== */
.service-image {
    height: 320px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.375rem;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 64, 175, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
}

.service-icon {
    font-size: 3rem;
    color: var(--saomai-white);
}

.service-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--saomai-dark);
    margin-bottom: 0.75rem;
}

.service-description {
    color: var(--saomai-secondary);
    margin-bottom: 1rem;
}

.service-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.service-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.service-list .bullet {
    color: var(--saomai-primary);
    margin-right: 0.5rem;
}

/* ===== NEWS SECTION ===== */
.news-meta {
    display: flex;
    align-items: center;
    color: var(--saomai-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.news-meta i {
    margin-right: 0.5rem;
}

.news-link {
    color: var(--saomai-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.news-link:hover {
    text-decoration: underline;
}

.news-link i {
    margin-left: 0.25rem;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background: var(--saomai-primary);
    color: var(--saomai-white);
    padding: 3rem 0;
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-icon {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.contact-icon i {
    color: var(--saomai-white);
    font-size: 2rem;
}

.contact-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.contact-value {
    font-weight: 700;
    margin: 0;
}

/* ===== FORM STYLES ===== */
.contact-form {
    background: var(--saomai-white);
    color: var(--saomai-dark);
    border-radius: 1rem;
    padding: 1.5rem;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--saomai-primary);
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.form-control:focus {
    border-color: var(--saomai-primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

.btn-submit {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    background: var(--saomai-primary);
    border: none;
    border-radius: 0.375rem;
}

.btn-submit:hover {
    background: var(--saomai-red);
}

.ml-0 {
    margin-left: 0 !important;
}
.btn-outline-primary {
    color: var(--saomai-primary);
    border-color: var(--saomai-primary);
}
.btn-outline-primary:hover {
    background-color: var(--saomai-primary);
    border-color: var(--saomai-primary);
}
.btn-outline-light:hover {
    background-color: var(--saomai-white);
}
/* ===== AOS ANIMATION STYLES ===== */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Custom animation delays for better performance */
[data-aos-delay="50"] { transition-delay: 50ms; }
[data-aos-delay="100"] { transition-delay: 100ms; }
[data-aos-delay="150"] { transition-delay: 150ms; }
[data-aos-delay="200"] { transition-delay: 200ms; }
[data-aos-delay="250"] { transition-delay: 250ms; }
[data-aos-delay="300"] { transition-delay: 300ms; }
[data-aos-delay="350"] { transition-delay: 350ms; }
[data-aos-delay="400"] { transition-delay: 400ms; }

/* Smooth transitions for cards */
.card[data-aos] {
    transition: all 0.6s ease-in-out;
}

/* Enhanced fade-up animation */
[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

/* Enhanced fade-left animation */
[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

/* Enhanced fade-right animation */
[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--saomai-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top:hover {
    background: #d10000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(227, 6, 19, 0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.5);
}

.scroll-to-top.show {
    display: flex;
    opacity: 1;
    visibility: visible;
    animation: fadeInUp 0.3s ease;
}

.scroll-to-top.hide {
    animation: fadeOutDown 0.3s ease;
}

/* Loading state for scroll to top */
.scroll-to-top.loading {
    pointer-events: none;
    opacity: 0.7;
}

.scroll-to-top.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Enhanced tooltip */
.scroll-to-top::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    z-index: 1001;
}

.scroll-to-top::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 3px;
    z-index: 1001;
}

.scroll-to-top:hover::before,
.scroll-to-top:hover::after {
    opacity: 1;
    visibility: visible;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* ===== PAGINATION STYLES ===== */
.pagination-wrapper {
    min-width: 100%;
}

.pagination-info {
    color: var(--saomai-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-custom {
    margin: 0;
    gap: 0.25rem;
}

.pagination-custom .page-item {
    margin: 0 0.125rem;
}

.pagination-custom .page-link {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--saomai-secondary);
    background: transparent;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 44px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-custom .page-link:hover {
    color: var(--saomai-primary);
    background: rgba(227, 6, 19, 0.05);
    border-color: var(--saomai-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.15);
}

.pagination-custom .page-item.active .page-link {
    background: var(--saomai-primary);
    border-color: var(--saomai-primary);
    color: var(--saomai-white);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.3);
}

.pagination-custom .page-item.active .page-link:hover {
    background: var(--saomai-red);
    border-color: var(--saomai-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.4);
}

.pagination-custom .page-item.disabled .page-link {
    color: #adb5bd;
    background: transparent;
    border-color: transparent;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-custom .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(227, 6, 19, 0.25);
    outline: none;
}

.pagination-custom .page-link i {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .top-bar .contact-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev {
        display: none;
    }
    
    /* Breadcrumb Mobile Styles */
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 0.3rem;
    }
    
    .breadcrumb-item i {
        font-size: 0.8rem;
    }
    
    /* Pagination Mobile Styles */
    .pagination-wrapper {
        padding: 1rem;
    }
    
    .pagination-wrapper .d-flex {
        flex-direction: column;
        gap: 1rem;
        align-items: center !important;
    }
    
    .pagination-custom .page-link {
        padding: 0.5rem 0.75rem;
        min-width: 40px;
        font-size: 0.9rem;
    }
    
    .pagination-info {
        font-size: 0.8rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .hero-swiper {
        height: 400px;
    }
    
    .hero-slide {
        height: 400px;
    }
}

/* ===== NAVIGATION SEARCH STYLES ===== */
#search-results {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* New Search Results Layout */
#search-results .search-results-container {
    padding: 0;
}

#search-results .search-section {
    border-bottom: 1px solid #e9ecef;
    padding: 0;
}

#search-results .search-section:last-child {
    border-bottom: none;
}

#search-results .search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem 0.5rem;
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10;
}

#search-results .search-section-title {
    font-weight: 700;
    color: #495057;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

#search-results .search-section-title:not(:first-child) {
    border-top: 1px solid #dee2e6;
}

#search-results .search-items {
    padding: 0;
}

#search-results .search-item {
    display: flex;
    align-items: center;
    border: none;
    padding: 0.875rem 1.5rem;
    color: #212529;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    background: transparent;
    gap: 0.75rem;
}

#search-results .search-item:hover {
    background-color: #f8f9fa;
    border-left: 3px solid var(--saomai-primary);
    padding-left: calc(1.5rem - 3px);
    transform: translateX(2px);
    text-decoration: none;
    color: #212529;
}

#search-results .search-item-image {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 0.375rem;
    overflow: hidden;
    background-color: #f8f9fa;
}

#search-results .search-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#search-results .search-item-content {
    flex: 1;
    min-width: 0;
}

#search-results .search-item-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#search-results .search-item-price {
    font-size: 0.8rem;
    color: var(--saomai-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

#search-results .search-item-price .text-decoration-line-through {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: normal;
}

#search-results .search-item-price .badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
}

/* Specific styles for different item types */
#search-results .search-item-medicine .search-item-image {
    width: 45px;
    height: 45px;
}

#search-results .search-item-doctor .search-item-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

#search-results .search-item-news .search-item-image {
    width: 50px;
    height: 35px;
}

/* Placeholder images using CSS */
#search-results .search-item-image:empty::before,
#search-results .search-item-img[src*="placeholder"] {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

#search-results .search-item-img[src*="placeholder"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #adb5bd;
    border-radius: 50%;
}



#search-results .search-item-doctor .search-item-image:empty::after,
#search-results .search-item-doctor .search-item-img[src*="placeholder"]::after {
    content: '👨‍⚕️';
    font-size: 16px;
}

#search-results .search-item-news .search-item-image:empty::after,
#search-results .search-item-news .search-item-img[src*="placeholder"]::after {
    content: '📰';
    font-size: 14px;
}

#search-results .view-all-link {
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    color: var(--saomai-primary);
    transition: all 0.2s ease-in-out;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background: transparent;
}

#search-results .view-all-link:hover {
    background-color: rgba(227, 6, 19, 0.1);
    color: var(--saomai-primary);
    text-decoration: none;
    transform: none;
}

/* Loading and No Results */
#search-results .n-loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-height: 120px;
    gap: 1rem;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle fill="%23FF156D" stroke="%23FF156D" stroke-width="15" r="15" cx="40" cy="65"><animate attributeName="cy" calcMode="spline" dur="2" values="65;135;65;" keySplines=".5 0 .5 1;.5 0 .5 1" repeatCount="indefinite" begin="-.4"></animate></circle><circle fill="%23FF156D" stroke="%23FF156D" stroke-width="15" r="15" cx="100" cy="65"><animate attributeName="cy" calcMode="spline" dur="2" values="65;135;65;" keySplines=".5 0 .5 1;.5 0 .5 1" repeatCount="indefinite" begin="-.2"></animate></circle><circle fill="%23FF156D" stroke="%23FF156D" stroke-width="15" r="15" cx="160" cy="65"><animate attributeName="cy" calcMode="spline" dur="2" values="65;135;65;" keySplines=".5 0 .5 1;.5 0 .5 1" repeatCount="indefinite" begin="0"></animate></circle></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80px;
}

#search-results .n-loading-spinner .spinner-border {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 2px;
}

#search-results .n-loading-spinner span {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

#search-results .no-results {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-height: 120px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

#search-results .no-results .icon {
    font-size: 2rem;
    color: #adb5bd;
    margin-bottom: 0.75rem;
}

#search-results .no-results .message {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
    margin: 0;
}

/* ===== SEARCH HISTORY STYLES ===== */
#search-results .search-history-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #212529;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    gap: 0.75rem;
}

#search-results .search-history-item:hover {
    background-color: #f8f9fa;
    border-left: 3px solid var(--saomai-primary);
    padding-left: calc(1.5rem - 3px);
    transform: translateX(2px);
    text-decoration: none;
    color: #212529;
}

#search-results .search-history-item .search-term {
    flex: 1;
    color: var(--saomai-primary);
    font-weight: 500;
}

#search-results .search-history-item .btn {
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: #6c757d;
    transition: color 0.2s ease;
}

#search-results .search-history-item .btn:hover {
    color: var(--saomai-red);
}

/* ===== POPULAR SEARCH TAGS STYLES ===== */
#search-results .popular-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
}

#search-results .search-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    color: #495057;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid #e9ecef;
}

#search-results .search-tag:hover {
    background-color: var(--saomai-primary);
    color: var(--saomai-white);
    border-color: var(--saomai-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.2);
}

/* ===== SEARCH RESULTS PAGE STYLES ===== */
.search-results-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.search-summary {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.search-section {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 2rem;
}

.search-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.search-section h2 {
    color: var(--saomai-dark);
    font-weight: 600;
}

/* Doctor card specific styles */
.doctor-card .doctor-avatar img {
    border: 3px solid var(--saomai-light-gray);
    transition: border-color 0.3s ease;
}

.doctor-card:hover .doctor-avatar img {
    border-color: var(--saomai-primary);
}

/* News card specific styles */
.news-card {
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.news-card .card-img-wrapper {
    height: 200px;
}

.news-card .card-img-top {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-card .card-overlay {
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover .card-overlay {
    opacity: 1;
}

/* Specialty card specific styles */
.specialty-card {
    transition: all 0.3s ease;
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.specialty-card .card-img-wrapper {
    height: 200px;
}

.specialty-card .card-img-top {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.specialty-card .card-overlay {
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.specialty-card:hover .card-overlay {
    opacity: 1;
}
