/* ============ GRUPOS Y MINISTERIOS ============ */

.grupos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.grupo-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--crema);
    border-radius: 20px;
    border: 1px solid var(--linea);
    box-shadow: 0 6px 22px -12px rgba(34, 31, 24, 0.18);
    transition:
        transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.45s ease,
        border-color 0.35s ease;
}
.grupo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 50px -24px rgba(34, 31, 24, 0.32);
    border-color: var(--oro);
}

/* ----- Foto superior ----- */
.grupo-foto {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(
        150deg,
        var(--verde-claro),
        var(--verde-oscuro) 80%
    );
}
.grupo-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.grupo-card:hover .grupo-foto img {
    transform: scale(1.07);
}
.grupo-foto::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 55%,
        rgba(20, 14, 10, 0.35)
    );
    pointer-events: none;
}

.grupo-foto-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(
        circle at 30% 20%,
        var(--verde-claro),
        var(--verde-oscuro) 75%
    );
}
.grupo-foto-fallback svg {
    width: 64px;
    height: 64px;
    stroke: var(--oro-suave);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

/* ----- Cuerpo ----- */
.grupo-cuerpo {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.6rem 1.6rem 1.8rem;
}
.grupo-cuerpo h3 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.45rem;
    line-height: 1.2;
    color: var(--verde-oscuro);
    margin-bottom: 0.6rem;
}
.grupo-desc {
    color: var(--tinta-sub);
    font-weight: 300;
    font-size: 0.92rem;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1.1rem;
}

/* ----- Coordinador ----- */
.grupo-coord {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.95rem 0 1.1rem;
    border-top: 1px dashed var(--linea);
    border-bottom: 1px dashed var(--linea);
    margin-bottom: 1.2rem;
}
.grupo-coord-label {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tinta-sub);
}
.grupo-coord-nombre {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--verde-oscuro);
}
.grupo-coord-tel {
    font-size: 0.86rem;
    color: var(--bronce);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    transition: color 0.3s ease;
}
.grupo-coord-tel::before {
    content: "";
    width: 0;
    height: 0;
}
.grupo-coord-tel:hover {
    color: var(--verde-oscuro);
    text-decoration: underline;
}

/* ----- Botón ----- */
.grupo-cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--crema);
    background: linear-gradient(120deg, var(--verde), var(--verde-oscuro));
    box-shadow: 0 10px 20px -10px rgba(14, 58, 43, 0.55);
    text-decoration: none;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        gap 0.3s ease;
}
.grupo-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -12px rgba(14, 58, 43, 0.6);
    gap: 0.75rem;
}

/* ----- Botón ver más ----- */
.grupos-ver-mas {
    display: flex;
    justify-content: center;
    margin-top: 2.6rem;
}
.grupos-ver-mas-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2.2rem;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--verde-oscuro);
    background: var(--crema);
    border: 1px solid var(--oro);
    box-shadow: 0 12px 24px -14px rgba(34, 31, 24, 0.3);
    text-decoration: none;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}
.grupos-ver-mas-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px -16px rgba(34, 31, 24, 0.4);
    background: var(--verde-oscuro);
    color: var(--crema);
}

/* ----- Página pública (sobre fondo crema) ----- */
.sub-body .grupos-grid {
    max-width: 1160px;
}

/* ----- Móvil: carrusel de una card a la vez ----- */
.grupos-carousel {
    position: relative;
}
.grupos-track-wrap {
    overflow: hidden;
}
#gruposTrack {
    transition: transform 0.42s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}
.grupos-carousel-btns {
    display: none;
}

@media (max-width: 640px) {
    .grupos-grid {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 1.2rem;
        padding: 0.4rem 0 0.8rem;
        max-width: none;
        margin: 0;
    }
    #gruposTrack .grupo-card {
        flex: 0 0 100%;
        min-width: 0;
    }
    .grupos-carousel-btns {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
    }
    .grupos-carousel-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1.5px solid var(--oro);
        background: var(--crema);
        color: var(--verde-oscuro);
        font-size: 1.7rem;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px -4px rgba(14, 58, 43, 0.25);
        transition:
            background 0.2s ease,
            transform 0.2s ease;
    }
    .grupos-carousel-btn:hover {
        background: var(--oro-suave);
        transform: scale(1.08);
    }
    .grupos-carousel-btn:disabled {
        opacity: 0.32;
        cursor: default;
        transform: none;
    }
    .grupo-foto {
        aspect-ratio: 16 / 9;
    }
    .grupo-cuerpo {
        padding: 1.35rem 1.3rem 1.5rem;
    }
}
