/* ============================================
   TOUR MODAL - ESTILOS REUTILIZABLES
   ============================================ */

/* Overlay */
.tm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    animation: tmFadeIn 0.3s ease;
}

@keyframes tmFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tm-overlay.cerrando {
    animation: tmFadeOut 0.3s ease forwards;
}

@keyframes tmFadeOut {
    to {
        opacity: 0;
    }
}

/* Contenedor */
.tm-contenedor {
    background: #f8faff;
    border-radius: 20px;
    max-width: 1300px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: tmSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Segoe UI', Arial, sans-serif;
}

@keyframes tmSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Botón cerrar */
.tm-btn-cerrar {
    position: sticky;
    top: 15px;
    float: right;
    margin: 15px 15px 0 0;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: #1a1a1a;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: 0.2s;
    font-weight: bold;
}

.tm-btn-cerrar:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Divisa flotante */
.tm-divisa {
    position: fixed;
    top: 100px;
    left: 20px;
    background: white;
    padding: 12px 18px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 51, 102, 0.2);
    border: 2px solid #003366;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    z-index: 100001;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.tm-divisa-header {
    font-size: 0.7rem;
    font-weight: 800;
    color: #003366;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tm-divisa-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: #28a745;
    margin: 0;
}

.tm-divisa-footer {
    font-size: 0.55rem;
    color: #555;
    margin: 0;
}

/* Main content */
.tm-main {
    padding: 30px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Título */
.tm-titulo {
    font-size: 3rem;
    font-weight: 900;
    color: #D4AF37;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    line-height: 1.1;
}

/* Descripción */
.tm-descripcion {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    border-left: 5px solid #D4AF37;
    font-size: 1rem;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Grid principal: Imagen + Iconos */
.tm-summary-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Galería de imágenes (stack estilo) */
.tm-imagen-stack {
    position: relative;
    width: 100%;
    height: 450px;
}

.tm-stacked-card {
    position: absolute;
    width: 90%;
    height: 100%;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    border: 5px solid white;
}

.tm-stacked-hint {
    text-align: center;
    color: #555;
    font-size: 0.85rem;
    margin-top: 15px;
    font-weight: 600;
}

/* Iconos layout */
.tm-icons-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    align-content: start;
}

.tm-icon-box {
    background: white;
    padding: 25px 15px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid transparent;
}

.tm-icon-box i {
    font-size: 2rem;
    color: #003366;
    margin-bottom: 12px;
}

.tm-icon-box h4 {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 8px 0;
    color: #0056b3;
    letter-spacing: 0.5px;
}

.tm-icon-box p {
    margin: 0;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.tm-icon-box.seguro-card {
    border: 2px solid #FFC107;
}

.tm-icon-box.seguro-card i {
    color: #FFC107;
}

.tm-precio-usd {
    color: #555;
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

.tm-leyenda-usd {
    grid-column: span 3;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-style: italic;
    text-align: center;
}

/* Selector de pasajeros */
.tm-booking-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 51, 102, 0.08);
    margin: 30px 0;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: center;
}

.tm-pax-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tm-pax-group label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #555;
}

.tm-pax-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 5px;
}

.tm-btn-pax {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: #003366;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}

.tm-btn-pax:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.tm-btn-pax:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tm-input-pax {
    flex: 1;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    font-weight: 800;
    color: #003366;
    width: 50px;
}

.tm-total-box {
    text-align: right;
    padding-right: 15px;
    border-right: 1px solid #e2e8f0;
}

.tm-total-label {
    font-size: 0.7rem;
    color: #555;
    font-weight: 700;
    text-transform: uppercase;
}

.tm-total-monto {
    font-size: 1.8rem;
    font-weight: 900;
    color: #003366;
    line-height: 1;
}

.tm-total-moneda {
    font-size: 0.85rem;
    color: #555;
    margin-top: 2px;
}

.tm-btn-reservar {
    background: #003366;
    color: white;
    border: none;
    padding: 18px 30px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
    grid-column: span 3;
    box-shadow: 0 6px 15px rgba(0, 51, 102, 0.2);
}

.tm-btn-reservar:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.3);
}

.tm-btn-reservar:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Grid itinerario + incluye */
.tm-itinerary-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.tm-subtitle {
    font-size: 1.8rem;
    font-weight: 800;
    color: #003366;
    margin-bottom: 25px;
}

/* Acordeón de itinerario */
.tm-day-accordion {
    margin-bottom: 15px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.tm-day-header {
    width: 100%;
    border: none;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 700;
    color: #003366;
    background: white;
    text-align: left;
    font-size: 1rem;
    font-family: inherit;
}

.tm-day-header i {
    transition: transform 0.3s ease;
}

.tm-day-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fafafa;
}

.tm-day-content-inner {
    padding: 20px;
    color: #555;
    line-height: 1.6;
}

/* Incluye/No Incluye */
.tm-feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.tm-feature-list h4 {
    color: #003366;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.tm-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.tm-feature-list.inc li i {
    color: #28a745;
    margin-top: 4px;
}

.tm-feature-list.no-inc li i {
    color: #dc3545;
    margin-top: 4px;
}

/* Info extra grid */
.tm-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.tm-info-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tm-info-card h3 {
    color: #D4AF37;
    text-transform: uppercase;
    font-weight: 900;
    margin-top: 0;
    border-bottom: 2px solid #eef4ff;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.tm-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tm-info-card ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tm-info-card ul li i {
    color: #D4AF37;
    margin-top: 4px;
    flex-shrink: 0;
}

.tm-nota-importante {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 15px;
    border-radius: 10px;
    margin-top: 15px;
    color: #92400e;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Puntos de salida */
.tm-punto-salida-group {
    margin-bottom: 20px;
}

.tm-punto-salida-group b {
    color: #003366;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.tm-punto-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tm-punto-lista li {
    padding: 6px 0 6px 15px;
    position: relative;
    font-size: 0.85rem;
    color: #555;
    display: flex;
    justify-content: space-between;
}

.tm-punto-lista li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #D4AF37;
    font-weight: bold;
}

.tm-punto-lista .tm-hora {
    color: #003366;
    font-weight: 700;
    font-family: 'Segoe UI', monospace;
}

/* Mapa */
.tm-map-wrapper {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    height: 450px;
}

.tm-map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Loading */
.tm-loading {
    padding: 100px 20px;
    text-align: center;
    color: #003366;
}

.tm-loading i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.tm-loading p {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 992px) {

    .tm-summary-grid,
    .tm-itinerary-grid,
    .tm-info-grid {
        grid-template-columns: 1fr;
    }

    .tm-imagen-stack {
        height: 350px;
    }

    .tm-titulo {
        font-size: 2rem;
    }

    .tm-booking-container {
        grid-template-columns: 1fr 1fr;
    }

    .tm-total-box {
        grid-column: span 2;
        border-right: none;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .tm-divisa {
        display: none;
    }
}

@media (max-width: 600px) {
    .tm-booking-container {
        grid-template-columns: 1fr;
    }

    .tm-total-box {
        grid-column: span 1;
    }

    .tm-main {
        padding: 20px;
    }
}