/* =========================================================
   PASIÓN IGLESIA
   HOME - VIDEO BACKGROUND + GLASS CARDS
   ========================================================= */


/* ---------- RESET ---------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;

    font-family: Arial, Helvetica, sans-serif;

    background: #070a08;
    color: #ffffff;
}

a {
    color: inherit;
}


/* =========================================================
   VIDEO FIJO DE FONDO
   ========================================================= */

.background-video {
    position: fixed;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    z-index: -20;

    background: #070a08;
}

.background-video video {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 100%;
    height: 100%;

    min-width: 100%;
    min-height: 100%;

    transform: translate(-50%, -50%);

    object-fit: cover;
}


/* Capa oscura sobre el video */

.background-overlay {
    position: fixed;

    inset: 0;

    z-index: -19;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            rgba(3, 6, 4, 0.25) 0%,
            rgba(3, 6, 4, 0.38) 45%,
            rgba(3, 6, 4, 0.50) 100%
        );
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 80px 25px;

    text-align: center;
}

.hero-inner {
    width: 100%;
    max-width: 900px;
}

.hero-label {
    display: block;

    margin-bottom: 22px;

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 6px;

    text-transform: uppercase;

    color: rgba(255, 255, 255, 0.82);

    text-shadow:
        0 3px 12px rgba(0, 0, 0, 0.7);
}

.hero h1 {
    margin: 0;

    font-size: clamp(4rem, 10vw, 8.5rem);

    line-height: 0.86;

    letter-spacing: -5px;

    font-weight: 900;

    text-shadow:
        0 8px 35px rgba(0, 0, 0, 0.55);
}

.hero p {
    max-width: 680px;

    margin: 32px auto 0;

    font-size: clamp(1rem, 2vw, 1.25rem);

    line-height: 1.7;

    color: rgba(255, 255, 255, 0.90);

    text-shadow:
        0 3px 15px rgba(0, 0, 0, 0.85);
}

.scroll-indicator {
    margin-top: 45px;

    font-size: 0.68rem;
    font-weight: 700;

    letter-spacing: 4px;

    color: rgba(255, 255, 255, 0.65);

    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.8);
}


/* =========================================================
   CONTENEDOR GENERAL
   ========================================================= */

.page {
    position: relative;

    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;

    z-index: 1;
}

.cards {
    padding-bottom: 80px;
}


/* =========================================================
   TARJETA PRINCIPAL
   ========================================================= */

.card {
    position: relative;

    display: block;

    width: 100%;

    min-height: 430px;

    margin-bottom: 28px;

    overflow: hidden;

    border-radius: 28px;

    text-decoration: none;

    color: #ffffff;

    border:
        1px solid rgba(255, 255, 255, 0.30);

    background:
        rgba(7, 11, 8, 0.28);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.30);

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}


/* =========================================================
   FOTO DENTRO DE TARJETA
   ========================================================= */

.card-image {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center center;

    opacity: 0.58;

    transition:
        transform 0.65s ease,
        opacity 0.35s ease;
}


/* =========================================================
   SERVICIOS Y CLASES

   Ajuste independiente:
   - menos desplazamiento vertical
   - pastor más arriba
   - imagen desplazada horizontalmente
     para sacar la cara de detrás del título
   ========================================================= */

.card-image-servicios {
    object-position: 62% top;

    height: calc(100% + 25px);

    transform:
        translateX(65px)
        translateY(18px)
        scale(1.08);
}


/* =========================================================
   OSCURECIDO DE FOTO
   ========================================================= */

.card::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 1;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,

            rgba(3, 6, 4, 0.90) 0%,

            rgba(3, 6, 4, 0.72) 35%,

            rgba(3, 6, 4, 0.35) 68%,

            rgba(3, 6, 4, 0.12) 100%
        );
}


/* =========================================================
   CONTENIDO TARJETA
   ========================================================= */

.card-content {
    position: relative;

    z-index: 2;

    min-height: 430px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    max-width: 650px;

    padding: 55px;
}

.card-label {
    display: block;

    margin-bottom: 13px;

    font-size: 0.70rem;

    font-weight: 800;

    letter-spacing: 5px;

    text-transform: uppercase;

    color:
        rgba(255, 255, 255, 0.75);
}

.card h2 {
    margin-bottom: 18px;

    font-size:
        clamp(3rem, 6vw, 5.5rem);

    line-height: 0.92;

    letter-spacing: -2px;

    font-weight: 900;

    text-shadow:
        0 4px 18px rgba(0, 0, 0, 0.55);
}

.card p {
    max-width: 510px;

    margin-bottom: 27px;

    font-size: 1rem;

    line-height: 1.7;

    color:
        rgba(255, 255, 255, 0.88);

    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.65);
}


/* =========================================================
   BOTÓN VISUAL
   ========================================================= */

.card-action {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: fit-content;

    padding: 12px 20px;

    border:
        1px solid rgba(255, 255, 255, 0.65);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.07);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    font-size: 0.74rem;

    font-weight: 800;

    letter-spacing: 0.7px;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}


/* =========================================================
   HOVER
   ========================================================= */

.card:hover {
    transform: translateY(-6px);

    border-color:
        rgba(255, 255, 255, 0.70);

    box-shadow:
        0 35px 90px rgba(0, 0, 0, 0.42);
}

.card:hover .card-image {
    transform: scale(1.055);

    opacity: 0.70;
}


/* Servicios mantiene su encuadre durante hover */

.card:hover .card-image-servicios {
    transform:
        translateX(65px)
        translateY(18px)
        scale(1.13);

    opacity: 0.70;
}

.card:hover .card-action {
    background:
        rgba(255, 255, 255, 0.15);

    transform: translateX(4px);
}


/* =========================================================
   HOMBRES / MUJERES
   JÓVENES / NIÑOS
   ========================================================= */

.ministry-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 28px;

    margin-bottom: 28px;
}

.ministry-grid .card {
    min-height: 520px;

    margin-bottom: 0;
}

.ministry-grid .card-content {
    min-height: 520px;

    max-width: none;

    padding: 40px;
}

.ministry-grid .card h2 {
    font-size:
        clamp(2.5rem, 4vw, 4rem);
}


/*
   En tarjetas de ministerios la sombra
   viene desde abajo para dejar ver más foto.
*/

.ministry-grid .card::after {
    background:
        linear-gradient(
            0deg,

            rgba(3, 6, 4, 0.94) 0%,

            rgba(3, 6, 4, 0.72) 38%,

            rgba(3, 6, 4, 0.30) 70%,

            rgba(3, 6, 4, 0.08) 100%
        );
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    position: relative;

    z-index: 2;

    margin-top: 20px;

    padding:
        70px 20px 85px;

    text-align: center;

    border-top:
        1px solid rgba(255, 255, 255, 0.15);

    background:
        rgba(3, 6, 4, 0.42);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.footer-logo {
    margin-bottom: 16px;

    font-size: 1rem;

    font-weight: 900;

    letter-spacing: 4px;
}

.footer p {
    margin: 5px 0;

    font-size: 0.88rem;

    line-height: 1.7;

    color:
        rgba(255, 255, 255, 0.72);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .page {
        width:
            min(100% - 30px, 1180px);
    }

    .hero h1 {
        letter-spacing: -3px;
    }

    .card-content {
        padding: 40px;
    }

}


/* =========================================================
   TELÉFONO
   ========================================================= */

@media (max-width: 700px) {

    .hero {
        min-height: 90vh;

        padding:
            70px 20px 40px;
    }

    .hero h1 {
        font-size:
            clamp(3.7rem, 18vw, 6rem);

        letter-spacing: -3px;
    }

    .hero p {
        font-size: 1rem;
    }


    .page {
        width:
            calc(100% - 24px);
    }


    .ministry-grid {
        grid-template-columns: 1fr;

        gap: 18px;

        margin-bottom: 18px;
    }


    .card,
    .ministry-grid .card {
        min-height: 430px;

        margin-bottom: 18px;

        border-radius: 22px;
    }


    .card-content,
    .ministry-grid .card-content {
        min-height: 430px;

        padding:
            30px 24px;
    }


    .card h2,
    .ministry-grid .card h2 {
        font-size:
            clamp(2.5rem, 13vw, 4rem);
    }


    .card p {
        font-size: 0.95rem;
    }


    /*
       En teléfono usamos gradiente vertical
       porque las tarjetas son angostas.
    */

    .card::after,
    .ministry-grid .card::after {
        background:
            linear-gradient(
                0deg,

                rgba(3, 6, 4, 0.95) 0%,

                rgba(3, 6, 4, 0.72) 43%,

                rgba(3, 6, 4, 0.22) 75%,

                rgba(3, 6, 4, 0.06) 100%
            );
    }


    /*
       SERVICIOS EN TELÉFONO
    */

    .card-image-servicios {
        object-position: 68% top;

        height: calc(100% + 20px);

        transform:
            translateX(20px)
            translateY(15px)
            scale(1.08);
    }

    .card:hover .card-image-servicios {
        transform:
            translateX(20px)
            translateY(15px)
            scale(1.13);
    }


    .cards {
        padding-bottom: 30px;
    }

}


/* =========================================================
   REDUCIR MOVIMIENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .card,
    .card-image,
    .card-action {
        transition: none;
    }

}