/* =========================================
   EXPERIENCES (Espaciado reducido)
   ========================================= */
.experiences-section {
    padding: 2rem 0; /* Reducido de 4rem a 2rem */
}

.experiences-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem; /* Reducido de 2.5rem a 1.5rem */
    flex-wrap: wrap;
}

.experiences-filters .filter-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1.25rem; /* Reducido de 0.6rem 1.5rem */
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.experiences-filters .filter-btn:hover,
.experiences-filters .filter-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.experiences-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem; /* Reducido de 1.5rem a 1rem */
}

.experiences-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; /* Reducido de 2rem a 1.5rem */
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.experience-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f1f5f9;
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.experience-card__thumb {
    position: relative;
    height: 200px; /* Reducido de 240px a 200px */
    overflow: hidden;
    cursor: pointer;
}

.experience-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.experience-card:hover .experience-card__thumb img {
    transform: scale(1.05);
}

.experience-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.experience-card__info {
    padding: 1rem; /* Reducido de 1.5rem a 1rem */
    text-align: center;
}

.experience-card__info h3 {
    font-size: 1.1rem; /* Reducido de 1.3rem a 1.1rem */
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.experience-card__info p {
    font-size: 0.9rem; /* Reducido de 0.95rem a 0.9rem */
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.experiences-cta {
    text-align: center;
    margin-top: 1.5rem; /* Reducido de 2.5rem a 1.5rem */
}

/* Modal */
.experience-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none; /* ← CAMBIO CRÍTICO */
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.experience-modal.is-open {
    display: flex; /* ← Mostrar solo cuando está abierto */
    opacity: 1;
    pointer-events: auto;
}

.experience-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(4px);
}

.experience-modal__content {
    position: relative;
    z-index: 2001;
    background: white;
    border-radius: var(--radius);
    max-width: 850px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.experience-modal.is-open .experience-modal__content {
    transform: scale(1);
}

.experience-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2002;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1e293b;
    transition: background 0.2s;
}

.experience-modal__close:hover {
    background: var(--color-accent);
    color: white;
}

.experience-modal__media {
    width: 100%;
    aspect-ratio: 16/9;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.experience-modal__media iframe,
.experience-modal__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
}

.experience-modal__info {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
}

.experience-modal__info h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.experience-modal__info p {
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 1024px) {
    .experiences-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .experiences-carousel-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    .carousel-btn {
        width: 100%;
        border-radius: 8px;
        height: 44px;
    }
    .experiences-grid {
        grid-template-columns: 1fr;
    }
}