/* ====== CONTEXTO ====== */

/* ====== HERO ====== */
.taller-hero {
    padding: 12px 0 24px;
}

.taller-hero .inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.taller-title {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin: 14px 0 10px;
    color: #163c3a;
}

.taller-intro {
    max-width: 930px;
    font-size: 18px;
    line-height: 1.6;
    color: #2a2a2a;
}

/* ====== GRID ====== */
.taller-grid {
    padding: 8px 0 64px;
}

.taller-grid .inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(14px, 2.6vw, 28px);
    margin-top: 26px;
}

@media (max-width: 1024px) {
    .cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .12);
}

.card-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    background: #f2f2f2;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-fallback {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, #eaeaea, #eaeaea 10px, #f5f5f5 10px, #f5f5f5 20px);
}

.card-title {
    font-family: var(--font-title);
    font-size: 1.85rem;
    line-height: 1.35;
    margin: 12px 14px 16px;
    font-weight: 700;
}

.card-title a {
    color: #173a37;
    text-decoration: none;
}

.card-title a:hover {
    color: #2b8a7e;
}

/* ====== PAGINACIÓN ====== */
.taller-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

.taller-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border-radius: 8px;
    background: #fff;
    color: #173a37;
    text-decoration: none;
    border: 1px solid #dbe6e0;
}

.taller-pagination .current {
    background: #2b8a7e;
    color: #fff;
    border-color: #2b8a7e;
}


/*single taller*/
/* ====== Single: layout general ====== */
.taller-single {
    overflow-x: hidden;
}

/* evita scroll horizontal */
.taller-single .inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 72px;
}

/* ====== Héroe a ancho completo SIN scroll X ====== */
.taller-heroimg {
    /* full-bleed */
    width: 100vw;
    margin: 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.taller-heroimg img {
    display: block;
    width: 100vw;
    /* ocupar todo el ancho de la ventana */
    max-width: 100vw;
    /* no crecer más que la ventana */
    height: auto;
}

/* ====== Título + subtítulo ====== */
.taller-head {
    margin: 24px 0 12px;
}

.taller-title {
    font-family: var(--font-title, 'Amatic SC', cursive);
    font-size: clamp(42px, 6vw, 64px);
    line-height: 1.05;
    color: #163c3a;
    margin: 8px 0 6px;
}

.taller-sub {
    font-size: clamp(18px, 2.1vw, 20px);
    color: #2a3a39;
    opacity: .9;
    margin: 0 0 10px;
}

/* ====== Contenido en dos columnas ====== */
.taller-content {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: #004f40;
}

.taller-content.two-col {
    column-count: 2;
    column-gap: 40px;
}

.taller-content.two-col p {
    break-inside: avoid;
}

.taller-content.two-col img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

@media (max-width: 900px) {
    .taller-content.two-col {
        column-count: 1;
    }
}

/* ====== Carrusel ====== */
.taller-carousel {
    --tc-h: clamp(140px, 26vh, 240px);
    /* ↓ sube/baja a tu gusto */
}

.taller-carousel .tc-viewport {
    height: var(--tc-h);
}

.taller-carousel .tc-track {
    align-items: center;
    /* centra verticalmente los slides */
}

.taller-carousel {
    position: relative;
    margin: 26px auto 64px;
    max-width: 1200px;
    padding: 0 56px;
    /* espacio para botones */
}

.tc-viewport {
    overflow: hidden;
}

.tc-track {
    display: flex;
    gap: 16px;
    transition: transform .35s ease;
    will-change: transform;
}

.tc-slide {
    flex: 0 0 calc(33.333% - 10.666px);
    /* 3 por vista en desktop */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    background: #fff;
}

.taller-carousel .tc-slide {
    height: var(--tc-h);
    border-radius: 12px;
    overflow: hidden;
}


.tc-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 1024px) {
    .tc-slide {
        flex-basis: calc(50% - 8px);
    }

    /* 2 por vista */
}

@media (max-width: 640px) {
    .taller-carousel {
        padding: 0 44px;
    }

    .tc-slide {
        flex-basis: 100%;
    }

    /* 1 por vista */
}

/* Botones */
.tc-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 2px solid #2b8a7e;
    background: #fff;
    color: #2b8a7e;
    font-size: 26px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
    z-index: 2;
}

.tc-btn:hover {
    background: #2b8a7e;
    color: #fff;
}

.tc-btn.prev {
    left: 8px;
}

.tc-btn.next {
    right: 8px;
}

/* ====== HERO VIEWER (modal panorámico) ====== */
.hero-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    z-index: 2000;
}

.hero-viewer.open {
    display: grid;
    grid-template-rows: 1fr auto;
}

.hv-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, .8);
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 38px;
    cursor: pointer;
}

.hv-close:hover {
    background: rgba(255, 255, 255, .12);
}

.hv-viewport {
    margin: auto;
    width: 100vw;
    height: min(90vh, 100svh);
    /* ocupa la mayor parte de la altura */
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    cursor: grab;
}

.hv-viewport:active {
    cursor: grabbing;
}

.hv-viewport::-webkit-scrollbar {
    height: 10px;
}

.hv-viewport::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .25);
    border-radius: 6px;
}

.hv-img {
    height: 100%;
    width: auto;
    /* imagen muy ancha, se desplaza en X */
    display: inline-block;
    user-select: none;
    -webkit-user-drag: none;
}

.hv-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 16px 18px;
}

.hv-range {
    width: min(820px, 90vw);
    accent-color: #20e0ff;
    /* cyan */
}

/* Bloquea scroll del body cuando el visor está abierto */
.no-scroll {
    overflow: hidden;
}