/* Responsive Design System for brandonwass.com */
/* Automatically adapts to different devices and browsers */

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
/* Mobile: < 576px (default) */
/* Tablet: 576px - 768px */
/* Desktop: 768px - 1024px */
/* Large Desktop: > 1024px */

/* ============================================
   MOBILE-FIRST BASE STYLES
   ============================================ */

/* Navigation - Mobile Hamburger Menu */
@media (max-width: 767px) {
    header {
        position: relative;
        padding: 0;
    }
    
    nav {
        position: relative;
        padding: 0;
        min-height: 60px;
    }
    
    /* Hide regular navigation on mobile */
    nav ul {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background-color: #2c3e50;
        margin: 0;
        padding: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    }
    
    /* Show navigation when active */
    nav ul.active {
        display: flex;
        max-height: 600px;
        padding: 1rem 0;
    }
    
    nav a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    nav a:last-child {
        border-bottom: none;
    }
    
    nav a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Hamburger Menu Button - Always visible on mobile */
    .mobile-menu-toggle {
        display: block !important;
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        background: #2c3e50;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 4px;
        color: white;
        font-size: 1.25rem;
        cursor: pointer;
        z-index: 1001;
        padding: 0.5rem 0.75rem;
        min-width: 44px;
        min-height: 44px;
        transition: all 0.3s;
        line-height: 1.2;
    }
    
    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:active {
        background: #34495e;
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    .mobile-menu-toggle.active {
        background: #34495e;
        border-color: rgba(255, 255, 255, 0.6);
    }
    
    .mobile-menu-toggle:focus {
        outline: 2px solid white;
        outline-offset: 2px;
    }
}

/* Hide hamburger on desktop, show regular nav */
@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    nav ul {
        display: flex !important;
        max-height: none !important;
        position: static !important;
        box-shadow: none !important;
        overflow: visible !important;
        padding: 0 !important;
        background-color: transparent !important;
    }
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */

@media (max-width: 575px) {
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    body {
        font-size: 14px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
}

/* ============================================
   RESPONSIVE CONTAINERS
   ============================================ */

main {
    padding: 1rem;
}

@media (min-width: 576px) {
    main {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    main {
        padding: 2rem;
    }
}

/* ============================================
   RESPONSIVE GRIDS
   ============================================ */

/* Auto-responsive grid helper */
.responsive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .responsive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .responsive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .responsive-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   RESPONSIVE TABLES
   ============================================ */

@media (max-width: 767px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    thead, tbody, tr {
        display: block;
    }
    
    th, td {
        display: block;
        text-align: left;
        padding: 0.5rem;
    }
    
    th {
        font-weight: bold;
        border-bottom: 2px solid #ddd;
    }
}

/* ============================================
   RESPONSIVE FORMS
   ============================================ */

@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="file"],
    textarea,
    select {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    button, .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ============================================
   RESPONSIVE VIDEO PLAYER
   ============================================ */

.video-player,
.video-player video {
    width: 100%;
    height: auto;
    max-width: 100%;
}

@media (max-width: 767px) {
    .video-player {
        padding-top: 56.25%; /* 16:9 aspect ratio */
        position: relative;
    }
    
    .video-player video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* ============================================
   RESPONSIVE CARDS
   ============================================ */

@media (max-width: 575px) {
    .content-card,
    .feature-card,
    .card {
        margin-bottom: 1rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* ============================================
   RESPONSIVE FILTERS/SIDEBARS
   ============================================ */

@media (max-width: 767px) {
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group label {
        margin-bottom: 0.5rem;
    }
    
    .filter-select,
    .filter-input {
        width: 100%;
    }
}

/* ============================================
   TOUCH-FRIENDLY INTERACTIVE ELEMENTS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Mobile/touch devices */
    a, button, .btn {
        min-height: 44px; /* Apple's recommended touch target size */
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Larger tap targets for mobile */
    nav a {
        padding: 1rem;
    }
}

/* ============================================
   SAFARI-SPECIFIC FIXES
   ============================================ */

@supports (-webkit-touch-callout: none) {
    /* Safari-specific styles */
    input, textarea, select {
        -webkit-appearance: none;
        border-radius: 0;
    }
    
    /* Fix for Safari viewport height issues */
    .full-height {
        height: -webkit-fill-available;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    header, footer, nav, .no-print {
        display: none !important;
    }
    
    main {
        box-shadow: none;
        padding: 0;
    }
}

