* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure body doesn't interfere with sticky positioning */
body > nav.navbar {
    position: -webkit-sticky;
    position: sticky;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-size: 16px;
}

/* Mobile-first base styles */
@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }
}

/* Topbar Styles - Mobile First */
.topbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    position: relative;
    z-index: 999;
    width: 100%;
}

/* Topbar stays relative (scrolls with page) */

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.topbar-left, .topbar-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px; /* Touch target */
}

.topbar-item i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.topbar-item span {
    white-space: nowrap;
    font-size: 0.85rem;
}

/* Tablet and up */
@media (min-width: 768px) {
    .topbar {
        font-size: 0.9rem;
        padding: 0.6rem 0;
    }
    
    .topbar-content {
        padding: 0 2rem;
    }
    
    .topbar-left, .topbar-right {
        gap: 2rem;
    }
    
    .topbar-item i {
        font-size: 1rem;
    }
    
    .topbar-item span {
        font-size: 0.9rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .topbar-content {
        padding: 0 3rem;
    }
}

/* Navbar Styles - Fixed at top */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    will-change: transform;
}

/* Mobile: Navbar at very top (topbar hidden) */
@media (max-width: 768px) {
    .navbar {
        z-index: 1001;
        top: 0;
    }
    
    /* Add padding to first section to account for fixed navbar */
    .carousel-section {
        /* margin-top: 70px; */
    }
}

/* Desktop: Navbar fixed at top (topbar scrolls away) */
@media (min-width: 769px) {
    .navbar {
        position: fixed;
        top: 0;
        z-index: 1000;
    }
    
    /* Add padding to first section to account for fixed navbar */
    .carousel-section {
        /* margin-top: 80px; */
    }
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Tablet and up */
@media (min-width: 768px) {
    .navbar-content {
        padding: 1rem 2rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .navbar-content {
        padding: 1rem 3rem;
    }
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-brand i {
    font-size: 2rem;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #667eea;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.navbar-toggle:active {
    transform: scale(0.95);
}

/* Show toggle button on mobile */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    flex-direction: row;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    display: inline-block;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.btn-nav {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    width: auto;
    min-height: 44px;
    font-size: 0.95rem;
}

.btn-primary-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-outline-nav {
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline-nav:hover {
    background: #667eea;
    color: white;
}

/* Carousel Styles - Mobile First */
.carousel-section {
    position: relative;
    height: 400px;
    overflow: hidden;
    /* margin-top: 70px;  */
}

/* Tablet */
@media (min-width: 768px) {
    .carousel-section {
        height: 500px;
        /* margin-top: 80px;  */
    }
}

/* Desktop */
@media (min-width: 992px) {
    .carousel-section {
        height: 600px;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .carousel-section {
        height: 700px;
    }
}

/* Desktop: Adjust margin for fixed navbar only */
@media (min-width: 769px) {
    .carousel-section {
        /* margin-top: 80px;  */
    }
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

.carousel-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 2rem;
}

.carousel-content h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    animation: fadeInUp 1s ease;
    line-height: 1.2;
}

.carousel-content p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.2s both;
    line-height: 1.5;
}

/* Tablet */
@media (min-width: 768px) {
    .carousel-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .carousel-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .carousel-content h1 {
        font-size: 3.5rem;
    }
    
    .carousel-content p {
        font-size: 1.3rem;
    }
}

.carousel-btn {
    padding: 0.875rem 2rem;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Tablet and up */
@media (min-width: 768px) {
    .carousel-btn {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }
}

.carousel-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: white;
    width: 30px;
    border-radius: 15px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Styles - Mobile First */
.section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.section-title p {
    font-size: 0.95rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    padding: 0 1rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Tablet */
@media (min-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        margin-bottom: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }
    
    .section-title p {
        font-size: 1.05rem;
        padding: 0;
    }
    
    .container {
        padding: 0 2rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .section {
        padding: 5rem 0;
    }
    
    .section-title {
        margin-bottom: 3rem;
    }
    
    .section-title h2 {
        font-size: 2.5rem;
    }
    
    .section-title p {
        font-size: 1.1rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .container {
        padding: 0 3rem;
    }
}

/* Specialties Section */
.specialties-section {
    background: #f9fafb;
}

.specialties-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* Tablet */
@media (min-width: 576px) {
    .specialties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .specialties-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
}

.specialty-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Tablet and up */
@media (min-width: 768px) {
    .specialty-card {
        border-radius: 20px;
        padding: 2rem;
    }
}

.specialty-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.specialty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

/* Tablet and up */
@media (min-width: 768px) {
    .specialty-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 1.5rem;
        border-radius: 20px;
        font-size: 2.5rem;
    }
}

.specialty-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.specialty-card p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Tablet and up */
@media (min-width: 768px) {
    .specialty-card h3 {
        font-size: 1.3rem;
    }
    
    .specialty-card p {
        font-size: 0.95rem;
    }
}

.specialty-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Action Buttons Section */
.action-buttons-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* Tablet */
@media (min-width: 576px) {
    .action-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .action-buttons-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
}

.action-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.75rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.action-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.action-card i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.action-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.action-card p {
    margin-bottom: 1.25rem;
    opacity: 0.9;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Tablet and up */
@media (min-width: 768px) {
    .action-card {
        border-radius: 20px;
        padding: 2.5rem;
    }
    
    .action-card i {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .action-card h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .action-card p {
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }
}

.action-btn {
    padding: 0.875rem 2rem;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-height: 44px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    color: #667eea;
}

/* Doctors Section */
.doctors-section {
    background: white;
}

.doctors-grid {
    display: grid;
    /* grid-template-columns: 1fr; */
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Tablet */
@media (min-width: 576px) {
    .doctors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .doctors-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2.5rem;
    }
}

.doctor-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

/* Tablet and up */
@media (min-width: 768px) {
    .doctor-card {
        border-radius: 25px;
    }
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
}

.doctor-card[onclick] {
    cursor: pointer;
}

.doctor-card[onclick]:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
}

.doctor-btn {
    position: relative;
    z-index: 10;
}

.doctor-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Tablet and up */
@media (min-width: 768px) {
    .doctor-image {
        height: 250px;
        font-size: 5rem;
    }
}

.doctor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-image::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #667eea;
}

.doctor-info {
    padding: 1.5rem;
    text-align: center;
}

.doctor-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

/* Tablet and up */
@media (min-width: 768px) {
    .doctor-info {
        padding: 2rem;
    }
    
    .doctor-name {
        font-size: 1.5rem;
    }
}

.doctor-specialty {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.doctor-details {
    display: flex;
    justify-content: space-around;
    margin: 1.25rem 0;
    padding: 0.875rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

/* Tablet and up */
@media (min-width: 768px) {
    .doctor-details {
        margin: 1.5rem 0;
        padding: 1rem 0;
    }
}

.doctor-detail-item {
    text-align: center;
}

.doctor-detail-item i {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.doctor-detail-item span {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
}

.doctor-fee {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    margin: 1rem 0;
}

.doctor-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    min-height: 44px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Tablet */
@media (min-width: 576px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .footer {
        padding: 4rem 0 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 3rem;
        margin-bottom: 3rem;
    }
}

.footer-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #667eea;
}

/* Tablet and up */
@media (min-width: 768px) {
    .footer-section h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #667eea;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #9ca3af;
}

/* Menu Overlay - Hidden by default, shown on mobile when menu is active */
.menu-overlay {
    display: none;
}

/* Ensure overlay is hidden on desktop */
@media (min-width: 769px) {
    .menu-overlay {
        display: none !important;
    }
}

/* Desktop Styles - Ensure proper display */
@media (min-width: 769px) {
    .navbar-nav {
        position: static !important;
        right: auto !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        flex-direction: row !important;
        padding: 0 !important;
        overflow: visible !important;
        gap: 1.5rem;
    }

    .navbar-nav li {
        width: auto !important;
        border-bottom: none !important;
        margin: 0 !important;
        background: transparent !important;
    }

    .navbar-nav .nav-link {
        display: inline-block !important;
        padding: 0.5rem 0.75rem !important;
        width: auto !important;
        color: #333 !important;
        background: transparent !important;
    }

    .navbar-nav .nav-link:hover {
        color: #667eea !important;
        background: transparent !important;
        padding-left: 0.75rem !important;
    }

    .navbar-nav .nav-link::after {
        display: block !important;
    }

    .navbar-nav .btn-nav {
        width: auto !important;
        margin-top: 0 !important;
        padding: 0.6rem 1.5rem !important;
    }

    .navbar-nav .btn-primary-nav {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
        margin-bottom: 0 !important;
    }

    .navbar-nav .btn-outline-nav {
        background: transparent !important;
        border: 2px solid #667eea !important;
        color: #667eea !important;
    }

    .menu-overlay {
        display: none !important;
    }

    .navbar-content {
        flex-wrap: nowrap;
    }
}

/* Mobile Navbar Styles */
@media (max-width: 768px) {
    .topbar {
        display: none;
    }

    .navbar-content {
        padding: 0.75rem 1rem;
        position: relative;
    }

    .navbar-brand {
        flex: 1;
        z-index: 1002;
        position: relative;
    }

    .navbar-brand img {
        height: 35px;
        max-height: 35px;
    }

    .navbar-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
        position: relative;
        z-index: 1002;
    }

    .navbar-toggle i {
        transition: transform 0.3s ease;
    }

    .navbar-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: #ffffff !important;
        flex-direction: column;
        align-items: flex-start;
        padding: 4.5rem 1.5rem 2rem;
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0;
        overflow-y: auto;
        z-index: 1000;
        list-style: none;
        margin: 0;
    }

    .navbar-nav.active {
        right: 0;
    }

    .navbar-nav li {
        width: 100%;
        border-bottom: 1px solid #e5e7eb;
        margin: 0;
        background: transparent !important;
        padding: 0;
    }
    
    .navbar-nav li:last-child {
        border-bottom: none;
    }

    .navbar-nav .nav-link {
        display: block;
        padding: 1rem 0;
        width: 100%;
        min-height: 44px;
        color: #1f2937 !important;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        background: transparent !important;
        border: none !important;
        border-radius: 0;
        position: relative;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:active,
    .navbar-nav .nav-link:focus {
        color: #667eea !important;
        background: rgba(102, 126, 234, 0.08) !important;
        padding-left: 0.75rem;
    }

    .navbar-nav .nav-link::after {
        display: none !important;
    }

    .navbar-nav .btn-nav {
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
        padding: 0.875rem 1.5rem;
        border-radius: 8px;
        text-align: center;
        display: flex;
        align-items: center;
        min-height: 44px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        border: none;
    }

    .navbar-nav .btn-primary-nav {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: #ffffff !important;
        border: none !important;
        margin-bottom: 0.75rem;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }

    .navbar-nav .btn-primary-nav:hover,
    .navbar-nav .btn-primary-nav:active,
    .navbar-nav .btn-primary-nav:focus {
        background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%) !important;
        color: #ffffff !important;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }

    .navbar-nav .btn-outline-nav {
        background: transparent !important;
        border: 2px solid #667eea !important;
        color: #667eea !important;
        margin-bottom: 0;
    }

    .navbar-nav .btn-outline-nav:hover,
    .navbar-nav .btn-outline-nav:active,
    .navbar-nav .btn-outline-nav:focus {
        background: #667eea !important;
        color: #ffffff !important;
        border-color: #667eea !important;
        transform: translateY(-2px);
        box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    }

    /* Menu overlay */
    .menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        backdrop-filter: blur(2px);
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Better spacing for first item */
    .navbar-nav li:first-child {
        margin-top: 0;
    }

    /* Smooth scroll for mobile menu */
    .navbar-nav {
        -webkit-overflow-scrolling: touch;
    }

    /* Ensure no background color conflicts */
    .navbar-nav * {
        box-sizing: border-box;
    }

    /* Active state for mobile menu items */
    .navbar-nav .nav-link:active {
        background: rgba(102, 126, 234, 0.1) !important;
    }

    /* Ensure all list items have proper background */
    .navbar-nav > li {
        background: transparent !important;
    }

    /* Fix any text color inheritance issues - ensure nav links have proper color */
    .navbar-nav a:not(.btn-nav):not(.btn-primary-nav):not(.btn-outline-nav) {
        color: #1f2937 !important;
    }

    /* Ensure button text colors are explicit */
    .navbar-nav .btn-primary-nav {
        color: #ffffff !important;
    }

    .navbar-nav .btn-outline-nav {
        color: #667eea !important;
    }

    /* Ensure proper contrast for all elements */
    .navbar-nav {
        color: #1f2937;
    }

    /* Prevent any color bleeding from parent elements */
    .navbar-nav li a {
        background-color: transparent;
    }

    .navbar-nav li a.btn-primary-nav {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    }

    .navbar-nav li a.btn-outline-nav {
        background: transparent !important;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 32px;
    }
    
    .carousel-content {
        padding: 0 1.25rem;
    }
    
    .carousel-btn {
        padding: 0.75rem 1.75rem;
        font-size: 0.9rem;
    }
    
    .specialty-card {
        padding: 1.25rem;
    }
    
    .action-card {
        padding: 1.5rem;
    }
    
    .doctor-info {
        padding: 1.25rem;
    }
    
    .post-content {
        padding: 1rem;
    }
}

/* Posts Section - Mobile First */
.posts-section {
    background: #f8f9fa;
    padding: 3rem 0;
}

/* Tablet and up */
@media (min-width: 768px) {
    .posts-section {
        padding: 4rem 0;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .posts-section {
        padding: 5rem 0;
    }
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Tablet */
@media (min-width: 576px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
        margin-top: 3rem;
    }
}

.post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

/* Tablet and up */
@media (min-width: 768px) {
    .post-image {
        height: 200px;
        font-size: 3rem;
    }
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.1);
}

.post-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Tablet and up */
@media (min-width: 768px) {
    .post-content {
        padding: 1.5rem;
    }
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.post-author,
.post-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-author i,
.post-date i {
    color: #667eea;
}

.post-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Tablet and up */
@media (min-width: 768px) {
    .post-title {
        font-size: 1.3rem;
    }
}

.post-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.post-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.post-read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.post-read-more:hover {
    color: #764ba2;
    gap: 0.75rem;
}

.post-card.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

/* Posts section already responsive above */

/* Modal Styles - Mobile First */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin: 1rem;
}

.modal-dialog {
    margin: 1rem;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 1.25rem;
}

.modal-header .btn-close {
    filter: invert(1);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-title {
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.3;
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.modal-footer .btn {
    min-height: 44px;
    flex: 1;
    min-width: 120px;
}

/* Tablet and up */
@media (min-width: 768px) {
    .modal-content {
        margin: 1.75rem auto;
    }
    
    .modal-dialog {
        margin: 1.75rem auto;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 2rem;
    }
    
    .modal-footer {
        padding: 1.5rem;
        flex-wrap: nowrap;
    }
    
    .modal-footer .btn {
        flex: 0 1 auto;
    }
}

.form-label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.75rem;
    transition: all 0.3s ease;
    font-size: 1rem; /* Prevents zoom on iOS */
    min-height: 44px;
}

@media (max-width: 575.98px) {
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Back to Top Button - Mobile First */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    min-width: 48px;
    min-height: 48px;
}

/* Tablet and up */
@media (min-width: 768px) {
    .back-to-top {
        bottom: 30px;
        right: 30px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        min-width: 50px;
        min-height: 50px;
    }
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .back-to-top {
        bottom: 40px;
        right: 40px;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 767.98px) {
    /* Improve touch targets */
    a, button, input, select, textarea {
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
    }
    
    /* Prevent text size adjustment on orientation change */
    body {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Better scrolling on mobile */
    .modal-body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Improve carousel indicators for touch */
    .carousel-indicator {
        width: 10px;
        height: 10px;
        min-width: 10px;
        min-height: 10px;
    }
    
    .carousel-indicator.active {
        width: 24px;
    }
    
    /* Better spacing for mobile cards */
    .specialty-card,
    .action-card,
    .doctor-card,
    .post-card {
        margin-bottom: 0;
    }
    
    /* Improve button spacing in footer */
    .footer-links li {
        margin-bottom: 0.75rem;
    }
    
    .footer-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Better social icons for touch */
    .social-icon {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Tablet specific optimizations */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .specialties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .doctors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screen optimizations */
@media (min-width: 1400px) {
    .section-title h2 {
        font-size: 2.75rem;
    }
    
    .carousel-content h1 {
        font-size: 4rem;
    }
    
    .specialties-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .doctors-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large screens */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }
    
    .navbar-content,
    .topbar-content {
        max-width: 1600px;
    }
}

/* Print styles */
@media print {
    .topbar,
    .navbar,
    .back-to-top,
    .carousel-indicators {
        display: none !important;
    }
    
    .section {
        page-break-inside: avoid;
    }
}


