/*
 * Ficha "Moderno" (PAQ). Todo va scopeado bajo #ficha4.
 * Los colores salen de las variables del tema del sitio (css/variables.css):
 * --primary, --gris-texto, --gris-oscuro, --gris-medio, --gris-claro.
 * Los valores de respaldo solo se usan si el sitio no las define.
 */
#ficha4 {
    --fm-accent: var(--primary, #0b63b8);
    --fm-whatsapp: #25d366;
    --fm-text: var(--gris-texto, #333333);
    --fm-muted: var(--gris-oscuro, #777777);
    --fm-line: var(--gris-medio, #d9d9d9);
    --fm-surface: var(--gris-claro, #f1f1f1);
    font-family: var(--font, inherit);
    --fm-radius: 10px;
    --fm-shadow: 0 6px 24px rgba(20, 35, 60, .16);
    --fm-max: 1140px;
    --fm-sticky-h: 76px;

    margin: 0 0 var(--fm-sticky-h);
    color: var(--fm-text);
}

/* Hero y tabs a todo el ancho de pantalla, aunque el tema los meta en un .container
   (--fm-sb = ancho de la barra de scroll, lo setea ficha-moderno.js) */
#ficha4 .fm-hero,
#ficha4 .fm-tabs {
    width: calc(100vw - var(--fm-sb, 0px));
    margin-left: calc(50% - 50vw + var(--fm-sb, 0px) / 2);
}

/* ---------- Hero ---------- */
#ficha4 .fm-hero {
    height: clamp(220px, 32vw, 420px);
    background-size: cover;
    background-position: center;
    background-color: var(--fm-surface);
}

/* ---------- Cabecera + tarjeta de precio ---------- */
#ficha4 .fm-top {
    position: relative;
    display: flex;
    gap: 32px;
    align-items: flex-start;
    max-width: var(--fm-max);
    margin: 0 auto;
    padding: 50px 0;
}
#ficha4 .fm-top__info { flex: 1 1 auto; min-width: 0; }
#ficha4 .fm-top--sin-hero .fm-top__info { padding-top: 20px; }

#ficha4 .fm-titulo {
    margin: 0 0 16px;
    font-size: clamp(1.6rem, 4vw, 3.5rem);
    line-height: 1.15;
    font-weight: 700;
    color: var(--fm-accent);
}
#ficha4 .btn-toolbar-share .btn { color: var(--gris-texto); }
#ficha4 .fm-meta { margin: 0 0 14px; font-size: 17px; }
#ficha4 .fm-meta > li { margin-bottom: 8px; }
#ficha4 .fm-meta__dato { margin-left: 12px; white-space: nowrap; }
#ficha4 .fm-meta__bajada { color: var(--fm-muted); }
#ficha4 .fm-categorias { margin-bottom: 8px; }
#ficha4 .fm-acciones { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 30px;}


/* Tarjeta: se superpone al hero en desktop */
#ficha4 .fm-precio {
    flex: 0 0 340px;
    padding: 40px;
    text-align: center;
    background: #fff;
    border-radius: var(--fm-radius);
    box-shadow: var(--fm-shadow);
    position: relative;
    z-index: 2;
}
#ficha4 .fm-top--sin-hero .fm-precio { margin-top: 20px; }
#ficha4 .fm-precio__monto { font-size: 30px; font-weight: 700; color: var(--fm-accent); line-height: 1.1; }
#ficha4 .fm-precio__leyenda { margin-bottom: 16px; color: var(--fm-muted); }
#ficha4 .fm-precio .fm-btn { display: block; margin-top: 10px; }

/* ---------- Botones ---------- */
#ficha4 .fm-btn {
    display: inline-block;
    padding: 12px 20px;
    border: 0;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background: var(--fm-accent);
    transition: background-color .15s, transform .15s;
}
#ficha4 .fm-btn:hover,
#ficha4 .fm-btn:focus { color: #fff; text-decoration: none; filter: brightness(.88); }
#ficha4 .fm-btn:active { transform: translateY(1px); }
#ficha4 .fm-btn:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 2px; }
#ficha4 .fm-btn--whatsapp { background: var(--fm-whatsapp); }
#ficha4 .fm-btn--reservar { background: var(--fm-accent); }
/* Algunos temas (ej. Ecotur, css/ecotur.css) definen .btn-whatsapp para el boton del menu con !important
   (fondo de marca, inline-flex, padding chico). La clase se mantiene porque la usa el tracking de Meta, asi que
   el verde, el padding y el ancho se fijan aca con mas especificidad. */
#ficha4 .fm-btn.btn-whatsapp {
    background-color: var(--fm-whatsapp) !important;
    color: #fff !important;
    padding: 12px 20px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
/* La tarjeta de precio puede quedar angosta (ej. Ecotur: 260px de boton) y con 20px laterales el texto se parte en dos lineas.
   Ecotur ademas le suma margin-left: 10px (css/ecotur.css, .btn-whatsapp) y el boton queda corrido: se anula aca. */
#ficha4 .fm-precio .fm-btn.btn-whatsapp { display: flex !important; padding-left: 12px !important; padding-right: 12px !important; margin-left: 0; }
#ficha4 .wrapper-botones-tarifa { width: 25%;}
#ficha4 .fm-btn--chico { padding: 8px 20px; font-size: 14px; }
#ficha4 .btn-whatsapp--chico {
    background: #25d366;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    transition: background-color .15s, transform .15s;
}

/* ---------- Barra fija ---------- */
#ficha4 .fm-sticky {
    position: fixed;
    left: 0; right: 0; bottom: 14px;
    z-index: 900;
    padding: 0 15px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(24px);
    visibility: hidden; /* oculta tambien del foco de teclado */
    transition: opacity .25s, transform .25s, visibility 0s linear .25s;
}
#ficha4 .fm-sticky.is-visible { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
#ficha4 .fm-sticky.is-visible .fm-sticky__inner { pointer-events: auto; }
#ficha4 .fm-sticky__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    /* mismo ancho que el contenido de las secciones (--fm-sticky-w lo calcula ficha-moderno.js) */
    width: var(--fm-sticky-w, 100%);
    max-width: 100%;
    margin: 0 auto;
    padding: 14px 24px;
    background: #fff;
    border-radius: var(--fm-radius);
    box-shadow: var(--fm-shadow);
}
#ficha4 .fm-sticky__precio b { font-size: 22px; color: var(--fm-accent); }
#ficha4 .fm-sticky__precio small { margin-left: 6px; color: var(--fm-muted); }
#ficha4 .fm-sticky__botones { display: flex; gap: 10px; margin-left: auto; }

/* ---------- Tabs de ancla ---------- */
#ficha4 .fm-tabs {
    background: var(--fm-surface);
    border-top: 1px solid var(--fm-line);
    border-bottom: 1px solid var(--fm-line);
}
#ficha4 .fm-tabs ul {
    display: flex;
    gap: 8px;
    max-width: var(--fm-max);
    margin: 0 auto;
    padding: 0 15px;
    overflow-x: auto;
    scrollbar-width: none;
}
#ficha4 .fm-tabs a {
    display: block;
    padding: 16px 28px;
    white-space: nowrap;
    color: var(--fm-muted);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    font-size: 16px;
}
#ficha4 .fm-tabs a:hover { color: var(--fm-accent); }
#ficha4 .fm-tabs a.active { color: var(--fm-accent); border-bottom-color: var(--fm-accent); }

/* ---------- Secciones ---------- */
#ficha4 .fm-seccion {
    max-width: var(--fm-max);
    margin: 0 auto;
    padding: 40px 0 20px 0;
    scroll-margin-top: 80px;
}
#ficha4 .fm-seccion__titulo {
    margin: 0 0 20px;
    font-size: clamp(1.4rem, 4vw, 36px);
    font-weight: 700;
    color: var(--fm-accent);
}
#ficha4 .fm-contenido { line-height: 1.6; }
#ficha4 .fm-contenido ul { padding-left: 0; list-style: none; }
#ficha4 .fm-contenido ul > li { position: relative; padding: 4px 0 4px 34px; }
#ficha4 .fm-contenido ul > li::before {
    content: "\f00c";
    font-family: FontAwesome;
    position: absolute; left: 0; top: 4px;
    font-size: 18px; color: var(--fm-accent);
}

/* Descripcion: texto + galeria */
#ficha4 .fm-descripcion { display: flex; gap: 32px; align-items: flex-start; }
#ficha4 .fm-descripcion__texto { flex: 1 1 50%; min-width: 0; }
#ficha4 .fm-descripcion__galeria { flex: 1 1 50%; min-width: 0; border-radius: var(--fm-radius); overflow: hidden; }
#ficha4 .fm-descripcion--sin-fotos .fm-descripcion__texto { flex-basis: 100%; }

/* Carrusel: cada foto se muestra entera, con su propia proporcion (panoramicas, verticales o 4:3), sin recortar. */
#ficha4 .fm-descripcion__galeria #galeria { margin: 0; }
#ficha4 .fm-descripcion__galeria .carousel-inner > .item img {
    display: block;
    width: 100%;
    height: auto;
}

#ficha4 .fm-facilidades__categoria { margin: 24px 0 8px; font-size: 18px; font-weight: 600; }
#ficha4 .fm-facilidades__lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
#ficha4 .fm-facilidades__lista .fa { color: var(--fm-accent); }

/* Itinerario en acordeon (lo arma el JS) */
#ficha4 .fm-acordeon { border: 1px solid var(--fm-line); border-radius: 6px; margin-bottom: 10px; background: #fff; }
#ficha4 .fm-acordeon__titulo {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 12px 18px;
    border: 0; background: transparent; text-align: left;
    font-size: 15px; font-weight: 400; color: var(--fm-text);
}
#ficha4 .fm-acordeon__titulo::after {
    content: "\f107"; font-family: FontAwesome; font-size: 20px;
    transition: transform .2s;
}
#ficha4 .fm-acordeon.is-open .fm-acordeon__titulo::after { transform: rotate(180deg); }
#ficha4 .fm-acordeon__titulo:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: -2px; font-size: 18px; }
#ficha4 .fm-acordeon__cuerpo { display: none; padding: 0 18px 16px; }
#ficha4 .fm-acordeon.is-open .fm-acordeon__cuerpo { display: block; }

/* Tablas (salidas y tarifas) */
#ficha4 .fm-tabla { width: 100%; border: 1px solid var(--fm-line); border-radius: 6px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: #fff; }
#ficha4 .fm-tabla th, #ficha4 .fm-tabla td { padding: 12px 16px; border-top: 1px solid var(--fm-line); vertical-align: middle; }
#ficha4 .fm-tabla .fm-tabla__cabecera th { background: var(--fm-surface); border-top: 0; font-weight: 600; font-size: 18px; }
#ficha4 .fm-dia {
    display: inline-block; min-width: 34px; padding: 6px; margin: 2px 0;
    border-radius: 50%; background: #555; color: #fff; font-size: 14px; text-align: center;
}
#ficha4 .fm-tabla--salidas .list-inline { margin: 0; }

#ficha4 .fm-tarifa { margin-bottom: 24px; }
#ficha4 .fm-tarifa__datos { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 10px; font-size: 14px; }
#ficha4 .fm-tarifa__monto small { margin-right: 10px; color: var(--fm-muted); }
#ficha4 .fm-tarifa__monto strong { font-size: 18px; }
#ficha4 .fm-tarifa__nota { font-size: 16px; }
#ficha4 .fm-tarifa__descripcion { margin-top: 10px; font-size: 16px; color: var(--fm-muted); }

#ficha4 .fm-texto-tarifas { padding: 40px 0 0}

/* Archivos adjuntos */
#ficha4 .fm-archivos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin: 0; padding: 0; }
#ficha4 .fm-archivo {
    display: flex; align-items: center; gap: 14px;
    height: 100%; padding: 12px 16px;
    color: var(--fm-text); text-decoration: none;
    background: #fff; border: 1px solid var(--fm-line); border-radius: var(--fm-radius);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
#ficha4 .fm-archivo:hover,
#ficha4 .fm-archivo:focus { color: var(--fm-text); text-decoration: none; border-color: var(--fm-accent); box-shadow: var(--fm-shadow); transform: translateY(-1px); }
#ficha4 .fm-archivo:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 2px; }
#ficha4 .fm-archivo__icono {
    flex: 0 0 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: 22px; color: var(--fm-accent);
    background: var(--fm-surface);
    background: color-mix(in srgb, var(--fm-accent) 10%, #fff);
}
#ficha4 .fm-archivo__texto { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
#ficha4 .fm-archivo__nombre {
    font-weight: 600; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
}
#ficha4 .fm-archivo__meta { margin-top: 2px; font-size: 12px; letter-spacing: .06em; color: var(--fm-muted); }
#ficha4 .fm-archivo__descarga { flex: 0 0 auto; font-size: 18px; color: var(--fm-muted); transition: color .15s; }
#ficha4 .fm-archivo:hover .fm-archivo__descarga { color: var(--fm-accent); }

/* Tags */
#ficha4 #tags { padding-top: 32px; }
#ficha4 .fm-tags {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 18px 22px;
    background: var(--fm-surface);
    border-radius: var(--fm-radius);
}
#ficha4 .fm-tags__label {
    display: inline-flex; align-items: center; gap: 8px; margin-right: 6px;
    font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--fm-muted);
}
#ficha4 .fm-tags__label .fa { font-size: 15px; color: var(--fm-accent); }
#ficha4 .fm-tag {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 7px 16px 7px 12px;
    font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--fm-accent); text-decoration: none;
    background: #fff; border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08), inset 0 0 0 1px var(--fm-line);
    transition: background-color .15s, color .15s, box-shadow .15s, transform .15s;
}
#ficha4 .fm-tag::before {
    content: "\f02b"; font-family: FontAwesome; font-weight: normal; font-size: 12px;
    flex: 0 0 auto; opacity: .85;
}
#ficha4 .fm-tag:hover,
#ficha4 .fm-tag:focus {
    color: #fff; text-decoration: none; background: var(--fm-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18); transform: translateY(-1px);
}
#ficha4 .fm-tag:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 2px; }
@media (max-width: 575px) { #ficha4 .fm-tags { padding: 14px 16px; } }

/* Relacionados
#ficha4 .fm-card { display: block; margin-bottom: 20px; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); overflow: hidden; color: inherit; text-decoration: none; background: #fff; transition: box-shadow .2s, transform .2s; }
#ficha4 .fm-card:hover { box-shadow: var(--fm-shadow); transform: translateY(-2px); }
#ficha4 .fm-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
#ficha4 .fm-card__cuerpo { padding: 12px; }
#ficha4 .fm-card__cuerpo h5 { margin: 0 0 6px; font-size: 14px; }
#ficha4 .fm-card__precio { margin-top: 8px; color: var(--fm-accent); font-weight: 700; }
#ficha4 .fm-buscar { text-align: center; padding-bottom: 20px; }*/


/* ========================================
   PRODUCTOS RELACIONADOS
   ======================================== */

.fm-relacionados {
    margin-top: 35px;
    margin-bottom: 35px;
}

.fm-relacionados .fm-seccion__titulo {
    margin-bottom: 25px;
}

/* Columnas */
.fm-relacionados .row {
    display: flex;
    flex-wrap: wrap;
}

.fm-relacionados .row > div {
    margin-bottom: 25px;
}

/* Tarjeta */
.fm-relacionados .fm-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 390px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    transition: box-shadow .25s ease, transform .25s ease;
    text-decoration: none;
}

/* Hover */
.fm-relacionados .fm-card:hover {
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

/* Imagen */
.fm-relacionados .fm-card > img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
    object-position: center;
    background: #f1f1f1;
}

/* Cuerpo */
.fm-relacionados .fm-card__cuerpo {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 20px;
}

/* Título */
.fm-relacionados .fm-card__cuerpo h5 {
    font-size: 17px;
    line-height: 1.4;
    font-weight: 700;
    margin: 0 0 12px;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Duración */
.fm-relacionados .fm-card__cuerpo > small.text-muted {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 18px;
    color: #777;
}

/* Separador y precio / CTA */
.fm-relacionados .fm-card__precio {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #e8e8e8;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

/* Etiqueta DESDE */
.fm-relacionados .fm-card__precio > small {
    display: block;
    font-size: 10px;
    letter-spacing: .7px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #777;
}

/* Importe */
.fm-relacionados .fm-card__precio > b {
    display: inline-block;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--primary);
}

/* Texto secundario dentro del importe */
.fm-relacionados .fm-card__precio > b small {
    font-size: 12px;
    font-weight: 500;
}

/* Tablet */
@media (max-width: 991px) {
    .fm-relacionados .fm-card {
        min-height: 380px;
    }

    .fm-relacionados .fm-card > img {
        height: 200px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .fm-relacionados .row {
        display: block;
    }

    .fm-relacionados .row > div {
        margin-bottom: 20px;
    }

    .fm-relacionados .fm-card {
        min-height: 0;
    }

    .fm-relacionados .fm-card > img {
        height: 220px;
    }

    .fm-relacionados .fm-card__cuerpo {
        padding: 16px 18px 18px;
    }

    .fm-relacionados .fm-card__cuerpo h5 {
        min-height: 0;
        font-size: 17px;
    }
}


/* ---------- Tablet / mobile ---------- */
@media (max-width: 991px) {
    #ficha4 .fm-top { flex-direction: column; gap: 0; }
    #ficha4 .fm-precio { flex-basis: auto; width: 100%; margin-top: 0; }
    #ficha4 .fm-descripcion { flex-direction: column; }
    #ficha4 .fm-descripcion__galeria { width: 100%; }
}
@media (max-width: 575px) {
    #ficha4 .fm-sticky { bottom: 0; padding: 0; }
    #ficha4 .fm-sticky__inner { border-radius: var(--fm-radius) var(--fm-radius) 0 0; padding: 10px 12px; flex-wrap: wrap; }
    #ficha4 .fm-sticky__botones { width: 100%; }
    #ficha4 .fm-sticky__botones .fm-btn { flex: 1; padding: 10px 6px; font-size: 13px; }
    #ficha4 .fm-sticky__botones .fm-btn.btn-whatsapp { padding: 10px 6px !important; }
    #ficha4 .fm-tabs a { padding: 14px 16px; }
    #ficha4 .fm-tabla th, #ficha4 .fm-tabla td { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    #ficha4 .fm-sticky, #ficha4 .fm-btn, #ficha4 .fm-card, #ficha4 .fm-acordeon__titulo::after,
    #ficha4 .fm-archivo, #ficha4 .fm-tag { transition: none; transform: none; }
}

@media print {
    #ficha4 { margin-bottom: 0; }
    #ficha4 .fm-top { display: block; }
    #ficha4 .fm-acordeon__cuerpo { display: block; }
}
