/*
 * AppyInFesta - Mobile CSS
 * Mobile-first responsive styles
 */

/* Default: Mobile (xs < 576px) - 1 column */
.events-grid,
.foodtrucks-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.5rem;
}

/* Small devices (sm ≥ 576px) */
@media (min-width: 576px) {
    .events-grid,
    .foodtrucks-grid {
        padding: 0 1rem;
        gap: 1.25rem;
    }

    .content-wrapper {
        padding: 1.5rem 1rem;
    }
}

/* Medium devices (md ≥ 768px) - 2 columns */
@media (min-width: 768px) {
    .events-grid,
    .foodtrucks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .content-wrapper {
        padding: 2rem 1.5rem;
    }

    body {
        padding-top: 80px;
    }

    .navbar-brand {
        font-size: 1.75rem;
    }
}

/* Large devices (lg ≥ 992px) - 3 columns */
@media (min-width: 992px) {
    .events-grid,
    .foodtrucks-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .content-wrapper {
        padding: 3rem 2rem;
    }
}

/* Extra large devices (xl ≥ 1200px) */
@media (min-width: 1200px) {
    .events-grid,
    .foodtrucks-grid {
        gap: 2.5rem;
    }
}

/* Mobile navigation */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: var(--radius-card);
        box-shadow: var(--shadow-card);
    }

    .nav-item {
        margin-bottom: 0.5rem;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 0.25rem;
    }

    .nav-link:hover,
    .nav-link.active {
        background-color: rgba(255, 138, 0, 0.1);
    }
}

/* Mobile forms */
@media (max-width: 767px) {
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-group .btn {
        width: auto;
    }
}

/* Mobile footer */
@media (max-width: 767px) {
    .footer .col-md-4 {
        text-align: center;
        margin-bottom: 2rem;
    }

    .footer ul {
        padding-left: 0;
    }

    .social-links {
        justify-content: center;
    }
}

/* Touch-friendly spacing */
@media (hover: none) and (pointer: coarse) {
    /* Mobile touch devices */
    .btn,
    .nav-link,
    .card {
        min-height: 44px; /* Apple's minimum touch target */
    }

    .notification-star {
        width: 48px;
        height: 48px;
    }

    .btn-expand,
    .btn-collapse {
        padding: 0.5rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 767px) and (orientation: landscape) {
    body {
        padding-top: 60px;
    }

    .navbar {
        padding: 0.25rem 1rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .card-img-wrapper {
        height: 150px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn-expand,
    .btn-collapse,
    .notification-star {
        display: none;
    }

    .content-wrapper {
        padding-top: 0;
    }

    .event-card,
    .foodtruck-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Detail page cover image — portrait on mobile, landscape cap on desktop */
.detail-cover {
    max-height: 500px; /* desktop default */
}

@media (max-width: 575px) {
    .detail-cover {
        max-height: none;   /* let portrait image breathe */
        height: auto;
        /* 600x800 portrait shown at ~400px wide → natural height ~533px */
        /* fills screen nicely and shows more of the cover/programma */
    }
}

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