/**
 * FileSwift Responsive Layout & Breakpoint Styles
 * Mobile-first optimization from 320px to 1440px+
 */

/* Mobile Drawer Navigation Styles */
.mobile-nav {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    height: calc(100vh - 72px);
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-inner {
    width: 85%;
    max-width: 340px;
    height: 100%;
    background: var(--surface);
    padding: 1.5rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xl);
}

.mobile-nav.open .mobile-nav-inner {
    transform: translateX(0);
}

.mobile-nav-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--surface-border);
}

.mobile-group-title {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.mobile-link {
    display: block;
    padding: 0.65rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
}

.mobile-link:hover {
    background-color: var(--surface-hover);
    color: var(--primary);
}

.mobile-nav-footer-links {
    border-bottom: none;
}

.mobile-nav-footer-links .mobile-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
}

/* ==========================================================
   Breakpoints: Max-Width 1024px (Tablets & Small Laptops)
   ========================================================== */
@media (max-width: 1024px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

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

    .footer-col-brand {
        grid-column: span 2;
    }
}

/* ==========================================================
   Breakpoints: Max-Width 768px (Mobile & Small Tablets)
   ========================================================== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 { font-size: 2.15rem; }
    h2 { font-size: 1.65rem; }

    .header-container {
        height: 64px;
    }

    .mobile-nav {
        top: 64px;
        height: calc(100vh - 64px);
    }

    .hero-section {
        padding: 3.5rem 0 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 1.75rem;
    }

    .search-input {
        padding: 0.95rem 1.15rem 0.95rem 3.25rem;
        font-size: 0.95rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

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

    .footer-col-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        min-height: 44px; /* Ensure 44px touch targets */
    }

    .tool-controls-grid {
        grid-template-columns: 1fr !important;
    }

    .tool-split-view {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================
   Breakpoints: Max-Width 480px (Phones: 320px - 480px)
   ========================================================== */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1 { font-size: 1.85rem; }

    .hero-section {
        padding: 2.75rem 0 2rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .category-tabs {
        gap: 0.4rem;
    }

    .tab-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }

    .header-actions .btn {
        display: none; /* Hide secondary CTA on very small screens to make room for hamburger */
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        top: 75px;
    }

    .toast-message {
        min-width: unset;
        width: 100%;
    }
}
