/* ==========================
   CATÁLOGO SOCIAS
========================== */

.catalogo-socias-section {
    background: #ffffff;
    padding: 40px 0;
}

.catalogo-header {
    text-align: center;
    margin-bottom: 50px;
}

.catalogo-header h1 {
    color: #5a2d82;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.catalogo-header p {
    max-width: 800px;
    margin: auto;
    color: #555;
    line-height: 1.7;
    font-size: 1.2rem;
}

.categoria-block {
    margin-bottom: 90px;
}

.categoria-title {
    color: #5a2d82;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 35px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e8d6f3;
}

.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-top: 10px;
}

/* ==========================
   ACORDEÓN CATEGORÍAS
========================== */

.categoria-accordion {
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #ececec;
    background: #fff;
}

.categoria-btn {
    width: 100%;
    border: none;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #5a2d82;
}

.categoria-btn:hover {
    background: #faf7fd;
}

.categoria-icon {
    font-size: 30px;
    transition: .3s;
}

.categoria-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .5s ease;
}

.categoria-accordion.active .categoria-content {
    max-height: 5000px;
    padding: 0 30px 30px;
}

.categoria-accordion.active .categoria-icon {
    transform: rotate(45deg);
}

.categoria-accordion.active .categoria-btn {
    background: #faf7fd;
}

/* ==========================
   TARJETAS
========================== */

.flip-card {
    perspective: 1200px;
    height: 320px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: .7s;
    transform-style: preserve-3d;
}

.flip-card.active .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
    0 10px 25px rgba(0,0,0,.08);
}

/* FRENTE */
.flip-card-front {
    background: white;
    border: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px;
}

.flip-card-front img {
    max-width: 180px;
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
}

.flip-card-front h3 {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.3;
    color: #5a2d82;
    margin: 0;
    font-weight: 700;
}

.logo-wrapper {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-wrapper img {
    max-width: 180px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* REVERSO */
.flip-card-back {
    transform: rotateY(180deg);
    background:
    linear-gradient(
        135deg,
        #5a2d82,
        #7f46a8
    );
    color: white;
    padding: 30px;
}

.flip-card-back h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: 700;
}

.social-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-list li {
    margin-bottom: 14px;
}

.social-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    transition: .3s;
    overflow-wrap: break-word;
}

.social-list a:hover {
    opacity: .8;
}

.social-list svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-list img {
    width: 20px;
    height: 20px;
}


/* ==========================
   SUBTÍTULOS (ALIADOS ESTRATÉGICOS / CONVENIOS)
========================== */

.subcategoria-block {
    margin-bottom: 70px;
}

.subcategoria-title {
    color: #5a2d82;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e8d6f3;
}

/* ==========================
   SLIDER ALIADOS ESTRATÉGICOS (solo frente, no interactivo)
========================== */

.aliados-slider {
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}

.aliados-slider-track {
    display: flex;
    width: max-content;
    animation: aliados-slide-loop 25s linear infinite;
}

.aliados-slider:hover .aliados-slider-track {
    animation-play-state: paused;
}

@keyframes aliados-slide-loop {
    from {
        transform: translateX(0);
    }
    to {
        /* Se desplaza exactamente la mitad del ancho (el bloque duplicado) y se reinicia sin salto */
        transform: translateX(-50%);
    }
}

.aliado-slide {
    flex: 0 0 auto;
    width: 220px;
    height: 220px;
    margin-right: 30px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.aliado-slide .logo-wrapper {
    height: 110px;
    margin-bottom: 12px;
}

.aliado-slide h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #5a2d82;
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

/* ==========================
   TARJETAS DE CONVENIO (REVERSO)
========================== */

.flip-card-back-convenio {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.convenio-web {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 16px;
    transition: .3s;
}

.convenio-web:hover {
    opacity: .8;
}

.convenio-web img {
    width: 18px;
    height: 18px;
}

.beneficios-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: left;
}

.beneficios-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.beneficios-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: #ffffff;
}

/* ==========================
   CONTACTO CONVENIOS (FORMULARIO VISIBLE)
========================== */

.contacto-convenios {
    background: linear-gradient(135deg, #431043, #d34681);
    color: #ffffff;
    padding: 70px 0;
}

.contacto-convenios-header {
    max-width: 780px;
    margin: 0 auto 40px;
    text-align: center;
}

.contacto-convenios-header h2 {
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1.35;
}

.convenios-form {
    max-width: 640px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    color: #333;
}

.convenios-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 10px;
}

.convenios-form label {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
    color: #5a2d82;
}

.convenios-form input[type="text"],
.convenios-form input[type="email"],
.convenios-form input[type="tel"] {
    margin-top: 6px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-weight: 400;
    color: #333;
}

.convenios-radio-group {
    border: none;
    margin: 10px 0 25px;
    padding: 0;
}

.convenios-radio-group legend {
    font-weight: 600;
    color: #5a2d82;
    margin-bottom: 12px;
    padding: 0;
    width: 100%;
}

.radio-inline {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    margin-right: 30px;
    font-weight: 400 !important;
    color: #333 !important;
}

.radio-inline input {
    width: auto;
}

.convenios-form .btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

/* ==========================
   BOLETÍN MENSUAL — TARJETAS
========================== */

.boletines-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 980px;
    margin: 0 auto;
}

.boletin-card {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform .3s ease;
    background: none;
    border: none;    
}

.boletin-card:hover {
    transform: translateY(-6px);
}

.boletin-portada {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.10);
    aspect-ratio: 400 / 560;
    background: #f3ecf7;
}

.boletin-portada img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.boletin-portada-overlay {
    position: absolute;
    inset: 0;
    background: rgba(67, 16, 67, 0.72);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity .3s ease;
}

.boletin-portada-overlay img {
    width: 20px;
    height: 20px;
}

.boletin-card:hover .boletin-portada-overlay {
    opacity: 1;
}

.boletin-titulo {
    margin-top: 16px;
    text-align: center;
    color: #5a2d82;
    font-size: 1.1rem;
    font-weight: 700;
}

.boletin-titulo span {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: #777;
}

/* Tarjeta destacada (boletín del mes en curso) */
.boletin-card-destacado {
    transform: scale(1.06);
}

.boletin-card-destacado:hover {
    transform: scale(1.06) translateY(-6px);
}

.boletin-card-destacado .boletin-portada {
    box-shadow: 0 16px 34px rgba(90, 45, 130, .30);
}

.boletin-card-destacado .boletin-titulo {
    color: #002376;
}

.boletin-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #431043, #d34681);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 6px 14px rgba(0,0,0,.18);
    z-index: 2;
    white-space: nowrap;
}

/* ==========================
   BOLETÍN — ARCHIVO (pestañas por año)
========================== */

.boletines-anio-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
}

.anio-tab {
    border: none;
    background: #ffffff;
    color: #5a2d82;
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 26px;
    border-radius: 30px;
    cursor: pointer;
    transition: .25s;
}

.anio-tab:hover {
    background: #faf7fd;
}

.anio-tab.active {
    background: #faf7fd;
    border-color: transparent;
    color: #5a2d82;
}

.anio-panel {
    display: none;
}

.anio-panel.active {
    display: block;
    animation: anio-panel-fade .35s ease;
}

@keyframes anio-panel-fade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.boletines-vacio {
    text-align: center;
    color: #777;
    font-size: 1.1rem;
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 1199px) {

    .catalogo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media (max-width: 991px) {

    .catalogo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .boletines-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .boletin-card-destacado {
        grid-column: 1 / -1;
        margin: 0 auto 10px;
        transform: scale(1);
    }

    .boletin-card-destacado:hover {
        transform: translateY(-6px);
    }

}

@media (max-width: 575px) {

    .catalogo-grid {
        grid-template-columns: 1fr;
    }

    .boletines-grid {
        grid-template-columns: 1fr;
        max-width: 260px;
    }

    .boletin-card-destacado {
        max-width: 100%;
    }

    .anio-tab {
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    .categoria-title {
        font-size: 26px;
    }

    .catalogo-header h1 {
        font-size: 34px;
    }

    .subcategoria-title {
        font-size: 22px;
    }

    .aliado-slide {
        width: 160px;
        height: 180px;
        margin-right: 18px;
        padding: 14px;
    }

    .aliado-slide .logo-wrapper {
        height: 80px;
    }

    .aliado-slide h3 {
        font-size: 0.9rem;
    }

    .aliados-slider-track {
        animation-duration: 18s;
    }

    .convenios-form {
        padding: 25px;
    }

    .convenios-form-grid {
        grid-template-columns: 1fr;
    }

    .contacto-convenios-header h2 {
        font-size: 1.4rem;
    }

    .radio-inline {
        margin-right: 20px;
    }

}