/* ==========================================================================
    Oropeza Multiservicios — page-specific styles
    --------------------------------------------------------------------------
    Layout helpers for the landing page that are NOT part of the shared VFW
    `classic-poster` theme kit. The theme
    (/VFW/themes/classic-poster/classic-poster.css) provides all colors, type,
    sections, buttons, and footer; this file wires the page composition: the
    photographic hero, the image service grid + modal, the promo banner, and the
    mobile nav. All classes are `oropeza-` prefixed, single-dash kebab.
   ========================================================================== */

/* --- Global page behavior --- */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cp-ink);
    font-family: var(--cp-font-body);
}

/* Anchored sections clear the top edge when jumped to. */
[id] {
    scroll-margin-top: 1rem;
}

/* Tighter content column than the theme default (1200px) — the page read too wide.
   Sections stay full-bleed; only the inner content narrows. */
.vfw-cp-container {
    max-width: 1040px;
}

/* --- Nav logo --- */
.oropeza-logo {
    display: inline-flex;
    align-items: center;
    /* Nudge the brand mark in from the nav's left edge (desktop only; the mobile
       override below resets this). */
    margin-left: 24px;
}

.oropeza-logo img {
    height: 48px;
    width: auto;
    display: block;
}

/* --- Hero: full-bleed photographic header with a legibility scrim --- */
.oropeza-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(420px, 70vh, 720px);
    overflow: hidden;
    background-color: var(--cp-accent); /* shows while the image loads */
    color: var(--cp-ink);
}

.oropeza-hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Contain (not cover) so the full car shows uncropped; anchored right so it
       sits beside the left-column headline. Section yellow fills the rest. */
    object-fit: contain;
    object-position: center right;
    z-index: 0;
}

/* Yellow left-to-right scrim: keeps the headline readable AND blends the seam
   where the contained car's left edge meets the flat section yellow. */
.oropeza-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg,
        rgba(255, 210, 26, 1) 0%,
        rgba(255, 210, 26, 0.92) 46%,
        rgba(255, 210, 26, 0) 66%);
}

.oropeza-hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%; /* fill the flex line so inner content anchors left, not centered */
}

/* Keep the headline + CTAs in the readable left column, off the car. */
.oropeza-hero .vfw-cp-hero {
    max-width: 560px;
}

/* --- Promo block: full-bleed random banner background with overlaid text --- */
.oropeza-promo {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(340px, 48vh, 520px);
    overflow: hidden;
    background-color: var(--cp-accent); /* shows while the banner loads */
    color: var(--cp-ink);
}

.oropeza-promo-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Contain (not cover) so the full banner car shows uncropped; anchored right
       so it sits beside the left-column text, like the mockup. The section's
       yellow fills the rest, blending with the banner's own yellow field. */
    object-fit: contain;
    object-position: center right;
    z-index: 0;
}

/* Yellow left-to-right scrim: keeps the heading readable AND blends the seam
   where the contained banner's left edge meets the flat section yellow. */
.oropeza-promo::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg,
        rgba(255, 210, 26, 1) 0%,
        rgba(255, 210, 26, 0.92) 48%,
        rgba(255, 210, 26, 0) 66%);
}

.oropeza-promo-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
}

.oropeza-promo-text {
    max-width: 560px;
}

/* --- Services: compact clickable image cards that open the modal --- */
.oropeza-service-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .oropeza-service-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 960px) {
    .oropeza-service-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.oropeza-service-card {
    position: relative;
    display: block;
    padding: 0;
    aspect-ratio: 2 / 3;
    border: 2px solid var(--cp-keyline-muted);
    background-color: var(--cp-ink-2);
    cursor: pointer;
    overflow: hidden;
    transition: border-color var(--vfw-transition-fast, 0.15s ease),
        transform var(--vfw-transition-fast, 0.15s ease);
}

.oropeza-service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.oropeza-service-card:hover {
    border-color: var(--cp-accent);
    transform: translateY(-3px);
}

.oropeza-service-card:focus-visible {
    outline: 3px solid var(--cp-accent);
    outline-offset: 2px;
}

/* --- Service modal (opened by app.js; animated via opacity/visibility) --- */
.oropeza-modal {
    position: fixed;
    inset: 0;
    z-index: var(--vfw-z-modal, 200);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Hide only AFTER the fade-out; show instantly on open so the ✕ is focusable. */
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.oropeza-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.oropeza-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
}

.oropeza-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: min(92vw, 520px);
    max-height: 90vh;
}

.oropeza-modal-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border: 3px solid var(--cp-accent);
    background-color: var(--cp-ink);
    transform: scale(0.96);
    transition: transform 0.2s ease;
}

.oropeza-modal.is-open .oropeza-modal-img {
    transform: scale(1);
}

.oropeza-modal-close {
    position: absolute;
    top: -16px;
    right: -16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 3px solid var(--cp-ink);
    border-radius: 0;
    background-color: var(--cp-accent);
    color: var(--cp-ink);
    cursor: pointer;
    transition: background-color var(--vfw-transition-fast, 0.15s ease),
        color var(--vfw-transition-fast, 0.15s ease);
}

.oropeza-modal-close svg {
    width: 22px;
    height: 22px;
}

.oropeza-modal-close:hover {
    background-color: var(--cp-ink);
    color: var(--cp-accent);
    border-color: var(--cp-accent);
}

/* Location-modal content panel (reuses the modal shell; link-out, no iframe) */
.oropeza-modal-panel {
    max-width: 100%;
    padding: 2rem 1.75rem;
    background-color: var(--cp-ink);
    border: 3px solid var(--cp-accent);
    color: var(--cp-white);
    text-align: center;
    box-sizing: border-box;
}

.oropeza-modal-title {
    font-family: var(--cp-font-display);
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--cp-accent);
    margin: 0 0 0.75rem;
}

.oropeza-map {
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 1.5rem;
    border: 2px solid var(--cp-accent);
    background-color: var(--cp-ink-2);
    overflow: hidden;
}

.oropeza-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* --- Pedir Cita booking modal (form + availability slots) --- */
.oropeza-appt-dialog {
    width: 100%;
    max-width: min(92vw, 560px);
}

.oropeza-appt-panel {
    max-height: 88vh;
    overflow-y: auto;
    text-align: left;
    color-scheme: dark; /* native date picker + calendar icon render on dark */
}

/* The `hidden` attribute must win over these blocks' flex display, or the
   Descripción field and the empty slots box would show before they should. */
.oropeza-field[hidden],
.oropeza-appt-slots-wrap[hidden] {
    display: none;
}

.oropeza-appt-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.oropeza-appt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 560px) {
    .oropeza-appt-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.oropeza-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.oropeza-field label {
    font-family: var(--cp-font-technical);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cp-gray-light);
}

.oropeza-field input,
.oropeza-field select,
.oropeza-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.7rem;
    background-color: var(--cp-ink-2);
    border: 2px solid var(--cp-keyline-muted);
    border-radius: 0;
    color: var(--cp-white);
    font-family: var(--cp-font-body);
    font-size: 0.9rem;
}

.oropeza-field input:focus,
.oropeza-field select:focus,
.oropeza-field textarea:focus {
    outline: none;
    border-color: var(--cp-accent);
}

.oropeza-appt-slots-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.oropeza-appt-slots-label {
    font-family: var(--cp-font-technical);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cp-gray-light);
}

.oropeza-appt-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.oropeza-appt-slot {
    padding: 0.5rem 0.25rem;
    border: 2px solid var(--cp-keyline-muted);
    border-radius: 0;
    background-color: var(--cp-ink-2);
    color: var(--cp-white);
    font-family: var(--cp-font-technical);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color var(--vfw-transition-fast, 0.15s ease);
}

.oropeza-appt-slot.is-open:hover {
    border-color: var(--cp-accent);
}

.oropeza-appt-slot.is-selected {
    background-color: var(--cp-accent);
    color: var(--cp-ink);
    border-color: var(--cp-accent);
}

.oropeza-appt-slot.is-taken {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.oropeza-appt-slots-hint {
    font-size: 0.72rem;
    color: var(--cp-gray);
    margin: 0;
}

.oropeza-appt-slots-note {
    font-family: var(--cp-font-technical);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: var(--cp-accent);
    margin: 0;
}

.oropeza-appt-consent {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--cp-gray-light);
}

.oropeza-appt-consent input {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    accent-color: var(--cp-accent);
}

.oropeza-appt-status {
    margin: 0;
    padding: 0.6rem 0.8rem;
    border: 2px solid;
    font-family: var(--cp-font-technical);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.oropeza-appt-status.is-success {
    color: var(--cp-accent);
    border-color: var(--cp-accent);
    background-color: var(--cp-accent-weak);
}

.oropeza-appt-status.is-error {
    color: #e79484;
    border-color: #b0402f;
    background-color: rgba(176, 64, 47, 0.15);
}

.oropeza-appt-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.oropeza-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Buttons sit on a black panel, so primary needs the accent-fill variant. */
.oropeza-modal-panel .vfw-cp-button-primary {
    background-color: var(--cp-accent);
    color: var(--cp-ink);
    border-color: var(--cp-accent);
}

.oropeza-modal-panel .vfw-cp-button-primary:hover {
    background-color: transparent;
    color: var(--cp-accent);
}

.oropeza-modal-panel .vfw-cp-button-secondary {
    color: var(--cp-white);
}

.oropeza-modal-panel .vfw-cp-button-secondary:hover {
    background-color: var(--cp-accent);
    color: var(--cp-ink);
    border-color: var(--cp-accent);
}

/* --- Contact affordances: tappable links + Ubicación button + hours badge --- */
.oropeza-contact-link,
.oropeza-location-trigger {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.oropeza-contact-link:hover .vfw-cp-contact-value,
.oropeza-location-trigger:hover .vfw-cp-contact-value {
    text-decoration: underline;
}

.oropeza-contact-link:focus-visible,
.oropeza-location-trigger:focus-visible {
    outline: 3px solid var(--cp-ink);
    outline-offset: 3px;
}

/* Teléfono: two independently tappable numbers so the visitor picks the line. */
.oropeza-phone-links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.oropeza-phone-links a {
    width: fit-content;
    color: inherit;
    text-decoration: none;
}

.oropeza-phone-links a:hover,
.oropeza-phone-links a:focus-visible {
    text-decoration: underline;
}

.oropeza-hours-badge {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.15rem 0.55rem;
    font-family: var(--cp-font-technical);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 2px solid var(--cp-ink);
}

.oropeza-hours-badge.is-open {
    background-color: var(--cp-ink);
    color: var(--cp-accent);
}

.oropeza-hours-badge.is-closed {
    background-color: transparent;
    color: var(--cp-ink);
}

/* Footer copyright: lift off #777 for AA contrast on black. */
.vfw-cp-footer-copy {
    color: var(--cp-gray-light);
}

/* Discreet developer/maker credit: a centered second meta line under the ©,
   subordinate by size (not by dimming — keeps the mailto link AA-legible). */
.maker-credit {
    margin-top: 6px;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--cp-gray-light);
}

.maker-credit a {
    color: inherit;
    text-decoration: none;
    padding: 2px 0;
}

.maker-credit a:hover,
.maker-credit a:focus-visible {
    text-decoration: underline;
}

/* --- Gallery placeholder (until real workshop photos land) --- */
.oropeza-photo-ph {
    width: 100%;
    height: 100%;
}

/* --- Small content helpers --- */
.oropeza-center {
    text-align: center;
    margin-top: 2rem;
}

.oropeza-cta-spacer {
    margin-top: 2.5rem;
}

.oropeza-subheading {
    text-align: center;
    font-family: var(--cp-font-technical);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 2rem;
}

.oropeza-footer-emblem {
    width: 96px;
    height: auto;
    display: block;
}

.oropeza-footer-tag {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.oropeza-footer-rule {
    margin-top: 2rem;
}

/* --- Mobile nav toggle (hamburger) --- */
.oropeza-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 2px solid var(--cp-ink);
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
}

.oropeza-nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--cp-ink);
}

/* ==========================================================================
    Responsive
   ========================================================================== */

@media (max-width: 768px) {
    /* Hero: portrait art, scrim shifts to the bottom, text sits low. */
    .oropeza-hero {
        align-items: flex-end;
        min-height: clamp(480px, 82vh, 760px);
    }

    .oropeza-hero::after {
        background: linear-gradient(0deg,
            rgba(255, 210, 26, 0.95) 0%,
            rgba(255, 210, 26, 0.72) 34%,
            rgba(255, 210, 26, 0) 66%);
    }

    /* Portrait header on phones: cover reads better than contain (less letterbox). */
    .oropeza-hero-media {
        object-fit: cover;
        object-position: center;
    }

    /* Promo: same bottom-scrim treatment as the hero on portrait screens. */
    .oropeza-promo {
        align-items: flex-end;
        min-height: clamp(360px, 60vh, 560px);
    }

    /* Portrait banner on phones: cover reads better than contain (less letterbox). */
    .oropeza-promo-bg {
        object-fit: cover;
        object-position: center;
    }

    .oropeza-promo::after {
        background: linear-gradient(0deg,
            rgba(255, 210, 26, 0.96) 0%,
            rgba(255, 210, 26, 0.75) 36%,
            rgba(255, 210, 26, 0) 68%);
    }

    .vfw-cp-nav {
        position: relative;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* The desktop logo nudge would eat scarce phone-nav width; reset it. */
    .oropeza-logo {
        margin-left: 0;
    }

    .oropeza-nav-toggle {
        display: inline-flex;
        order: 3;
    }

    .oropeza-nav-cta {
        order: 2;
        margin-left: auto;
        padding: 0.6rem 1rem;
    }

    /* Links collapse into a full-width dropdown revealed by the toggle. */
    .vfw-cp-nav-links {
        order: 4;
        flex-basis: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
    }

    .vfw-cp-nav.is-open .vfw-cp-nav-links {
        max-height: 340px;
        opacity: 1;
        padding: 0.5rem 0 0.25rem;
    }
}

/* ==========================================================================
    Cookie consent banner (EU) — classic-poster themed, fixed to the viewport foot
   ========================================================================== */

.oropeza-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: none;
    background: var(--cp-ink);
    color: var(--cp-white);
    border-top: 3px solid var(--cp-accent);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}

.oropeza-cookie-banner.is-open {
    display: block;
}

.oropeza-cookie-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.oropeza-cookie-text {
    flex: 1 1 320px;
}

.oropeza-cookie-text strong {
    display: block;
    font-family: var(--cp-font-technical);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cp-accent);
}

.oropeza-cookie-text p {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.oropeza-cookie-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--cp-accent);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.oropeza-cookie-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.oropeza-cookie-actions .vfw-cp-button {
    padding: 0.6rem 1.3rem;
    font-size: 0.8rem;
}

.oropeza-privacy-text {
    margin: 0 0 0.75rem;
    line-height: 1.55;
}

/* @audited cfw style=0c9dc7d77822 memsec=0c9dc7d77822 test=0c9dc7d77822 design=eec8e1dfc492 */
