/* viajero.css - estilos para la sección "Ruta del viajero" */

/* Ocultar viajero-section por defecto, solo mostrar cuando tiene active-section */
#viajero-section {
    display: none;
}

#viajero-section.active-section {
    display: block;
}

.viajero-container,
#viajero-section .viajero-inner {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: linear-gradient(180deg, #0f1724 0%, #0b1220 100%);
    color: #fff;
    /* center within the page/container and limit width */
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.viajero-main-title {
    margin: 6px 0 10px 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.viajero-sub {
    margin: 0 0 12px 0;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.viajero-cat-title {
    margin: 10px 0 8px 0;
    font-size: 1rem;
    color: #fff;
    display: flex;
    text-align: center;
    justify-content: center;
}

.viajero-cat-grid {
    display: grid;
    /* On wide screens, up to 2 columns; shrink to 1 column on small screens */
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
    justify-items: stretch;
}

.viajero-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 10px 10px rgba(255, 255, 255, 0.286);
}

.viajero-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.viajero-image-wrap {
    width: 100%;
    /* allow the image to determine height but keep a minimum to align cards */
    min-height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 6px;
}

.viajero-image-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain; /* match banner rules so image doesn't distort */
    border-radius: 5px;
    margin: 0 auto;
}

.viajero-card-body {
    padding: 8px;
}

.viajero-card-title {
    margin: 0;
    font-size: 0.95rem;
    justify-content: center;
    display: flex;
    text-align: center;
}

.viajero-card-header {
    margin: 6px 0 4px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e6eef8;
    text-align: center;
}
/* Breakpoints requested by user: 1024, 768, 425, 375, 320 */
@media (max-width:1024px) {
    /* small tweaks for laptops/tablets */
    .viajero-image-wrap { height: 130px; }
}

@media (max-width:768px) {
    /* tablet and below: switch to single column layout */
    .viajero-cat-grid {
        grid-template-columns: 1fr;
    }
    .viajero-image-wrap { height: 120px; }
}

@media (max-width:425px) {
    /* small phones: avoid vertical cropping — let images size naturally */
    .viajero-image-wrap { height: auto; }
    .viajero-image-wrap img {
        width: 100%;
        height: auto;
        object-fit: contain; /* show whole image without cropping */
        object-position: center;
    }
}

@media (max-width:375px) {
    /* tiny phones: slightly smaller paddings if needed */
    .viajero-card-body { padding: 6px; }
}

@media (max-width:320px) {
    /* very small screens: ensure images remain visible */
    .viajero-image-wrap { height: auto; }
    .viajero-image-wrap img { width: 100%; height: auto; object-fit: contain; }
}

/* Desktop-only: center first card when showing 2-column layout (apply at >=1025px) */
@media (min-width:1025px) {
    .viajero-cat-grid > .viajero-card:first-child {
        grid-column: 1 / -1; /* span both columns */
        justify-self: center;
        max-width: 600px;
        margin: 0 auto;
    }
}
/* end of viajero.css */