/* =========================================================
   Taqueria Los Primos — “Fiesta Barson” theme
   Inspired by ThemeColorsAndFont.jpg (original adaptation)
   Palette: Fiesta Red · Agave Green · Sol Yellow · Crema
   Type: Lilita One (display) · Nunito (body) — Google Fonts
   ========================================================= */

:root {
    /* Core brand */
    --fiesta-red: #E63946;
    --fiesta-red-deep: #C62828;
    --agave-green: #2E9B4E;
    --agave-green-deep: #1F7A3A;
    --sol-yellow: #F4C430;
    --sol-yellow-deep: #E0B000;
    --crema: #FFF8E7;
    --crema-soft: #F7F1E3;
    --charcoal: #1C1C1C;
    --ink: #2A2A2A;
    --muted: #6B6560;

    /* Semantic aliases (used across components) */
    --primary: var(--fiesta-red);
    --secondary: var(--agave-green);
    --accent: var(--sol-yellow);
    --pink: var(--fiesta-red);
    --green: var(--agave-green);
    --yellow: var(--sol-yellow);
    --neon-blue: var(--agave-green);
    --purple: var(--fiesta-red-deep);
    --orange: var(--sol-yellow);
    --teal: var(--agave-green);
    --red: var(--fiesta-red);
    --blue: var(--agave-green);
    --focus: var(--sol-yellow);

    /* Surfaces */
    --bg-page: var(--crema-soft);
    --bg-card: #ffffff;
    --bg-nav: rgba(28, 28, 28, 0.94);

    /* Type */
    --font-display: "Lilita One", "Impact", "Arial Black", system-ui, sans-serif;
    --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius-pill: 999px;
    --radius-card: 16px;
    --shadow-soft: 0 10px 40px rgba(28, 28, 28, 0.08);
    --shadow-pop: 0 12px 28px rgba(230, 57, 70, 0.28);
}

/* ---- Base ---- */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg-page);
    line-height: 1.65;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6,
.font-display,
.logo-font,
.navbar-brand span,
#hero-name,
#about-heading,
#gallery-heading,
#menu-heading,
#reviews-heading,
#contact-heading,
.section-title {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
    font-weight: 400;
    line-height: 1.15;
}

img,
iframe,
video {
    max-width: 100%;
}

/* Decorative geometric accents (moodboard-inspired corners) */
.fiesta-shape {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
}

/* ---- Skip link ---- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 100000;
    background: var(--sol-yellow);
    color: var(--charcoal);
    padding: 12px 20px;
    font-weight: 800;
    font-family: var(--font-body);
    text-decoration: none;
    border-radius: 4px;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    transition: top 0.2s ease;
    box-shadow: 0 4px 0 var(--fiesta-red);
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 12px;
    outline: 3px solid var(--agave-green);
    outline-offset: 2px;
}

/* ---- Focus ---- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.order-btn:focus-visible,
.nav-link:focus-visible,
.audio-btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 3px solid var(--sol-yellow);
    outline-offset: 3px;
}

/* ---- Navbar ---- */
.navbar {
    background: var(--bg-nav) !important;
    backdrop-filter: blur(12px);
    border-bottom: 3px solid var(--fiesta-red);
}

.navbar .nav-link {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--sol-yellow) !important;
}

.navbar-brand span {
    font-size: 1.35rem;
    color: var(--crema) !important;
}

.navbar-toggler {
    border-color: var(--sol-yellow);
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* ---- Order / brand buttons ---- */
.order-btn,
.btn-fiesta,
.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 18px;
    min-height: 44px;
    border: none;
    border-radius: var(--radius-pill);
    margin: 4px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
}

.order-btn:hover,
.btn-fiesta:hover,
.btn-brand:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    text-decoration: none;
    filter: brightness(1.05);
}

/* Named variants */
.btn-sol,
.order-btn-sol { background: var(--sol-yellow) !important; color: var(--charcoal) !important; }
.btn-fiesta-red,
.order-btn-red { background: var(--fiesta-red) !important; color: #fff !important; }
.btn-agave,
.order-btn-green { background: var(--agave-green) !important; color: #fff !important; }
.btn-crema { background: var(--crema) !important; color: var(--fiesta-red) !important; }

#hero-order-btns .btn,
#hero-order-btns .order-btn {
    min-width: 148px;
}

.menu-item .order-btn {
    font-size: 0.8rem;
    padding: 8px 14px;
    min-height: 44px;
}

/* ---- Audio buttons ---- */
.audio-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: var(--crema);
    border: 2px solid var(--fiesta-red);
    color: var(--fiesta-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.audio-btn.playing,
.audio-btn[aria-pressed="true"] {
    background: var(--fiesta-red);
    color: #fff;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

/* ---- Hero + local video ---- */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 100svh;
    height: auto;
    padding: 5.5rem 0 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: var(--charcoal);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(28, 28, 28, 0.35) 0%, rgba(230, 57, 70, 0.35) 55%, rgba(28, 28, 28, 0.75) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.65);
}

.hero-content h1,
#hero-name {
    color: var(--crema);
    text-transform: uppercase;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
}

#hero-tagline {
    color: var(--sol-yellow);
    font-weight: 700;
}

#hero-welcome {
    color: rgba(255, 248, 231, 0.92);
    font-weight: 500;
}

.scroll-down {
    z-index: 3;
    color: var(--sol-yellow) !important;
}

/* ---- Sections ---- */
#about.bg-white,
section.bg-white {
    background: #fff !important;
}

#gallery.bg-light,
section.bg-light {
    background: var(--crema-soft) !important;
}

#about-heading,
#gallery-heading,
#menu-heading,
#reviews-heading {
    color: var(--fiesta-red);
    text-transform: uppercase;
}

.section-kicker {
    display: inline-block;
    background: var(--sol-yellow);
    color: var(--charcoal);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    margin-bottom: 0.75rem;
}

/* ---- Parallax quotes ---- */
.parallax {
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.parallax::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.72), rgba(46, 155, 78, 0.55));
}

.parallax blockquote {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-style: normal;
    max-width: 860px;
    z-index: 2;
    color: var(--crema);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
    padding-left: 1rem;
    padding-right: 1rem;
    letter-spacing: 0.01em;
}

/* ---- Menu ---- */
.menu-item {
    transition: background 0.2s ease, border-radius 0.2s ease, box-shadow 0.2s ease;
    border-bottom: 1px dashed rgba(230, 57, 70, 0.2) !important;
}

.menu-item:hover {
    background: var(--crema);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.menu-item h5,
.menu-item h3 {
    font-family: var(--font-display);
    color: var(--fiesta-red);
}

.menu-item .col-md-4 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

/* ---- Gallery ---- */
#gallery {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

#gallery .container-fluid {
    max-width: 100%;
}

#gallery-grid .col-6 {
    padding-left: 2px;
    padding-right: 2px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    margin-bottom: 4px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
    transform: scale(1.025);
    box-shadow: var(--shadow-pop);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.gallery-item:hover img {
    transform: scale(1.09);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(230, 57, 70, 0.92) 0%, rgba(28, 28, 28, 0.2) 55%, transparent 100%);
    color: var(--crema);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-within .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h5 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--crema);
}

.gallery-overlay p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.95;
    line-height: 1.35;
    font-family: var(--font-body);
}

/* ---- Reviews ---- */
#reviews {
    background: linear-gradient(180deg, var(--crema-soft) 0%, #fff 100%);
}

.review-card {
    max-width: 680px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border-top: 5px solid var(--fiesta-red);
}

.review-card p {
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--ink);
}

/* ---- Contact ---- */
#contact {
    min-height: 0;
}

#contact iframe {
    min-height: 240px;
}

.contact-card {
    max-width: 420px;
    width: 92%;
    z-index: 10;
    border-top: 5px solid var(--agave-green);
}

#contact-heading {
    color: var(--fiesta-red);
    font-family: var(--font-display);
}

/* ---- Footer ---- */
footer.bg-dark,
footer[role="contentinfo"] {
    background: var(--charcoal) !important;
    border-top: 4px solid var(--sol-yellow);
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--sol-yellow) !important;
}

/* ---- Accessibility FAB ---- */
.accessibility-btn {
    width: 58px;
    height: 58px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    background: var(--fiesta-red) !important;
    border: 3px solid var(--sol-yellow) !important;
    color: #fff !important;
}

/* ---- Modals ---- */
#galleryModal .modal-header {
    background: var(--fiesta-red) !important;
}

#galleryModal .modal-title,
#newsletterModalLabel,
#accModalLabel {
    font-family: var(--font-display);
}

#galleryModal.fade .modal-dialog {
    transition: transform 0.45s ease-out, opacity 0.45s ease-out;
}

#galleryModal.show .modal-dialog {
    transform: scale(1);
}

#galleryModal.fade:not(.show) .modal-dialog {
    transform: scale(0.92);
    opacity: 0;
}

.modal-dialog.closing {
    transform: scale(0.92) !important;
    opacity: 0 !important;
}

/* ---- High contrast ---- */
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}

body.high-contrast a,
body.high-contrast .nav-link,
body.high-contrast .text-muted,
body.high-contrast .lead {
    color: #ff0 !important;
}

body.high-contrast .bg-white,
body.high-contrast .bg-light,
body.high-contrast .review-card,
body.high-contrast .modal-content,
body.high-contrast .modal-footer,
body.high-contrast .modal-body,
body.high-contrast .modal-header,
body.high-contrast .description-box,
body.high-contrast .navbar {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

body.high-contrast .text-dark,
body.high-contrast .text-white,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast p,
body.high-contrast .menu-item {
    color: #fff !important;
}

body.high-contrast .btn,
body.high-contrast .order-btn,
body.high-contrast .audio-btn {
    border: 2px solid #ff0 !important;
}

body.high-contrast .order-btn,
body.high-contrast .btn {
    color: #000 !important;
    background: #ff0 !important;
}

body.high-contrast .border-bottom,
body.high-contrast .border-top,
body.high-contrast .border-secondary {
    border-color: #fff !important;
}

body.high-contrast .form-control,
body.high-contrast .form-select {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #ff0 !important;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .parallax {
        background-attachment: scroll !important;
    }

    .hero-video {
        display: none;
    }

    .audio-btn.playing,
    .audio-btn[aria-pressed="true"] {
        animation: none !important;
    }

    .gallery-item:hover,
    .gallery-item:hover img,
    .order-btn:hover {
        transform: none;
    }
}

/* ---- Small screens (≤576px) ---- */
@media (max-width: 576px) {
    .hero-content h1,
    #hero-name {
        font-size: 2rem;
    }

    .hero-content .lead,
    #hero-tagline {
        font-size: 1.1rem !important;
    }

    #hero-welcome {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .gallery-item {
        margin-bottom: 2px;
    }

    .gallery-overlay {
        opacity: 1;
        padding: 0.85rem 0.65rem 0.65rem;
        background: linear-gradient(to top, rgba(230, 57, 70, 0.88) 0%, transparent 70%);
    }

    .gallery-overlay h5 {
        font-size: 0.95rem;
    }

    .gallery-overlay p {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .menu-item {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .menu-item .col-md-4 {
        justify-content: flex-start;
        margin-top: 0.5rem;
    }

    .menu-item .order-btn {
        flex: 1 1 auto;
        min-width: calc(50% - 8px);
    }

    .parallax blockquote {
        font-size: 1.15rem;
    }

    .review-card {
        padding: 1.25rem;
    }

    .review-card p {
        font-size: 1.05rem;
    }

    #modal-img {
        max-height: 45vh !important;
    }

    #galleryModal .modal-footer {
        padding: 1rem !important;
    }

    #galleryModal .description-box {
        font-size: 1rem !important;
        padding: 1rem !important;
    }

    #galleryModal .order-btn {
        flex: 1 1 46%;
        margin: 4px 2px !important;
        min-width: 0;
    }
}

/* ---- Tablets / phones (≤768px) ---- */
@media (max-width: 768px) {
    .hero {
        min-height: 100svh;
        height: auto;
        padding-top: 5rem;
        padding-bottom: 3.5rem;
    }

    .hero-content h1,
    #hero-name {
        font-size: 2.4rem;
    }

    .parallax {
        height: 320px;
        background-attachment: scroll;
    }

    .parallax blockquote {
        font-size: 1.5rem;
    }

    #contact {
        height: auto !important;
        min-height: 0 !important;
        display: flex;
        flex-direction: column;
        overflow: visible !important;
    }

    #contact iframe,
    #google-map {
        position: relative !important;
        width: 100%;
        height: 260px !important;
        min-height: 260px;
        flex-shrink: 0;
    }

    #contact > .position-absolute,
    #contact .contact-card {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 1.5rem 1.25rem !important;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08) !important;
    }

    #gallery {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .navbar .order-btn {
        margin-top: 0.75rem;
        width: 100%;
    }
}

/* ---- Desktop ---- */
@media (min-width: 769px) {
    .hero {
        height: 100vh;
        min-height: 100svh;
        padding: 0;
    }

    .parallax {
        height: 420px;
        background-attachment: fixed;
    }

    .parallax blockquote {
        font-size: 2.1rem;
    }

    #gallery {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .gallery-overlay h5 {
        font-size: 1.3rem;
    }

    .gallery-overlay p {
        font-size: 0.95rem;
    }

    .review-card {
        padding: 40px;
    }

    .review-card p {
        font-size: 1.35rem;
    }
}

@media (min-width: 992px) {
    .gallery-overlay {
        padding: 1.5rem 1.25rem 1.25rem;
    }
}
