/* ==========================================================
   MUDANZA VIAJES — Frontend Styles
   ========================================================== */

/* ----------------------------------------------------------
   SLIDER SHORTCODE [viajes_slider]
   ---------------------------------------------------------- */
.mv-slider-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 4px 0;
}

.mv-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 2px 14px;
    scrollbar-width: none;
}
.mv-slider::-webkit-scrollbar { display: none; }

/* Card */
.mv-card {
    flex: 0 0 190px;
    scroll-snap-align: start;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    text-decoration: none !important;
    color: inherit;
    transition: transform .22s ease, box-shadow .22s ease;
    display: flex;
    flex-direction: column;
}
.mv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    text-decoration: none !important;
}

.mv-card-img {
    height: 108px;
    background-size: cover;
    background-position: center;
    background-color: #ecf0f4;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mv-card-img--empty {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d6a9f 100%);
}
.mv-card-truck {
    font-size: 34px;
    opacity: .85;
}

.mv-card-body {
    padding: 10px 13px 12px;
    flex: 1;
}
.mv-card-route {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    flex-wrap: wrap;
}
.mv-card-origin { color: #1e3a5f; }
.mv-card-dest   { color: #c0392b; }
.mv-card-sep    { color: #aaa; font-size: 11px; flex-shrink: 0; }

.mv-card-date {
    margin-top: 5px;
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mv-card-date::before {
    content: "📅";
    font-size: 10px;
}

.mv-empty-msg {
    color: #888;
    font-style: italic;
    padding: 8px 0;
}

/* ----------------------------------------------------------
   SINGLE VIAJE — Hero
   ---------------------------------------------------------- */
.mv-single-hero {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-color: #1e3a5f;
    position: relative;
}
.mv-single-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.68) 100%);
    display: flex;
    align-items: flex-end;
    padding: 36px 40px;
}
.mv-single-hero-text { color: #fff; }
.mv-single-hero-text .mv-hero-date {
    font-size: 14px;
    opacity: .8;
    margin-bottom: 6px;
    letter-spacing: .3px;
}
.mv-single-hero-text h1 {
    margin: 0;
    font-size: clamp(22px, 4vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* ----------------------------------------------------------
   SINGLE VIAJE — Content
   ---------------------------------------------------------- */
.mv-single-content {
    max-width: 840px;
    margin: 48px auto;
    padding: 0 24px;
}

/* Timeline de ruta — HORIZONTAL */
.mv-route-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef1f5;
}

.mv-timeline-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-bottom: 40px;
}
.mv-timeline-wrapper::-webkit-scrollbar { height: 4px; }
.mv-timeline-wrapper::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 2px; }
.mv-timeline-wrapper::-webkit-scrollbar-thumb { background: #c0c8d4; border-radius: 2px; }

.mv-timeline-h {
    display: flex;
    align-items: flex-start;
    min-width: max-content;
    padding: 12px 4px 4px;
}

.mv-tl-stop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 130px;
    flex-shrink: 0;
}

.mv-tl-connector {
    flex: 1;
    min-width: 40px;
    height: 2px;
    margin-top: 18px;
    background: linear-gradient(to right, #dde3ed, #c4cdd8);
    flex-shrink: 0;
    position: relative;
}
.mv-tl-connector::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -4px;
    border: 5px solid transparent;
    border-left: 7px solid #c4cdd8;
}

.mv-tl-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    position: relative;
    z-index: 2;
}
.mv-tl-dot.is-origen  { background: #1e3a5f; color: #fff; }
.mv-tl-dot.is-parada  { background: #f39c12; color: #fff; }
.mv-tl-dot.is-destino { background: #c0392b; color: #fff; }

.mv-tl-info {
    text-align: center;
    padding: 0 6px;
}
.mv-tl-info strong {
    display: block;
    font-size: 15px;
    color: #1d2327;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3px;
}
.mv-tl-info .mv-tl-label {
    display: block;
    font-size: 10px;
    color: #9ea5ad;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.mv-tl-info .mv-tl-desc {
    display: block;
    font-size: 12.5px;
    color: #636a74;
    line-height: 1.4;
    max-width: 118px;
    word-break: break-word;
}

/* ----------------------------------------------------------
   FORMULARIO DE SOLICITUD
   ---------------------------------------------------------- */
.mv-form-section {
    background: #f5f7fa;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    padding: 36px;
    margin-top: 8px;
}
.mv-form-section h3 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #1e3a5f;
}
.mv-form-section .mv-form-desc {
    color: #666;
    font-size: 14px;
    margin: 0 0 24px;
}
.mv-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.mv-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mv-form-field.full { grid-column: 1 / -1; }
.mv-form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}
.mv-form-field label .mv-req { color: #c0392b; margin-left: 2px; }
.mv-form-field input,
.mv-form-field textarea {
    padding: 11px 15px;
    border: 1.5px solid #dce1e9;
    border-radius: 7px;
    font-size: 14px;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    font-family: inherit;
    color: #1d2327;
}
.mv-form-field input:focus,
.mv-form-field textarea:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, .1);
}
.mv-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.mv-submit-btn {
    margin-top: 22px;
    background: #1e3a5f;
    color: #fff;
    border: none;
    padding: 14px 34px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    letter-spacing: .2px;
}
.mv-submit-btn:hover  { background: #163050; transform: translateY(-1px); }
.mv-submit-btn:active { transform: translateY(0); }
.mv-submit-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.mv-form-msg {
    margin-top: 18px;
    padding: 13px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}
.mv-form-msg.mv-success {
    display: block;
    background: #d4f4e2;
    color: #1a6640;
    border: 1px solid #a3dcbe;
}
.mv-form-msg.mv-error {
    display: block;
    background: #fde8e8;
    color: #8b1c1c;
    border: 1px solid #f5b0b0;
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 640px) {
    .mv-single-hero { height: 260px; }
    .mv-single-hero-overlay { padding: 24px 20px; }
    .mv-single-content { margin: 28px auto; padding: 0 16px; }
    .mv-form-grid { grid-template-columns: 1fr; }
    .mv-form-section { padding: 24px 20px; }
    .mv-card { flex: 0 0 160px; }
}

/* ==========================================================
   MODO CARDS — [viajes_slider mode="cards"]
   Slider de tarjetas grandes para el inicio/secciones
   ========================================================== */
.mv-cards-section {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Track wrapper: ventana de visualización */
.mv-cs-track-wrap {
    overflow: hidden;
    border-radius: 16px;
}

/* Track: fila de tarjetas, se traslada con transform */
.mv-cs-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

/* Tarjeta individual */
.mv-cs-card {
    flex: 0 0 100%;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    display: flex;
    flex-direction: column;
}

/* Imagen portada */
.mv-cs-img {
    width: 100%;
    height: 340px;
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}
.mv-cs-img--empty {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d6a9f 60%, #4a8fba 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}
.mv-cs-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.55) 100%);
}

/* Badges sobre la imagen */
.mv-cs-badges {
    position: absolute;
    bottom: 16px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 2;
}
.mv-cs-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .2px;
}
.mv-cs-badge--date {
    background: rgba(255,255,255,.92);
    color: #1e3a5f;
}
.mv-cs-badge--stops {
    background: rgba(243,156,18,.9);
    color: #7a4800;
}

/* Cuerpo de la tarjeta */
.mv-cs-body {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Ruta horizontal en la tarjeta */
.mv-cs-route {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}
.mv-cs-point {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.mv-cs-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mv-cs-dot--origin { background: #1e3a5f; }
.mv-cs-dot--dest   { background: #c0392b; }

.mv-cs-city {
    font-size: 18px;
    font-weight: 800;
    color: #1d2327;
    white-space: nowrap;
}

/* Línea central con puntos de paradas */
.mv-cs-line {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 40px;
}
.mv-cs-line::before,
.mv-cs-line::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #dde3ed;
}
.mv-cs-stop-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f39c12;
    flex-shrink: 0;
}
.mv-cs-arrow {
    font-size: 16px;
    color: #c0392b;
    flex-shrink: 0;
}

/* Descripción */
.mv-cs-desc {
    margin: 0;
    font-size: 14px;
    color: #636a74;
    line-height: 1.6;
}

/* Botón CTA */
.mv-cs-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    background: #1e3a5f;
    color: #fff !important;
    text-decoration: none !important;
    padding: 13px 26px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 700;
    transition: background .2s, transform .15s;
    margin-top: 4px;
}
.mv-cs-btn:hover { background: #163050; transform: translateY(-2px); text-decoration: none !important; }
.mv-cs-btn-arrow { font-size: 16px; transition: transform .2s; }
.mv-cs-btn:hover .mv-cs-btn-arrow { transform: translateX(4px); }

/* Controles de navegación */
.mv-cs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}
.mv-cs-prev,
.mv-cs-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #dde3ed;
    background: #fff;
    color: #1e3a5f;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
}
.mv-cs-prev:hover,
.mv-cs-next:hover {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}
.mv-cs-dots {
    display: flex;
    gap: 7px;
    align-items: center;
}
.mv-cs-dot-btn {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #dde3ed;
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s;
}
.mv-cs-dot-btn.is-active {
    background: #1e3a5f;
    transform: scale(1.35);
}

/* Responsive tarjetas grandes */
@media (max-width: 640px) {
    .mv-cs-img { height: 220px; }
    .mv-cs-body { padding: 18px 18px 22px; }
    .mv-cs-city { font-size: 15px; }
    .mv-cs-btn  { font-size: 13.5px; padding: 11px 20px; }
}

/* ==========================================================
   MODO TOPBAR — [viajes_slider mode="banner" style="topbar"]
   Barra ultra-compacta para la cabecera superior del sitio
   ========================================================== */
.mv-topbar {
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    background: #1e3a5f;
    padding: 0 16px;
    box-sizing: border-box;
    overflow: hidden;
    gap: 0;
}

/* Etiqueta "Viajes" a la izquierda */
.mv-topbar-label {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding-right: 14px;
}
.mv-topbar-icon {
    font-size: 14px;
    line-height: 1;
}
.mv-topbar-text {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

/* Línea separadora vertical */
.mv-topbar-divider {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,.2);
    flex-shrink: 0;
    margin-right: 14px;
}

/* Track scrollable con las píldoras */
.mv-topbar-track {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    /* Fade derecho para indicar que hay más */
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
.mv-topbar-track::-webkit-scrollbar { display: none; }

/* Píldora individual */
.mv-topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
    cursor: pointer;
}
.mv-topbar-pill:hover {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.35);
    text-decoration: none !important;
}

/* Dots de color en la píldora */
.mv-topbar-pill-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mv-topbar-pill-dot--o { background: #4fc878; }
.mv-topbar-pill-dot--d { background: #e05555; }

/* Ciudad */
.mv-topbar-pill-city {
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: .01em;
}

/* Flecha entre ciudades */
.mv-topbar-pill-arrow {
    font-size: 11px;
    color: rgba(255,255,255,.55);
}

/* Fecha */
.mv-topbar-pill-date {
    font-size: 11px;
    color: rgba(255,255,255,.6);
    padding-left: 3px;
    border-left: 1px solid rgba(255,255,255,.2);
    padding-left: 8px;
}

/* Responsive — ocultar fecha en móvil muy pequeño */
@media (max-width: 480px) {
    .mv-topbar-pill-date { display: none; }
    .mv-topbar { padding: 0 10px; }
}

/* ==========================================================
   v1.5.0 — Select de parada + fixes móvil
   ========================================================== */

/* Select parada en el formulario */
.mv-form-field select {
    padding: 11px 15px;
    border: 1.5px solid #dce1e9;
    border-radius: 7px;
    font-size: 14px;
    background: #fff;
    color: #1d2327;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    transition: border-color .18s, box-shadow .18s;
}
.mv-form-field select:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,.1);
}

/* ==========================================================
   MOBILE — fixes globales v1.5.0
   ========================================================== */
@media (max-width: 768px) {

    /* Hero */
    .mv-single-hero { height: 220px; }
    .mv-single-hero-overlay { padding: 20px 16px; }
    .mv-single-hero-text h1 { font-size: 20px; }

    /* Content */
    .mv-single-content { margin: 24px auto; padding: 0 14px; }

    /* Form grid — 1 columna en móvil */
    .mv-form-grid { grid-template-columns: 1fr !important; }
    .mv-form-field.full { grid-column: 1; }
    .mv-form-section { padding: 20px 16px; border-radius: 10px; }
    .mv-form-section h3 { font-size: 18px; }
    .mv-submit-btn { width: 100%; justify-content: center; font-size: 14px; padding: 13px 20px; }

    /* Timeline horizontal en móvil: reduce tamaño */
    .mv-tl-stop { width: 100px; }
    .mv-tl-info strong { font-size: 13px; }
    .mv-tl-connector { min-width: 24px; }

    /* Banner cards */
    .mv-card { flex: 0 0 150px; }
    .mv-card-img { height: 90px; }
    .mv-card-route { font-size: 11.5px; }

    /* Cards slider */
    .mv-cs-img { height: 200px; }
    .mv-cs-body { padding: 16px 16px 20px; }
    .mv-cs-city { font-size: 15px; }
    .mv-cs-btn { font-size: 13px; padding: 10px 18px; }
    .mv-cs-nav { margin-top: 14px; gap: 10px; }
    .mv-cs-prev, .mv-cs-next { width: 34px; height: 34px; font-size: 18px; }

    /* Topbar en móvil */
    .mv-topbar { height: 38px; padding: 0 10px; }
    .mv-topbar-text { font-size: 11px; }
    .mv-topbar-pill { padding: 4px 10px; }
    .mv-topbar-pill-city { font-size: 11.5px; }
    .mv-topbar-pill-date { display: none; }
    .mv-topbar-divider { margin-right: 10px; }
}

@media (max-width: 480px) {
    .mv-topbar-label { display: none; }
    .mv-topbar-divider { display: none; }
    .mv-cs-route { gap: 6px; }
    .mv-cs-city { font-size: 14px; }
}

/* Topbar sin viajes — mensaje discreto inline */
.mv-topbar-empty {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
    white-space: nowrap;
    padding: 0 4px;
}
