/* ═══════════════════════════════════════════════════════════════
   EXPERIENCIA TALLER "LECTOESCRITURA SIN BARRERAS"
   style-experiencia-taller.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables locales (hereda las globales de StyleS.css) ── */
:root {
    --exp-radius: 18px;
    --exp-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
    --exp-shadow-hover: 0 20px 56px rgba(37, 99, 235, 0.22);
    --exp-transition: 0.42s cubic-bezier(0.34, 1.20, 0.64, 1);
    --exp-overlay-bg: linear-gradient(
        180deg,
        rgba(15,23,42,0) 0%,
        rgba(37,99,235,0.55) 60%,
        rgba(124,58,237,0.82) 100%
    );
}

/* ── Sección contenedora ── */
.experience-gallery {
    padding: 5rem 2rem 6rem;
    background: linear-gradient(160deg, #f0f4ff 0%, #faf7ff 55%, #f0fdf9 100%);
    position: relative;
    overflow: hidden;
}

/* Decoración de fondo sutil */
.experience-gallery::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(37,99,235,0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.experience-gallery::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ── Encabezado de sección ── */
.experience-gallery .section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.experience-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 1.1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.experience-gallery .section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.7rem);
    color: var(--dark);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.experience-gallery .section-header p {
    color: var(--gray);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ── Grid principal ── */
.experience-grid {
    display: grid;
    gap: 1.8rem;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    max-width: 1180px;
    margin: 0 auto;
}

/* ── Tarjeta base ── */
.exp-card {
    background: #fff;
    border-radius: var(--exp-radius);
    box-shadow: var(--exp-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--exp-transition), box-shadow var(--exp-transition);
    position: relative;
}

.exp-card:hover {
    transform: translateY(-8px) scale(1.012);
    box-shadow: var(--exp-shadow-hover);
}

/* ── Variante VERTICAL (retrato) — imágenes 2048×1355 mostradas en crop portrait ── */
.exp-vertical {
    grid-row: span 1;
}

.exp-vertical .exp-image-wrap {
    width: 100%;
    aspect-ratio: 4 / 5;   /* retrato que aprovecha bien una foto landscape recortada al centro */
}

/* ── Variante HORIZONTAL (full-width por 2 columnas) ── */
.exp-horizontal {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
}

.exp-horizontal .exp-image-wrap {
    width: 55%;
    flex-shrink: 0;
    aspect-ratio: unset;
    min-height: 340px;
}

/* ── Contenedor de imagen con efecto hover ── */
.exp-image-wrap {
    position: relative;
    overflow: hidden;
    background: #e5e7eb;
}

/* Imagen principal */
.exp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition:
        transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.55s ease;
    filter: brightness(0.96) saturate(1.05);
}

/* ── Efecto HOVER sobre la imagen ── */
.exp-card:hover .exp-img {
    transform: scale(1.07);
    filter: brightness(1.04) saturate(1.18);
}

/* Overlay degradado (siempre visible al 0 → aparece en hover) */
.exp-overlay {
    position: absolute;
    inset: 0;
    background: var(--exp-overlay-bg);
    opacity: 0;
    transition: opacity 0.38s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.4rem 1.5rem;
}

.exp-card:hover .exp-overlay {
    opacity: 1;
}

.exp-overlay-content {
    color: #fff;
    transform: translateY(10px);
    transition: transform 0.38s ease 0.05s;
}

.exp-card:hover .exp-overlay-content {
    transform: translateY(0);
}

.exp-tag {
    display: inline-block;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.7rem;
    border-radius: 30px;
    margin-bottom: 0.4rem;
    display: block;
    width: fit-content;
}

.exp-overlay-content h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* ── Contenido de texto de la tarjeta ── */
.exp-content {
    padding: 1.5rem 1.7rem 1.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}

.exp-icon {
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: 0.1rem;
}

.exp-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--dark);
    line-height: 1.3;
    margin: 0;
}

.exp-content p {
    color: var(--gray);
    font-size: 0.91rem;
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

/* ── Meta/badges de modalidad y datos ── */
.exp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Badges de modalidad */
.exp-mode {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.22rem 0.75rem;
    border-radius: 30px;
}

.exp-presencial {
    background: #dbeafe;
    color: #1d4ed8;
}

.exp-virtual {
    background: #ede9fe;
    color: #6d28d9;
}

/* Badges de estadísticas */
.exp-stat {
    font-size: 0.76rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #065f46;
    border: 1px solid #bbf7d0;
    padding: 0.22rem 0.75rem;
    border-radius: 30px;
}

/* Badges de ubicación */
.exp-location {
    font-size: 0.76rem;
    font-weight: 600;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    padding: 0.22rem 0.75rem;
    border-radius: 30px;
}

/* Badges de herramientas */
.exp-tool {
    font-size: 0.72rem;
    font-weight: 600;
    background: #faf5ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
    padding: 0.22rem 0.75rem;
    border-radius: 30px;
}

/* ── Línea decorativa junto al título de la card ── */
.exp-content h3::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
    margin-top: 0.45rem;
    transition: width 0.35s ease;
}

.exp-card:hover .exp-content h3::after {
    width: 72px;
}

/* ── Placeholder si la imagen no carga ── */
.exp-image-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #e0e7ff 0%, #f5f3ff 100%);
    z-index: 0;
}

.exp-img {
    position: relative;
    z-index: 1;
}

/* ═══════ RESPONSIVE ═══════ */

/* Tableta ancha */
@media (max-width: 900px) {
    .experience-grid {
        grid-template-columns: 1fr;
    }

    .exp-horizontal {
        grid-column: 1 / -1;
        flex-direction: column;
    }

    .exp-horizontal .exp-image-wrap {
        width: 100%;
        min-height: 280px;
        aspect-ratio: 16 / 9;
    }

    .exp-vertical .exp-image-wrap {
        aspect-ratio: 3 / 2;
    }
}

/* Móvil */
@media (max-width: 580px) {
    .experience-gallery {
        padding: 3.5rem 1rem 4rem;
    }

    .experience-gallery .section-header h2 {
        font-size: 1.6rem;
    }

    .exp-horizontal .exp-image-wrap {
        min-height: 220px;
    }

    .exp-content {
        padding: 1.1rem 1.2rem 1.3rem;
    }

    .exp-content h3 {
        font-size: 1rem;
    }
}
