/* Additional Responsive Styles for Specific Pages */

/* Event Details Page - Responsive */
@media (max-width: 767px) {
    /* Event Hero - Stack layout */
    section[style*="grid-template-columns: 2fr 1fr"] > div > div[style*="grid-template-columns: 2fr 1fr"] {
        display: block !important;
    }
    
    section[style*="grid-template-columns: 2fr 1fr"] > div > div > div:first-child {
        margin-bottom: 2rem;
    }
    
    /* Event detail boxes */
    div[style*="display: flex; align-items: start; gap: 1rem"] {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    
    div[style*="width: 50px; height: 50px"] {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Podcast Details Page - Responsive */
@media (max-width: 767px) {
    /* Podcast Hero - Stack layout */
    section div[style*="grid-template-columns: 1fr 2fr"] {
        display: block !important;
    }
    
    section div[style*="grid-template-columns: 1fr 2fr"] > div:first-child {
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
    }
    
    section div[style*="grid-template-columns: 1fr 2fr"] > div:first-child img,
    section div[style*="grid-template-columns: 1fr 2fr"] > div:first-child > div {
        max-width: 300px !important;
    }
    
    /* Platform buttons */
    div[style*="display: flex; gap: 1rem; flex-wrap: wrap"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    div[style*="display: flex; gap: 1rem; flex-wrap: wrap"] a {
        width: 100%;
        justify-content: center;
    }
    
    /* Guest profile section */
    section div[style*="display: flex; gap: 3rem"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
        text-align: center;
    }
    
    section div[style*="display: flex; gap: 3rem"] img {
        margin: 0 auto !important;
    }
}

/* Tool Details Page - Responsive */
@media (max-width: 767px) {
    /* Tool hero */
    div[style*="display: grid; grid-template-columns: 1fr 2fr"] {
        display: block !important;
    }
    
    div[style*="display: grid; grid-template-columns: 1fr 2fr"] > div:first-child {
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
    }
}

/* Article Page - Responsive */
@media (max-width: 767px) {
    /* Article meta info */
    div[style*="display: flex; gap: 1rem; margin-bottom: 2rem"] {
        flex-wrap: wrap !important;
    }
    
    /* Sidebar - Stack on mobile */
    div[style*="display: grid; grid-template-columns: 1fr 300px"] {
        display: block !important;
    }
    
    div[style*="display: grid; grid-template-columns: 1fr 300px"] > div:last-child {
        margin-top: 2rem;
    }
}

/* Admin Pages - Responsive */
@media (max-width: 767px) {
    /* Admin forms - Stack grid inputs */
    div[style*="display: grid; grid-template-columns: 1fr 1fr"],
    div[style*="display: grid; grid-template-columns: 1fr 1fr 1fr"] {
        display: block !important;
    }
    
    /* Admin table - Horizontal scroll */
    .admin-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Admin action buttons */
    form[style*="display: inline"] {
        display: block !important;
        margin-bottom: 0.5rem;
    }
}

/* Form Styles - Responsive */
@media (max-width: 767px) {
    /* Two-column forms */
    form div[style*="display: grid; grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }
    
    /* Flex button groups */
    div[style*="display: flex; gap: 1rem"] button,
    div[style*="display: flex; gap: 1rem"] a.btn {
        flex: 1 1 100%;
        min-width: auto;
    }
    
    /* Checkboxes inline */
    div[style*="display: flex; gap: 1rem; margin-bottom: 1rem"] {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* Newsletter Section - Responsive */
@media (max-width: 767px) {
    form[style*="display: flex; gap: 1rem"] {
        flex-direction: column !important;
    }
    
    form[style*="display: flex; gap: 1rem"] input[type="email"] {
        width: 100% !important;
    }
    
    form[style*="display: flex; gap: 1rem"] button {
        width: 100%;
    }
}

/* Stats/Numbers Section - Responsive */
@media (max-width: 767px) {
    div[style*="display: grid; grid-template-columns: repeat("] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    div[style*="display: grid; grid-template-columns: repeat("] {
        grid-template-columns: 1fr !important;
    }
}

/* Image Galleries - Responsive */
@media (max-width: 767px) {
    img[style*="max-width: 400px"],
    img[style*="max-width: 300px"],
    img[style*="max-width: 200px"] {
        max-width: 100% !important;
    }
}

/* Video Embeds - Responsive */
@media (max-width: 767px) {
    iframe[width="100%"] {
        height: 250px !important;
    }
    
    div[style*="padding-bottom: 56.25%"] {
        padding-bottom: 75% !important;
    }
}

/* Font Size Adjustments for Readability */
@media (max-width: 767px) {
    /* Large hero text */
    h1[style*="font-size: 4rem"],
    h1[style*="font-size: 3.5rem"],
    h1[style*="font-size: 3rem"] {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    h2[style*="font-size: 2.5rem"],
    h2[style*="font-size: 2rem"] {
        font-size: 1.5rem !important;
    }
    
    p[style*="font-size: 1.25rem"],
    p[style*="font-size: 1.125rem"] {
        font-size: 1rem !important;
    }
    
    /* Button font sizes */
    a[style*="font-size: 1.125rem"],
    button[style*="font-size: 1.125rem"] {
        font-size: 1rem !important;
        padding: 0.875rem 1.5rem !important;
    }
}

/* Spacing Adjustments */
@media (max-width: 767px) {
    /* Reduce large paddings */
    section[style*="padding: 4rem 0"],
    section[style*="padding: var(--spacing-lg) 0"] {
        padding: 2rem 0 !important;
    }
    
    div[style*="margin-bottom: 4rem"],
    div[style*="margin-bottom: 3rem"] {
        margin-bottom: 2rem !important;
    }
    
    div[style*="gap: 3rem"],
    div[style*="gap: 4rem"] {
        gap: 1.5rem !important;
    }
}

/* Touch-Friendly Targets */
@media (max-width: 767px) and (pointer: coarse) {
    .btn,
    button,
    a.nav-link,
    a.dropdown-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 20px;
        min-height: 20px;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero,
    .section {
        padding: 1.5rem 0 !important;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* This can be enabled if dark mode is desired */
    /* 
    :root {
        --color-white: #1a1a1a;
        --color-charcoal: #ffffff;
    }
    */
}

