/* Priority styles for the booking button */
.book-doctor-btn {
    font-size: 1.5rem;
    padding: 15px 40px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-doctor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

/* Mobile view improvements */
@media (max-width: 767.98px) {
    .book-doctor-btn {
        font-size: 1.6rem;
        padding: 18px 40px;
        width: 90%;
        max-width: 350px;
        margin: 0 auto;
    }
}

/* Partner Hospitals Section Styles */
.display-4.fw-bold.text-primary {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.display-4.fw-bold.text-primary::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--bs-primary);
    margin: 15px auto 0;
}

/* Custom styles on top of Bootstrap theme */
:root {
    --medical-blue: var(--bs-info);
    --medical-light: var(--bs-light);
    --chatbot-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --chatbot-hover: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* AI Support Chatbot Button Styling */
.btn-gradient-primary {
    background: var(--chatbot-gradient);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-gradient-primary:hover {
    background: var(--chatbot-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-gradient-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-gradient-primary:hover::before {
    left: 100%;
}

.chatbot-btn {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.7);
    }
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
}

/* Medicine Image Styling */
.medicine-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    background-color: #f8f9fa;
    flex-shrink: 0;
}

/* Medicine Card Styling */
.medicine-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.medicine-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

/* Stock Status Indicators */
.medicine-card.stock-low {
    border-left: 4px solid #dc3545;
}

.medicine-card.stock-medium {
    border-left: 4px solid #ffc107;
}

.medicine-card.stock-high {
    border-left: 4px solid #28a745;
}

/* Badge Styling */
.badge-available {
    background-color: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.badge-unavailable {
    background-color: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* AI Support Alert Styling */
.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid #667eea;
}

.alert-info .btn-primary {
    background: var(--chatbot-gradient);
    border: none;
    transition: all 0.2s ease;
}

.alert-info .btn-primary:hover {
    background: var(--chatbot-hover);
    transform: scale(1.05);
}

/* Enhanced Navigation Styles */
.main-nav-link {
    position: relative;
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 0 5px;
}

.main-nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-nav-link:hover::after {
    width: 100%;
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.navbar-nav .dropdown-item {
    padding: 10px 20px;
    transition: all 0.2s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: var(--bs-primary);
    color: white;
}

/* Dashboard Button Styles */
.dashboard-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-btn:hover, .dashboard-btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.dashboard-btn i {
    font-size: 1.2rem;
}

/* Mobile Navigation Improvements */
@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 2.4rem !important;
        font-weight: 700;
    }
    
    .navbar-toggler {
        border: 3px solid var(--bs-primary);
        padding: 15px;
        border-radius: 12px;
        margin-right: 5px;
    }
    
    .navbar-toggler-icon {
        width: 35px;
        height: 35px;
    }
    
    .main-nav-link {
        font-size: 1.7rem !important;
        padding: 18px 25px !important;
        margin: 8px 0;
        border-radius: 10px;
    }
    
    .dropdown-menu {
        padding: 15px 0;
        border-radius: 15px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        margin-top: 10px;
        border: none;
    }
    
    .dropdown-item {
        font-size: 1.6rem !important;
        padding: 15px 25px !important;
        margin: 5px 0;
    }
    
    .nav-item {
        margin-bottom: 12px;
    }
    
    .navbar-collapse {
        padding: 20px 0;
        margin-top: 10px;
    }
    
    /* Add spacing between navbar items */
    .navbar-nav {
        gap: 5px;
    }
    
    /* Dashboard buttons for mobile */
    .dashboard-btn {
        width: 100%;
        margin-bottom: 10px;
        padding: 16px 20px;
        font-size: 1.3rem;
    }
    
    .dashboard-btn i {
        font-size: 1.5rem;
    }
    
    h2.mb-4 {
        font-size: 2.2rem !important;
        text-align: center;
        margin-bottom: 1.5rem !important;
    }
}

.doctor-card {
    transition: transform 0.2s;
    height: 100%;
}

.doctor-card:hover {
    transform: translateY(-5px);
}

.doctor-image {
    height: 300px;
    width: 300px;
    object-fit: cover;
}

/* Symptom Checker Specific Styles */
.symptom-checker-image {
    font-size: 5rem;
    color: var(--bs-primary);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0.9;
}

.symptom-checker-image::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-radius: 50%;
    z-index: -1;
}

.feature-list {
    list-style: none;
    padding-left: 15px;
    margin-bottom: 0;
}

.feature-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-list li::before {
    content: '\f058';
    font-family: "Bootstrap Icons";
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--bs-primary);
}

.analysis-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

.medicine-card {
    transition: all 0.3s ease;
    height: 100%;
}

.medicine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

@media (max-width: 767.98px) {
    .symptom-checker-image {
        margin-top: 30px;
        font-size: 4rem;
    }
    
    .symptom-checker-image::before {
        width: 120px;
        height: 120px;
    }
    
    .feature-list li {
        font-size: 1rem;
        margin-bottom: 8px;
    }
}

.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    z-index: 1000;
}

.chat-messages {
    max-height: 300px;
    overflow-y: auto;
}

.facility-image {
    height: 300px;
    object-fit: cover;
}

/* Hospital Image Styles */
.hospital-image {
    height: 250px;
    width: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.hospital-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Hospital Detail Image Styles */
.hospital-detail-image-container {
    height: 300px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.hospital-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hospital-detail-image:hover {
    transform: scale(1.05);
}

/* Hospital Image Overlay */
.hospital-image-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.hospital-image-overlay .badge {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Icon Circles for Contact Info */
.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

/* Hospital Profile Image in Modal */
.hospital-profile-image {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Image Upload Preview */
.image-preview-container {
    width: 100%;
    max-width: 350px;
    margin: 15px auto;
    border: 2px dashed #ccc;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.image-preview-container.border-success {
    border: 2px solid var(--bs-success);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
    background-color: rgba(40, 167, 69, 0.05);
}

.image-preview-wrapper {
    max-height: 250px;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    margin-bottom: 15px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.image-preview {
    max-width: 100%;
    max-height: 250px;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.image-preview:hover {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.upload-progress {
    height: 8px;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.file-upload-label {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.file-upload-label:hover {
    background-color: var(--bs-primary-dark, #0056b3);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.file-upload-label:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.file-upload-input {
    position: absolute;
    left: -9999px;
}

/* Style for the success alert in image upload */
.image-preview-container .alert-success {
    padding: 8px 12px;
    border-radius: 8px;
    background-color: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    margin-top: 10px;
    color: #155724;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in;
}

/* Image upload feedback animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.img-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.img-preview:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Dashboard image preview */
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #f1f3f5;
    border-radius: 5px;
    color: #adb5bd;
}

.no-image-placeholder i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.no-image-placeholder p {
    margin: 0;
    font-size: 0.8rem;
}

/* Image upload states */
.image-upload-container {
    position: relative;
    transition: all 0.3s ease;
}

.image-upload-container:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-preview-area {
    position: relative;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Upload animation */
@keyframes uploadProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

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

/* Doctor Image Styles for detail pages */
.doctor-profile .doctor-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bs-primary);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.doctor-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Doctor image placeholder */
.doctor-image-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    overflow: hidden;
    position: relative;
}

.doctor-image-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.doctor-placeholder-text {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.9;
}

.doctor-image-placeholder::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 40px;
    background: white;
    border-radius: 50% 50% 0 0;
}

.doctor-profile-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 4px solid var(--bs-primary);
    border-radius: 50%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    margin: 0 auto;
}

.doctor-profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.doctor-placeholder {
    width: 180px;
    height: 180px;
    color: #6c757d;
    border: 3px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.doctor-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
    color: #adb5bd;
}

.doctor-bio {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--bs-primary);
    line-height: 1.6;
    font-style: italic;
    color: #4a5568;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Partner Doctors Section Styles */
.doctor-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.doctor-card .card-body {
    padding: 1.5rem;
}

.doctor-card .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
}

.doctor-card .btn {
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.doctor-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.doctor-bio {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    border-left: 4px solid var(--bs-primary);
    line-height: 1.6;
    font-style: italic;
    color: #4a5568;
}

/* Doctor Profile Specific Styles */
.doctor-detail-header {
    position: relative;
    padding: 30px 0;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
}

.doctor-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 150px;
    background-repeat: repeat;
    opacity: 0.3;
}

.doctor-detail-info {
    position: relative;
    z-index: 10;
}

.doctor-profile-tabs .nav-link {
    font-weight: 500;
    padding: 15px 20px;
    color: #495057;
    background-color: transparent;
    border-color: transparent;
    transition: all 0.3s ease;
}

.doctor-profile-tabs .nav-link.active {
    color: var(--bs-primary);
    background-color: white;
    border-color: #dee2e6 #dee2e6 white;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.doctor-profile-tabs .nav-link:hover:not(.active) {
    color: var(--bs-primary);
    border-color: transparent;
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.doctor-profile-qualification {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(var(--bs-info-rgb), 0.1);
    color: var(--bs-info);
    border-radius: 50px;
    font-weight: 500;
    margin-bottom: 15px;
}

.doctor-location-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 15px;
    background-color: #f8f9fa;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.doctor-location-badge:hover {
    background-color: var(--bs-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.doctor-location-badge i {
    margin-right: 5px;
    font-size: 1rem;
}

/* Mobile Responsive Hospital Images */
@media (max-width: 767.98px) {
    .hospital-image {
        height: 200px;
        border-radius: 15px 15px 0 0;
    }
    
    .hospital-detail-image-container {
        height: 250px;
    }
    
    .hospital-profile-image {
        max-height: 180px;
    }
}

/* Online Doctors Status Styles */
.online-doctors-status {
    margin-bottom: 10px;
}

.online-doctor-badge {
    transition: all 0.2s ease-in-out;
}

.online-doctor-badge:hover {
    transform: translateY(-3px);
}

.online-indicator {
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    position: relative;
}

/* Blinking effect for online status */
.blink {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
    
    .doctor-profile-image,
    .doctor-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .doctor-image {
        height: 180px;
    }
    
    .image-preview-container {
        max-width: 250px;
    }
    
    .doctor-profile-tabs .nav-link {
        padding: 10px 15px;
        font-size: 1.1rem;
    }
    
    .doctor-detail-header {
        padding: 20px 0;
        margin-bottom: 20px;
    }
}
    
    /* Responsive doctor cards */
    .doctor-card {
        margin-bottom: 20px;
    }
    
    .doctor-card .card-body {
        padding: 15px;
    }
    
    .doctor-card h3.h5 {
        font-size: 1.6rem !important;
        margin-bottom: 10px;
    }
    
    .doctor-card .badge {
        font-size: 1.1rem;
        padding: 8px 15px;
    }
    
    .doctor-card .btn-success {
        padding: 12px 15px;
        font-size: 1.3rem;
    }
    
    .doctor-card .small {
        font-size: 1.1rem !important;
    }
}

.booking-form {
    max-width: 600px;
    margin: 0 auto;
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
                url('https://images.unsplash.com/photo-1504813184591-01572f98c85f');
    background-size: cover;
    background-position: center;
    padding: 120px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

/* Search Section Styles */
.search-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin: 0 auto;
    max-width: 1000px;
    width: 100%;
}

.search-form .input-group {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    overflow: hidden;
    background: white;
}

.search-form .form-control {
    border: none;
    padding: 20px 30px;
    font-size: 1.3rem;
    height: auto;
}

.search-form .btn {
    padding: 20px 40px;
    font-size: 1.3rem;
    border: none;
    background: var(--bs-primary);
    transition: all 0.3s ease;
}

.search-form .btn:hover {
    background: var(--bs-primary);
    opacity: 0.9;
    transform: translateY(-1px);
}

.search-form .btn i {
    margin-right: 10px;
    width: 24px;
    height: 24px;
}

/* Placeholder text styling */
.search-form .form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Global text size increase for mobile */
@media (max-width: 767.98px) {
    body {
        font-size: 18px;
    }
    
    p {
        font-size: 1.25rem;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 2.8rem !important;
    }
    
    h2 {
        font-size: 2.5rem !important;
    }
    
    h3 {
        font-size: 2.2rem !important;
    }
    
    h4 {
        font-size: 1.8rem !important;
    }
    
    h5 {
        font-size: 1.5rem !important;
    }
    
    .card-text {
        font-size: 1.25rem !important;
    }
    
    .fs-5 {
        font-size: 1.4rem !important;
    }
    
    .fs-6 {
        font-size: 1.2rem !important;
    }
}

/* Mobile Search Improvements */
@media (max-width: 767.98px) {
    .search-section {
        padding: 15px;
        margin: 0 15px;
        width: auto;
    }
    
    .search-section .container {
        padding: 0;
        max-width: 100%;
    }
    
    .search-section .row {
        margin: 0;
    }
    
    .search-section .col-md-10 {
        padding: 0;
        width: 100%;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-form .input-group {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        width: 100%;
    }
    
    .search-form .form-control {
        border-radius: 20px;
        padding: 12px 15px;
        font-size: 1.1rem;
        margin-bottom: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        width: 100%;
    }
    
    .search-form .btn {
        width: 100%;
        border-radius: 20px;
        padding: 12px 0;
        font-size: 1.1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .search-form .form-control::placeholder {
        font-size: 1rem;
        text-align: left;
    }
    
    .page-header h1 {
        font-size: 3rem !important;
    }
    
    .page-header p.lead {
        font-size: 1.8rem !important;
    }
    
    /* Doctor Locations Mobile View */
    .table-responsive {
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .table-responsive table {
        min-width: 700px; /* ensures horizontal scrolling on mobile */
    }
    
    .table-responsive th, 
    .table-responsive td {
        padding: 15px 10px;
        font-size: 1.1rem;
    }
    
    .table-responsive th {
        background-color: var(--bs-primary);
        color: white;
    }
    
    /* Mobile location cards */
    .location-card {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        margin-bottom: 20px;
        transition: all 0.3s ease;
    }
    
    .location-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }
    
    .location-card .card-header {
        padding: 15px 20px;
        font-weight: 600;
    }
    
    .location-card .card-body {
        padding: 20px;
    }
    
    .location-card .btn {
        padding: 10px 15px;
        font-size: 1.1rem;
    }
    
    .location-form-card {
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        margin-bottom: 30px;
    }
    
    /* Card improvements for forms */
    .card {
        border-radius: 12px;
        margin-bottom: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    
    .card-header {
        padding: 15px 20px;
        font-size: 1.2rem;
        background-color: rgba(var(--bs-primary-rgb), 0.1);
    }
    
    .card-header h4 {
        margin-bottom: 0;
        font-size: 1.4rem;
    }
    
    .card-body {
        padding: 20px;
    }
    
    /* Location form improvements */
    .form-control {
        padding: 16px 20px;
        font-size: 1.5rem;
        border-radius: 12px;
        margin-bottom: 15px;
    }
    
    .form-label {
        font-weight: 600;
        margin-bottom: 10px;
        font-size: 1.4rem;
    }
    
    .form-check-label {
        font-size: 1.3rem;
        padding-top: 4px;
    }
    
    .form-check-input {
        width: 22px;
        height: 22px;
        margin-right: 10px;
    }
    
    .form-check {
        margin-bottom: 15px;
    }
    
    .form-text {
        font-size: 1.1rem;
        margin-top: 8px;
    }
    
    .invalid-feedback {
        font-size: 1.1rem;
    }
    
    /* Button improvements */
    .btn {
        padding: 15px 25px;
        font-size: 1.5rem;
        border-radius: 12px;
        font-weight: 500;
    }
    
    .btn-lg {
        padding: 18px 30px;
        font-size: 1.6rem;
        border-radius: 14px;
    }
    
    .btn-sm {
        padding: 10px 15px;
        font-size: 1.2rem;
        border-radius: 8px;
    }
}

/* Performance Optimizations */
/* Improved Image Lazy Loading */
img[loading="lazy"] {
    transition: opacity 0.3s;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity;
}

/* Set explicit dimensions to reduce layout shifts */
.hospital-image, .doctor-image {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize rendering performance */
.card {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Add content-visibility for off-screen content */
.col-md-6, .col-md-4, .col-lg-4, .col-lg-3 {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px; /* Approximate size placeholder */
}

/* Optimize CSS Rendering */
* {
    text-rendering: optimizeSpeed;
}

/* Font display improvements */
@font-face {
    font-family: 'Poppins';
    font-display: swap;
}
/* Nearby Button in Search Section */
.btn-xl {
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    border-radius: 50px;
    font-weight: 500;
}

@media (max-width: 767.98px) {
    .btn-xl {
        margin-top: 1rem;
        width: 100%;
        border-radius: 50px;
    }
}

/* Medicine image styling */
.medicine-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

/* Category navigation styling */
.category-btn {
    transition: all 0.3s ease;
    border-radius: 25px;
    font-size: 0.9rem;
    padding: 8px 16px;
    margin: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.category-btn.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.category-btn.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
}

.category-btn .badge {
    font-size: 0.7rem;
    border-radius: 10px;
    padding: 3px 6px;
    font-weight: 600;
}

.category-filter-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border: 1px solid #d4edda;
    border-radius: 8px;
}

/* Store category navigation responsive design */
@media (max-width: 768px) {
    .category-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin: 1px;
    }
    
    .d-flex.flex-wrap.gap-2 {
        gap: 0.5rem !important;
    }
    
    .category-btn .badge {
        font-size: 0.6rem;
        padding: 2px 4px;
    }
}

/* Store image styling for public pages */
.store-image-container {
    min-height: 100px;
    width: 100%;
}

.store-image-public {
    max-height: 100px;
    width: 100%;
    object-fit: cover;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.store-image-public:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.store-fallback {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-height: 100px;
}

.store-fallback .small {
    font-size: 0.75rem;
    line-height: 1.1;
    word-break: break-word;
}

/* Store list fallback styling */
.store-fallback-list {
    width: 100%;
    height: 200px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
}

/* Cursor pointer for clickable images */
.cursor-pointer {
    cursor: pointer;
}

.store-fallback-list .small {
    font-size: 0.8rem;
    line-height: 1.2;
    word-break: break-word;
    max-width: 180px;
}

/* Store header responsive design */
@media (max-width: 768px) {
    .store-image-container {
        min-height: 80px;
    }
    
    .store-image-public {
        max-height: 80px;
    }
    
    .store-fallback {
        height: 80px !important;
        min-height: 80px;
    }
    
    .store-fallback .small {
        font-size: 0.65rem;
    }
    
    .store-fallback-list {
        height: 150px;
    }
    
    .store-fallback-list .small {
        font-size: 0.7rem;
        max-width: 140px;
    }
}
