/*!
 * Seydikemer Portal - Responsive CSS
 */

/* Mobile First Approach */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-section {
        height: 40vh;
        min-height: 300px;
    }
    
    .hero-slide h1 {
        font-size: 1.75rem;
    }
    
    .hero-slide .lead {
        font-size: 1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0 !important;
    }
    
    .top-bar .contact-info span {
        display: block;
        margin-bottom: 5px;
    }
    
    .navbar-brand .brand-text {
        display: none;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .newsletter-form .input-group {
        flex-direction: column;
    }
    
    .newsletter-form .btn {
        margin-top: 10px;
        border-radius: 6px !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-slide h1 {
        font-size: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-slide h1 {
        font-size: 2.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-section {
        height: 70vh;
        min-height: 500px;
    }
    
    /* Multi-column layouts work better on larger screens */
    .place-card,
    .event-card,
    .blog-card {
        height: 100%;
    }
}

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section {
        height: 75vh;
        min-height: 600px;
    }
}

/* Ultra Wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Touch devices optimizations */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
    }
    
    .category-hover:hover {
        transform: none;
    }
    
    .btn-back-to-top {
        width: 50px;
        height: 50px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-slide {
        background-attachment: scroll; /* Fix for mobile */
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #121212;
        --bs-body-color: #ffffff;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-slide {
        transition: none;
    }
    
    .card:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .btn-back-to-top,
    .hero-controls,
    .hero-indicators,
    .newsletter-section {
        display: none !important;
    }
    
    .hero-section {
        height: auto;
        min-height: auto;
        background: none !important;
        color: #000 !important;
    }
    
    .hero-slide {
        position: static;
        opacity: 1 !important;
        background: none !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: #000 !important;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* Container queries (future-proofing) */
@supports (container-type: inline-size) {
    .card-container {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .card-title {
            font-size: 1rem;
        }
        
        .card-body {
            padding: 0.75rem;
        }
    }
}