/* ============================================
   Feza Film - Responsive Design
   Bootstrap 5 Compatible
   Mobile-First Approach
   ============================================ */

/* ============================================
   Extra Small Devices (< 576px)
   Default mobile styles are in style.css
   ============================================ */

@media (max-width: 575.98px) {
    /* Typography Adjustments */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Spacing Adjustments */
    .section-padding {
        padding: 2.5rem 0;
    }
    
    /* Hero Section */
    .hero {
        min-height: 80vh;
        padding: 3rem 1rem;
    }
    
    .hero-logo img {
        height: 60px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 60px 0 40px;
        margin-bottom: 2rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-header .lead {
        font-size: 0.9375rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .card-text {
        font-size: 0.875rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }
    
    .footer-about img {
        height: 50px;
    }
    
    /* Header */
    .header .logo img {
        height: 40px;
    }
    
    /* Counter */
    .counter {
        font-size: 2.5rem;
    }
    
    /* Sticky Social Bar - Hide on small mobile */
    .sticky-social-bar {
        display: none;
    }
}

/* ============================================
   Small Devices (576px - 767.98px)
   ============================================ */

@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero Section */
    .hero-logo img {
        height: 80px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    /* Cards - 2 columns on small tablets */
    .films-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer */
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Medium Devices (768px - 991.98px)
   Tablets
   ============================================ */

@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Hero Section */
    .hero {
        min-height: 90vh;
    }
    
    .hero-logo img {
        height: 90px;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: row;
    }
    
    /* Page Header */
    .page-header {
        padding: 80px 0 60px;
    }
    
    /* Cards - 3 columns on tablets */
    .row.g-4 > [class*="col"] {
        margin-bottom: 1.5rem;
    }
    
    /* Footer */
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    /* Navigation - Mobile menu still active */
    .main-nav {
        width: 320px;
    }
    
    /* Counter */
    .counter {
        font-size: 3.5rem;
    }
}

/* ============================================
   Large Devices (992px - 1199.98px)
   Desktops
   ============================================ */

@media (min-width: 992px) {
    /* Navigation - Desktop mode */
    .main-nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }
    
    .main-nav ul {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .main-nav ul li {
        border-bottom: none;
    }
    
    .main-nav ul li a {
        padding: 0.5rem 1rem;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .header-cta {
        display: block;
    }
    
    /* Hero Section */
    .hero {
        min-height: 100vh;
    }
    
    .hero-logo img {
        height: 100px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 100px 0 80px;
        margin-bottom: 4rem;
    }
    
    /* Spacing */
    .section-padding {
        padding: 4rem 0;
    }
    
    /* Cards - Full Bootstrap grid */
    .card:hover {
        transform: translateY(-10px);
    }
    
    /* Footer */
    .footer {
        padding: 4rem 0 2rem;
    }
    
    .footer-top {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 3rem;
    }
    
    /* Sticky Social Bar - Show on desktop */
    .sticky-social-bar {
        display: flex;
    }
    
    /* Counter */
    .counter {
        font-size: 4rem;
    }
    
    /* Show desktop-only elements */
    .d-desktop {
        display: block !important;
    }
}

/* ============================================
   Extra Large Devices (1200px - 1399.98px)
   Large Desktops
   ============================================ */

@media (min-width: 1200px) and (max-width: 1399.98px) {
    /* Container max-width handled by Bootstrap */
    
    /* Hero Section */
    .hero-title {
        font-size: 3.75rem;
    }
    
    /* Cards - Larger grid items */
    .films-grid {
        gap: 2rem;
    }
    
    /* Typography */
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2.75rem;
    }
}

/* ============================================
   Extra Extra Large Devices (≥ 1400px)
   Very Large Desktops
   ============================================ */

@media (min-width: 1400px) {
    /* Hero Section */
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
    }
    
    /* Typography */
    h1 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    /* Spacing */
    .section-padding {
        padding: 5rem 0;
    }
    
    /* Cards */
    .card-body {
        padding: 2rem;
    }
    
    /* Footer */
    .footer-top {
        gap: 4rem;
    }
}

/* ============================================
   Landscape Orientation on Mobile/Tablet
   ============================================ */

@media (max-height: 600px) and (orientation: landscape) {
    /* Hero Section - Reduce height on landscape */
    .hero {
        min-height: 100vh;
        padding: 2rem 1rem;
    }
    
    .hero-logo img {
        height: 60px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* Page Header */
    .page-header {
        padding: 60px 0 40px;
    }
    
    /* Section Padding */
    .section-padding {
        padding: 2rem 0;
    }
    
    /* Header */
    .header {
        padding: 0.5rem 0;
    }
    
    .header .logo img {
        height: 40px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    /* Hide interactive elements */
    .header,
    .footer,
    .mobile-menu-toggle,
    .sticky-social-bar,
    .hero-buttons,
    .btn,
    .scroll-indicator,
    .social-links {
        display: none !important;
    }
    
    /* Adjust for print */
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-overlay {
        display: none;
    }
    
    .hero-title,
    .hero-subtitle,
    h1, h2, h3, h4, h5, h6,
    .card-title {
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        background: white !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .section-padding {
        padding: 1.5rem 0;
    }
    
    /* Force single column for print */
    .row {
        display: block !important;
    }
    
    .row > [class*="col"] {
        width: 100% !important;
        margin-bottom: 1rem;
    }
}

/* ============================================
   High Contrast Mode
   ============================================ */

@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 3px;
    }
    
    .form-control,
    .form-select {
        border-width: 2px;
    }
}

/* ============================================
   Dark Mode (System Preference)
   Note: Site is already dark by default
   ============================================ */

@media (prefers-color-scheme: light) {
    /* If needed, add light mode overrides here */
    /* Currently the site is intentionally dark-themed */
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto !important;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .hero-logo img {
        animation: none;
    }
}

/* ============================================
   Container Adjustments (Bootstrap Compatible)
   ============================================ */

/* Don't override Bootstrap container max-widths */
/* These are already handled by Bootstrap 5 */

/* Custom container for hero sections if needed */
.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .hero-container {
        padding: 0 2rem;
    }
}

@media (min-width: 1200px) {
    .hero-container {
        padding: 0 3rem;
    }
}

/* ============================================
   Grid Adjustments
   ============================================ */

/* Custom grid for film cards */
.films-grid {
    display: grid;
    gap: 1.5rem;
}

@media (max-width: 575.98px) {
    .films-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .films-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .films-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (min-width: 992px) {
    .films-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 2rem;
    }
}

/* ============================================
   Utility Classes for Responsive Display
   ============================================ */

/* These complement Bootstrap's display utilities */

.mobile-only {
    display: block;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
}

.tablet-only {
    display: none;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .tablet-only {
        display: block;
    }
}

.desktop-only {
    display: none;
}

@media (min-width: 992px) {
    .desktop-only {
        display: block;
    }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .main-nav ul li a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .social-links a {
        min-width: 48px;
        min-height: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    .hover-lift:hover {
        transform: none;
    }
    
    /* Show overlay on touch by default for cards */
    .card .card-overlay {
        opacity: 0;
        pointer-events: none;
    }
    
    .card.active .card-overlay {
        opacity: 1;
        pointer-events: all;
    }
}

/* ============================================
   Safe Area Support (iOS Notch, etc.)
   ============================================ */

@supports (padding: max(0px)) {
    .header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .hero {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .footer {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}
