/* ==========================================================================
   Murjan General Pro - Responsive Stylesheet
   Mobile, Tablet & Breakpoint Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-visual-card {
        max-width: 600px;
        margin: 0 auto;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-item {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }

    .estimator-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 991px) {
    .topbar {
        display: none; /* Hide topbar on mobile/tablets to maximize screen space */
    }

    .header-main {
        position: sticky !important;
        top: 0 !important;
        z-index: 10000 !important;
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .nav-wrapper {
        height: 72px;
    }

    .brand-logo-img {
        height: 42px;
        max-width: 210px;
    }

    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: var(--radius-md);
        background: var(--bg-surface);
        border: 1px solid var(--border-medium);
        color: var(--primary);
        cursor: pointer;
        padding: 0;
        transition: var(--transition);
        z-index: 10001;
    }

    .mobile-toggle:hover,
    .mobile-toggle:active {
        background: var(--primary);
        color: #ffffff;
    }

    .nav-actions .btn-quote {
        display: none; /* In mobile drawer instead */
    }

    .nav-menu {
        position: fixed !important;
        top: 72px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 72px) !important;
        height: calc(100dvh - 72px) !important;
        background: #ffffff !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 1.5rem 1.25rem 3.5rem 1.25rem !important;
        gap: 0.65rem !important;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        border-top: 1px solid var(--border-light);
    }

    .nav-menu.open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-menu .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--primary);
        background: #f8fafc;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        text-decoration: none;
        transition: var(--transition);
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background: rgba(200, 150, 62, 0.08);
        color: var(--accent);
        border-color: var(--accent);
    }

    .nav-menu .nav-link.active::after {
        display: none;
    }

    .nav-menu .mobile-drawer-cta {
        margin-top: 1rem;
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
        padding-top: 1rem;
        border-top: 1px dashed var(--border-medium);
    }
}

@media (max-width: 768px) {

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.85rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .estimator-box {
        padding: 1.5rem;
    }

    .hero-floating-stat {
        top: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
    }

    .hero-image-wrapper {
        height: 360px;
    }

    .murjan-fab-wrapper {
        bottom: 1.25rem;
        right: 1.25rem;
    }

    .murjan-fab-main-btn {
        width: 54px;
        height: 54px;
    }

    .murjan-fab-panel {
        bottom: 68px;
        right: 0;
        width: calc(100vw - 2.5rem);
    }
}

@media (max-width: 480px) {
    .brand-logo-img {
        height: 36px;
        max-width: 175px;
    }

    .footer-logo-img {
        height: 44px;
        max-width: 210px;
    }

    .logo-sub {
        display: none !important; /* Hide long sub-title on mobile so logo fits neatly next to hamburger */
    }

    .brand-logo {
        gap: 0.6rem;
    }

    .logo-badge {
        width: 40px;
        height: 40px;
    }

    .logo-title {
        font-size: 1.2rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .compliance-badge-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Horizontally Scrollable Category Filter Pills */
    #projectsFilterBar {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        padding-bottom: 0.5rem;
        scrollbar-width: thin;
        gap: 0.5rem;
        width: 100%;
    }

    #projectsFilterBar .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.45rem 1rem;
        font-size: 0.82rem;
    }
}
