/* ============================================
   RESPONSIVE STYLES
   Mobile-first approach
   ============================================ */

/* Tablets and below (768px) */
@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }

    .container {
        padding: 0 15px;
    }

    /* Header */
    .header-contact {
        display: none;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Hero */
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

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

    .search-form {
        flex-direction: column;
    }

    /* Bars grid */
    .bars-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* List view - stack on mobile */
    .bars-grid.list-view .bar-card {
        grid-template-columns: 1fr;
    }

    .bars-grid.list-view .bar-image {
        height: 200px;
        min-height: auto;
    }

    /* Bar card */
    .bar-card {
        margin-bottom: 1rem;
    }

    /* Filters */
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filters-actions {
        flex-direction: column;
    }

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

    /* Sidebar Layout - Stack on mobile */
    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .filters-sidebar {
        order: 2;
    }

    .main-content {
        order: 1;
    }

    .sidebar-sticky {
        position: relative;
        top: 0;
    }

    /* Results header */
    .results-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Bar detail page */
    .bar-header-content {
        flex-direction: column;
    }

    .bar-action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .bar-action-buttons .btn {
        width: 100%;
    }

    .bar-details-grid {
        grid-template-columns: 1fr !important;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* Page header */
    .page-header h1 {
        font-size: 1.75rem;
    }

    /* Scroll to top */
    .scroll-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    :root {
        font-size: 13px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .stat-item strong {
        font-size: 1.5rem;
    }

    .bar-features {
        flex-direction: column;
    }

    .feature-tag {
        width: 100%;
        text-align: center;
    }

    /* Age popup */
    .age-popup-content {
        padding: 2rem;
        margin: 1rem;
    }

    .age-popup-buttons {
        flex-direction: column;
    }

    .age-popup-buttons .btn {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .site-header,
    .filters-section,
    .view-toggles,
    .footer,
    .scroll-top,
    .age-popup,
    .btn {
        display: none !important;
    }

    .bar-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --text-color: #000;
        --bg-color: #fff;
        --border-color: #000;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --text-color: #f8f9fa;
        --text-light: #adb5bd;
        --bg-color: #1a1a1a;
        --bg-light: #2d2d2d;
        --border-color: #495057;
    }

    .site-header {
        background: #2d2d2d;
    }

    .bar-card {
        background: #2d2d2d;
    }
    */
}
