/**
 * Responsive Typography & Layout Stylesheet
 * Dr. Rayaz Ahmed Personal Medical Website
 */

/* ==========================================================================
   1440px - 1920px - ULTRA-WIDE SCREENS
   ========================================================================== */
@media screen and (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
}

/* ==========================================================================
   1024px - 1280px - LAPTOPS / SMALL DESKTOPS
   ========================================================================== */
@media screen and (max-width: 1320px) {
    /* Header Navigation spacing adjustments */
    .header-container {
        gap: 1rem;
        padding: 0 1.5rem;
    }
    .header-logo .logo-title {
        font-size: 1.15rem;
    }
    .header-logo .logo-subtitle {
        font-size: 0.675rem;
    }
    
    .desktop-nav ul {
        gap: 0.85rem;
    }
    .desktop-nav a {
        font-size: 0.875rem;
    }
    
    .header-actions {
        gap: 0.85rem;
    }
    .header-actions .cta-call {
        font-size: 0.875rem;
    }
    .header-actions .cta-btn {
        padding: 0.55rem 1rem;
        font-size: 0.825rem;
    }
    
    /* Grid Adjustments */
    .hero-grid,
    .about-summary-grid,
    .contact-grid {
        gap: 3rem;
    }
    
    /* Tablet Footer: 3-column — col1 spans brand+social, col2 quick links, col3 specialties, col4 contact stacks on right */
    .footer-top .footer-container {
        grid-template-columns: 1fr 1fr 1.2fr;
        gap: 2rem;
    }
    
    .footer-profile-col {
        grid-column: 1;
        grid-row: 1;
    }
    
    .footer-links-col {
        grid-column: 2;
        grid-row: 1;
    }
    
    .footer-specialties-col {
        grid-column: 1;
        grid-row: 2;
        margin-top: 0.5rem;
    }

    .footer-contact-col {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
    
    .footer-logo-img,
    .footer-logo-white {
        height: 42px !important;
    }

    .footer-directions-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        white-space: normal;
    }
}

/* ==========================================================================
   820px - 1180px - LARGE TABLETS / SMALL LAPTOPS (Mobile Toggle Active)
   ========================================================================== */
@media screen and (max-width: 1180px) {
    body {
        font-size: 0.975rem;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    
    /* Toggle Mobile Navigation Elements */
    .desktop-nav,
    .header-actions {
        display: none !important;
    }
    
    .mobile-actions {
        display: flex;
    }
    
    .logo-img {
        height: 38px !important;
    }
    
    /* Stacking grids */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-text {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-ctas {
        justify-content: center;
    }
    
    .trust-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .about-summary-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bmt-feature-card {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2.5rem;
    }
    
    .location-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* ==========================================================================
   768px - SMALL TABLETS
   ========================================================================== */
@media screen and (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    
    /* Enable mobile sticky action bar */
    .mobile-sticky-action-bar {
        display: flex;
    }
    
    /* Ensure content is not hidden behind the action bar */
    body {
        padding-bottom: 60px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .consultation-form-wrapper {
        padding: 2rem;
    }
}

/* ==========================================================================
   480px - 767px - LARGE PHONES
   ========================================================================== */
@media screen and (max-width: 580px) {
    .expertise-grid,
    .profiles-grid,
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .location-cta-group {
        flex-direction: column;
    }
    
    .location-cta-group .btn {
        width: 100%;
    }
}

/* ==========================================================================
   320px - 479px - PHONES (IPHONE SE, SMALL PHONES)
   ========================================================================== */
@media screen and (max-width: 479px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .hero-name {
        font-size: 2.25rem;
    }
    
    .trust-indicators {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .about-bullets-list {
        grid-template-columns: 1fr;
    }
    
    .footer-legal-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-logo .logo-title {
        font-size: 1.15rem;
    }
    
    .header-logo .logo-subtitle {
        font-size: 0.7rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-dot {
        left: -1.5rem;
    }
    
    .blog-filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .blog-search-form {
        max-width: 100%;
    }
    
    .system-page-ctas {
        flex-direction: column;
        width: 100%;
    }
    
    .system-page-ctas .btn {
        width: 100%;
    }
}

/* Mobile Footer: 2-column grid, profile + contact are full-width */
@media screen and (max-width: 767px) {
    .footer-top .footer-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.75rem;
    }
    
    /* Full-width top: logo + description */
    .footer-profile-col {
        grid-column: span 2 !important;
        grid-row: auto !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        padding-bottom: 1.5rem;
    }
    
    /* Quick links - left column */
    .footer-links-col {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    
    /* Specialties - right column */
    .footer-specialties-col {
        grid-column: 2 !important;
        grid-row: auto !important;
        margin-top: 0 !important;
    }
    
    /* Clinic contact - full width bottom */
    .footer-contact-col {
        grid-column: span 2 !important;
        grid-row: auto !important;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
        padding-top: 1.5rem;
    }

    .footer-directions-btn {
        width: 100%;
        justify-content: center;
    }
}
