/* ==========================================================================
   Large Devices (Desktops, less than 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
    .display-4 {
        font-size: 3rem;
    }
    
    .main-dashboard-img {
        height: 500px;
    }

    .glass-card {
        min-width: 200px;
    }
}

/* ==========================================================================
   Medium Devices (Tablets, less than 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 80px;
    }

    .display-4 {
        font-size: 2.8rem;
    }

    /* Navbar Mobile Menu Adjustments */
    .navbar-collapse {
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 20px;
        border-radius: 15px;
        margin-top: 15px;
        box-shadow: var(--glass-shadow);
        border: 1px solid var(--glass-border);
    }

    .nav-link {
        margin: 10px 0;
        text-align: center;
    }

    .nav-actions {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }
    
    .login-link {
        margin-right: 0 !important;
    }

    /* Adjust Hero Visuals Stacking */
    .hero-visuals {
        margin-top: 80px !important;
        display: flex;
        justify-content: center;
    }

    .main-dashboard-img {
        max-width: 100%;
        height: 450px;
    }

    /* Reset absolute positioning for cards on tablet */
    .card-float-3 {
        top: auto;
        bottom: -30px;
        start: 50%;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
    }
}

/* ==========================================================================
   Small Devices (Landscape phones, less than 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
    .display-4 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Shrink Background Shapes */
    .shape-1 { width: 60vw; height: 60vw; }
    .shape-2 { width: 50vw; height: 50vw; }

    .main-dashboard-img {
        height: 350px;
    }

    /* Adjust floating cards to prevent overlap issues */
    .card-float-1 {
        top: -40px;
        right: 0;
        me: 0;
    }

    .card-float-2 {
        bottom: 20px;
        left: -10px;
    }
}

/* ==========================================================================
   Extra Small Devices (Portrait phones, less than 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
    .display-4 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 1rem;
    }

    .main-dashboard-img {
        height: 280px;
        border-width: 5px;
    }

    .glass-card {
        min-width: 180px;
        padding: 10px !important;
    }

    .icon-box {
        width: 35px;
        height: 35px;
    }

    .icon-box i {
        font-size: 1rem !important;
    }

    h4 {
        font-size: 1.2rem;
    }

    /* Hide smaller text/cards on very small screens to avoid horizontal scroll */
    .card-float-3 {
        display: none; 
    }
}




/* ==========================================================================
   Large Devices Media Breakpoints (Less than 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
    .about-image-container {
        max-width: 100%;
        height: 480px;
    }
    
    .about-overlay-card {
        min-width: 240px;
        padding: 15px !important;
    }
}

/* ==========================================================================
   Medium Devices Media Breakpoints (Tablets, Less than 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .about-section {
        padding: 80px 0;
    }

    .visual-wrapper {
        padding: 15px;
        margin-bottom: 40px;
    }

    .about-image-container {
        height: 450px;
    }

    .about-overlay-card {
        margin-right: 0 !important;
        bottom: -20px;
    }

    .floating-icon-badge.badge-primary {
        right: 15px;
    }
    
    .about-content {
        margin-top: 40px;
    }
}

/* ==========================================================================
   Small Devices Media Breakpoints (Phones Landscape, Less than 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
    .about-image-container {
        height: 380px;
        border-width: 8px;
    }

    .display-5 {
        font-size: 2.2rem;
    }

    .glass-badge {
        /* ms-2: !important; */
        padding: 10px !important;
        min-width: 170px;
    }

    .about-overlay-card {
        min-width: 220px;
    }

    /* Standardized padding conversion for safety flow alignment */
    .stat-glass-card {
        padding: 20px !important;
    }
}

/* ==========================================================================
   Extra Small Devices Media Breakpoints (Phones Portrait, Less than 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
    .about-section {
        padding: 60px 0;
    }

    .about-image-container {
        height: 280px;
        border-width: 5px;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    /* Transform Absolute Complex Layout elements down to flat stacks */
    .glass-badge {
        position: relative !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        margin: 15px 0 !important;
        display: inline-flex !important;
        width: 100%;
    }

    .about-overlay-card {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        margin: 15px 0 !important;
        width: 100%;
    }

    .floating-icon-badge {
        display: none !important; /* Visual cleanup for micro displays */
    }

    .about-action-block {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 20px !important;
    }

    .about-action-block .btn {
        width: 100%;
        text-align: center;
    }
    
    .query-link {
        margin-left: 10px;
    }
}



/* ==========================================================================
   Large Devices Media Adjustments (Less than 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
    .departments-section {
        padding: 100px 0;
    }
    
    .dept-glass-card {
        padding: 24px !important;
    }
}

/* ==========================================================================
   Medium Devices Media Adjustments (Tablets, Less than 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .departments-section {
        padding: 80px 0;
    }

    .display-5 {
        font-size: 2.4rem;
    }

    .lead {
        font-size: 1.05rem;
    }

    .dept-grid {
        max-width: 720px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Small Devices Media Adjustments (Landscape Phones, Less than 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
    .display-5 {
        font-size: 2.1rem;
    }

    .dept-bg-symbol {
        font-size: 3.5rem;
    }
    
    .dept-glass-card {
        border-radius: 24px !important;
    }
}

/* ==========================================================================
   Extra Small Devices Media Adjustments (Portrait Phones, Less than 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
    .departments-section {
        padding: 60px 0;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .dept-grid {
        padding: 0 10px;
    }

    .dept-glass-card {
        padding: 20px !important;
    }

    .dept-icon-area {
        width: 50px;
        height: 50px;
        border-radius: 12px !important;
    }

    .dept-icon-area i {
        font-size: 1.25rem !important;
    }

    h4 {
        font-size: 1.2rem;
    }
    
    /* Minimize moving artifacts to maintain interface memory profiles */
    .dept-bg-symbol {
        display: none !important;
    }
}





/* ==========================================================================
   Large Devices Media Breakpoints (Less than 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
    .doctors-section {
        padding: 100px 0;
    }

    .doc-image-wrapper {
        height: 240px;
    }

    .doc-name {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Medium Devices Media Breakpoints (Tablets, Less than 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .doctors-section {
        padding: 80px 0;
    }

    .display-5 {
        font-size: 2.4rem;
    }

    .doc-grid {
        max-width: 720px;
        margin: 0 auto;
    }
    
    .doc-image-wrapper {
        height: 260px;
    }
}

/* ==========================================================================
   Small Devices Media Breakpoints (Phones Landscape, Less than 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
    .display-5 {
        font-size: 2.1rem;
    }

    .lead {
        font-size: 1.05rem;
    }

    .doc-image-wrapper {
        height: 230px;
    }

    .doc-bg-symbol {
        font-size: 3.5rem;
    }
}

/* ==========================================================================
   Extra Small Devices Media Breakpoints (Phones Portrait, Less than 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
    .doctors-section {
        padding: 60px 0;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .doc-grid {
        padding: 0 10px;
    }

    .doc-glass-card {
        border-radius: 24px !important;
    }

    .doc-image-wrapper {
        height: 210px;
        border-radius: 16px !important;
    }

    .badge-available, .badge-experience {
        padding: 6px 12px !important;
        font-size: 0.7rem !important;
        m-3: 10px !important; 
    }

    .p-4 {
        padding: 18px !important;
    }

    .doc-name {
        font-size: 1.15rem;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .btn-glow {
        padding-top: 0.55rem !important;
        padding-bottom: 0.55rem !important;
        font-size: 0.8rem !important;
    }

    /* Remove heavy vectors to maintain system profile stability */
    .doc-bg-symbol {
        display: none !important;
    }
}










/* ==========================================================================
   Large Devices Media Adjustments (Less than 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
    .appointment-section {
        padding: 100px 0;
    }
    
    .form-glass-container {
        padding: 35px !important;
    }
}

/* ==========================================================================
   Medium Devices Media Adjustments (Tablets, Less than 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .appointment-section {
        padding: 80px 0;
    }

    .display-5 {
        font-size: 2.4rem;
    }

    .appt-info-content {
        margin-bottom: 30px;
    }
    
    .form-glass-container {
        padding: 40px !important;
    }
}

/* ==========================================================================
   Small Devices Media Adjustments (Landscape Phones, Less than 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
    .display-5 {
        font-size: 2.1rem;
    }

    .emergency-glass-card {
        padding: 20px !important;
    }

    .emergency-icon-box {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .appt-bg-symbol {
        font-size: 3.5rem;
    }
}

/* ==========================================================================
   Extra Small Devices Media Adjustments (Portrait Phones, Less than 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
    .appointment-section {
        padding: 60px 0;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .emergency-glass-card .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .form-glass-container {
        padding: 24px 16px !important;
        border-radius: 30px !important;
    }

    .form-control-custom, .form-select-custom {
        padding: 14px 12px 14px 42px; /* Touch target optimizations */
        font-size: 0.9rem; 
    }

    .input-icon {
        left: 15px;
    }

    .secure-badge {
        justify-content: flex-start !important;
        margin-top: 5px;
        margin-left: 4px;
    }

    .success-checkmark-box {
        width: 65px;
        height: 65px;
        font-size: 2.8rem;
    }

    /* System resource architecture optimization element wipeout */
    .appt-bg-symbol {
        display: none !important;
    }
}



/* ==========================================================================
   Large Device Layout Tuning Breakpoints (Less than 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
    .emergency-section {
        padding: 100px 0;
    }

    .emg-number-display {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Medium Tablet Layout Breakpoints (Less than 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .emergency-section {
        padding: 80px 0;
    }

    .display-5 {
        font-size: 2.3rem;
    }

    .emg-grid {
        max-width: 720px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Small Mobile Landscape Breakpoints (Less than 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
    .display-5 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1.05rem;
    }
}

/* ==========================================================================
   Extra Small Mobile Portrait Breakpoints (Less than 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
    .emergency-section {
        padding: 60px 0;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .emg-grid {
        padding: 0 10px;
    }

    .emg-glass-card {
        border-radius: 24px !important;
        padding: 24px 20px !important;
    }

    .emg-icon-box {
        width: 46px;
        height: 46px;
        font-size: 1.15rem;
    }

    .emg-number-display {
        font-size: 1.35rem; /* Amplified clear contrast accessibility for urgent phone clicks */
        text-align: center;
        margin-top: 15px;
    }

    .btn-danger-glow, .btn-primary-glow {
        padding-top: 0.8rem !important;
        padding-bottom: 0.8rem !important; /* Touch target optimizations to avoid misclicks */
        font-size: 0.88rem !important;
    }

    /* Suppress absolute background particles for lighter phone rendering performance */
    .emg-particle {
        display: none !important;
    }
}





/* ==========================================================================
   Large Devices Viewports Layout Tuning (Less than 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
    .blog-section {
        padding: 100px 0;
    }
    
    .blog-title {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Medium Tablet Viewports Grid Balancing Frameworks (Less than 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .blog-section {
        padding: 80px 0;
    }

    .display-5 {
        font-size: 2.3rem;
    }

    .blog-grid {
        max-width: 740px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Small Mobile Landscape Breakpoints (Less than 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
    .display-5 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1.05rem;
    }
    
    .blog-img-container {
        height: 180px;
    }
}

/* ==========================================================================
   Extra Small Mobile Portrait Custom Interfaces (Less than 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
    .blog-section {
        padding: 60px 0;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .blog-grid {
        padding: 0 8px;
    }

    .blog-glass-card {
        border-radius: 24px !important;
    }

    .blog-content {
        padding: 20px !important;
    }

    .btn-read-more {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important; /* Touch-optimized scaling sizing variables */
    }

    /* Suppress absolute heavy vector particles to accelerate rendering processing */
    .blog-particle {
        display: none !important;
    }
}






/* ==========================================================================
   Large Monitor Sizing Fine-Tuning Viewports (Less than 1200px)
   ========================================================================== */
@media (max-width: 1199.98px) {
    .footer-section {
        padding: 80px 0 20px 0;
    }
}

/* ==========================================================================
   Medium Tablet Viewport Directory Adjustments (Less than 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .ft-directory-grid {
        --bs-gutter-y: 2.5rem;
    }
    
    .link-header-title {
        margin-bottom: 1.25rem !important;
    }
}

/* ==========================================================================
   Small Devices Grid Restructuring Viewports (Less than 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
    .footer-section {
        padding: 60px 0 20px 0;
    }

    .ft-newsletter-card {
        padding: 30px 20px !important;
        border-radius: 28px !important;
    }

    .ft-newsletter-form .input-group {
        border-radius: 24px !important;
        flex-direction: column;
        background-color: transparent;
        border: none;
        gap: 12px;
    }

    .ft-newsletter-form .input-group-text {
        display: none; /* Strip vector graphic markers to generate entry layout space */
    }

    .ft-newsletter-form .form-control {
        background-color: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid var(--white-10) !important;
        border-radius: 24px !important;
        padding: 14px 20px !important;
        width: 100%;
        text-align: center;
    }

    .btn-subscribe {
        width: 100%;
        margin: 0 !important;
        padding: 12px 0 !important;
    }
}

/* ==========================================================================
   Extra Small Mobile Phone Screen Alignments (Less than 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
    .footer-section {
        padding-top: 50px;
    }

    .ft-brand-column, 
    .ft-directory-grid [class*="col-"] {
        text-align: center;
    }

    .ft-social-links {
        justify-content: center;
    }

    .ft-links-list a {
        justify-content: center;
    }

    .ft-contact-info li {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 6px !important;
    }

    .ft-hours-badge {
        max-width: 290px;
        margin: 0 auto;
        justify-content: center;
        text-align: left;
    }

    .ft-legal-links {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    /* Suppress absolute animated particle properties to minimize processor load */
    .ft-particle {
        display: none !important;
    }
}