/* ==========================================================================
   Carruseles de la home (hero + tarjetas de categorías).
   Usado por resources/views/welcome.blade.php. Requiere swiper-bundle.
   ========================================================================== */

/* ── Hero Swiper ─────────────────────── */
.hero-swiper {
    width: 100%;
    height: 80vh;
    min-height: 520px;
    max-height: 900px;
}

/* CRÍTICO: swiper-wrapper y slide deben ser 100% del contenedor */
.hero-swiper .swiper-wrapper {
    height: 100%;
}
.hero-swiper .swiper-slide {
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Fondo con Ken Burns */
.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    will-change: transform;
    transform: scale(1.08);
    transition: transform 7s cubic-bezier(.25,.46,.45,.94);
}
.hero-swiper .swiper-slide-active .slide-bg {
    transform: scale(1);
}

/* Overlay oscuro */
.slide-overlay {
    position: absolute;
    inset: 0;
}

/* Contenido del slide */
.slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px 40px;
    color: #fff;
    max-width: 900px;
    margin: 0 auto;
}

/* Animaciones de entrada */
.slide-title {
    font-size: clamp(1.9rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    text-shadow: 0 3px 18px rgba(0,0,0,.45);
    opacity: 0;
    transform: translateY(35px);
    transition: opacity .65s ease .15s, transform .65s ease .15s;
}
.slide-subtitle {
    font-size: clamp(.95rem, 2.2vw, 1.3rem);
    margin-top: 14px;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .65s ease .35s, transform .65s ease .35s;
    max-width: 680px;
}
.slide-description {
    font-size: clamp(.82rem, 1.7vw, 1rem);
    margin-top: 10px;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .65s ease .5s, transform .65s ease .5s;
    max-width: 600px;
    line-height: 1.65;
}
.slide-btn {
    margin-top: 30px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease .7s, transform .55s ease .7s;
}
.slide-btn a {
    display: inline-block;
    padding: 13px 38px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
    color: #1a1d23;
    box-shadow: 0 4px 22px rgba(0,0,0,.28);
    transition: transform .2s, box-shadow .2s, background .2s;
}
.slide-btn a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
    background: #f0f0f0;
}

/* Activar animaciones en slide activo */
.hero-swiper .swiper-slide-active .slide-title,
.hero-swiper .swiper-slide-active .slide-subtitle,
.hero-swiper .swiper-slide-active .slide-description,
.hero-swiper .swiper-slide-active .slide-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Paginación */
.hero-swiper .swiper-pagination {
    bottom: 24px;
}
.hero-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,.55);
    opacity: 1;
    transition: width .3s, background .3s, border-radius .3s;
}
.hero-swiper .swiper-pagination-bullet-active {
    background: #fff;
    width: 30px;
    border-radius: 5px;
}

/* Flechas de navegación */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.35);
    backdrop-filter: blur(6px);
    transition: background .25s, transform .2s;
    top: 50%;
}
.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
    background: rgba(255,255,255,.32);
    transform: translateY(-50%) scale(1.08);
}
.hero-swiper .swiper-button-prev { transform: translateY(-50%); }
.hero-swiper .swiper-button-next { transform: translateY(-50%); }
.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after {
    font-size: 15px;
    color: #fff;
    font-weight: 800;
}

/* Barra de progreso inferior */
.slide-progress-bar {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    width: 0%;
    background: rgba(255,255,255,.85);
    z-index: 10;
}

/* ── Placeholder sin slides ──────────── */
.hero-placeholder {
    height: 100vh;
    min-height: 520px;
    max-height: 900px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d6a4f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 80px 24px 40px;
}

/* ── Sección características ─────────── */
.features-section {
    padding: 90px 0;
    background: #f8f9fa;
}
.feature-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #eee;
    height: 100%;
    transition: box-shadow .25s, transform .25s;
}
.feature-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.09);
    transform: translateY(-4px);
}
.feature-icon {
    width: 54px; height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef0ff, #e8f5e9);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

/* ── Footer ──────────────────────────── */
.site-footer {
    background: #1a1d23;
    color: rgba(255,255,255,.55);
    padding: 28px 0;
    text-align: center;
    font-size: .88rem;
}

@media (max-width: 767px) {
    .hero-swiper { height: 70vh; }
    .hero-swiper .swiper-button-prev,
    .hero-swiper .swiper-button-next { display: none !important; }
}

/* ── Carrusel 2 — Tarjetas tipo "Mesas de Autor" ─────── */
.c2-section {
    padding: 52px 0 0;
    background: #fff;
    overflow: hidden;
}
.c2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 0 28px;
}
.c2-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #1a1d23;
    margin: 0 0 6px;
    line-height: 1.1;
}
.c2-subtitle-link {
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #1a1d23;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.c2-subtitle-link:hover { color: #405189; }

/* Flechas de navegación */
.c2-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #1a1d23;
    font-size: 1.35rem;
    line-height: 1;
    transition: color .2s, transform .15s;
}
.c2-nav-btn:hover { color: #405189; transform: scale(1.2); }
.c2-nav-btn:disabled { color: #ccc; cursor: default; transform: none; }

/* Swiper de tarjetas */
.c2-swiper {
    width: 100%;
    overflow: visible !important; /* permite ver la tarjeta parcial del extremo */
}
.c2-swiper .swiper-wrapper { align-items: stretch; }

/* Tarjeta individual */
.c2-card {
    position: relative;
    height: clamp(320px, 38vw, 520px);
    overflow: hidden;
    display: block;
    cursor: pointer;
}
.c2-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.25,.46,.45,.94);
}
.c2-card:hover img { transform: scale(1.06); }

/* Overlay gradiente inferior */
.c2-card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 70px 18px 18px;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, transparent 100%);
    transition: padding .3s;
}
.c2-card:hover .c2-card-overlay { padding-bottom: 22px; }

.c2-card-name {
    display: block;
    font-size: clamp(.8rem, 1.2vw, 1rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,.45);
    margin-bottom: 4px;
}
.c2-card-link {
    display: inline-block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: rgba(255,255,255,.82);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}
.c2-card-link:hover { color: #fff; }

/* Contenedor que limita el ancho visible y recorta */
.c2-swiper-container {
    overflow: hidden;
}

@media (max-width: 767px) {
    .c2-section { padding: 40px 0 0; }
    .c2-card { height: 280px; }
