/* =========================================================
   IGREJA PENTECOSTAL PROVIDÊNCIA DIVINA
   Página pública de eventos
   ========================================================= */


/* =========================================================
   VARIÁVEIS
   ========================================================= */

:root {
    --events-green: #235c4a;
    --events-green-dark: #123c30;
    --events-green-deep: #082a21;
    --events-green-light: #6f9d8d;

    --events-white: #ffffff;
    --events-off-white: #f4f1e8;

    --events-text: #f7f8f5;
    --events-text-muted: rgba(255, 255, 255, 0.72);

    --events-border: rgba(255, 255, 255, 0.14);

    --events-glass:
        rgba(10, 48, 37, 0.58);

    --events-glass-light:
        rgba(255, 255, 255, 0.09);

    --events-shadow:
        0 25px 70px rgba(0, 0, 0, 0.24);

    --events-radius: 22px;
}


/* =========================================================
   PÁGINA
   ========================================================= */

.public-events-page {
    min-height: 100vh;

    margin: 0;

    overflow-x: hidden;

    background: #082a21;

    color: var(--events-text);

    font-family:
        "Inter",
        "Segoe UI",
        Arial,
        sans-serif;
}


/* =========================================================
   IMAGEM DE FUNDO

   COLOQUE SUA IMAGEM EM:

   static/img/fundo-eventos.jpg

   Como este CSS está em static/css/, usamos ../img/
   ========================================================= */

.public-events-background {
    position: fixed;

    inset: 0;

    z-index: 0;

    pointer-events: none;

    background-image:
        linear-gradient(
            135deg,
            rgba(4, 31, 24, 0.90),
            rgba(17, 65, 51, 0.78)
        ),
        url("../img/fundo-eventos.jpg");

    background-position: center;

    background-repeat: no-repeat;

    background-size: cover;
}


/*
   Segunda camada sobre a fotografia.
   Dá profundidade e melhora a leitura.
*/

.public-events-background::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(79, 148, 120, 0.18),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 70%,
            rgba(0, 0, 0, 0.28),
            transparent 40%
        ),
        linear-gradient(
            180deg,
            rgba(4, 28, 22, 0.10),
            rgba(4, 28, 22, 0.58)
        );
}


/*
   Pequena textura/escurecimento geral.
*/

.public-events-background::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(4, 25, 19, 0.06),
            rgba(4, 25, 19, 0.26)
        );
}


/* =========================================================
   ELEMENTOS ACIMA DO FUNDO
   ========================================================= */

.public-events-header,
.public-events-hero,
.public-events-shell,
.public-events-footer {
    position: relative;

    z-index: 1;
}


/* =========================================================
   HEADER
   ========================================================= */

.public-events-header {
    position: relative;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 2rem;

    width: min(1240px, calc(100% - 64px));

    margin: 0 auto;

    padding: 28px 0;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.10);
}


/* =========================================================
   LOGO
   ========================================================= */

.public-events-brand {
    display: inline-flex;

    align-items: center;

    flex-shrink: 0;

    text-decoration: none;
}


.public-events-brand img {
    display: block;

    width: min(250px, 55vw);

    max-height: 76px;

    object-fit: contain;

    object-position: left center;

    filter:
        drop-shadow(
            0 8px 18px
            rgba(0, 0, 0, 0.15)
        );
}


/* =========================================================
   NAVEGAÇÃO
   ========================================================= */

.public-events-nav {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 10px;
}


.public-events-nav a {
    position: relative;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 44px;

    padding: 0 20px;

    border:
        1px solid rgba(255, 255, 255, 0.18);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.07);

    color: #ffffff;

    font-size: 0.78rem;

    font-weight: 800;

    letter-spacing: 0.04em;

    text-decoration: none;

    backdrop-filter: blur(15px);

    -webkit-backdrop-filter: blur(15px);

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.public-events-nav a:hover {
    transform: translateY(-2px);

    border-color:
        rgba(255, 255, 255, 0.34);

    background:
        rgba(255, 255, 255, 0.14);

    box-shadow:
        0 12px 28px
        rgba(0, 0, 0, 0.16);
}


/*
   Área restrita recebe um pequeno destaque.
*/

.public-events-nav a:last-child {
    background: #ffffff;

    color: var(--events-green-dark);

    border-color: #ffffff;
}


.public-events-nav a:last-child:hover {
    background: #edf5f1;
}


/* =========================================================
   HERO
   ========================================================= */

.public-events-hero {
    width: min(1240px, calc(100% - 64px));

    margin: 0 auto;

    padding:
        clamp(75px, 10vw, 135px)
        0
        clamp(70px, 9vw, 115px);
}


/* =========================================================
   EYEBROW
   ========================================================= */

.public-events-eyebrow {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 18px;

    padding: 8px 14px;

    border:
        1px solid rgba(255, 255, 255, 0.18);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.07);

    color:
        rgba(255, 255, 255, 0.82);

    font-size: 0.68rem;

    font-weight: 900;

    letter-spacing: 0.16em;

    text-transform: uppercase;

    backdrop-filter: blur(12px);

    -webkit-backdrop-filter: blur(12px);
}


.public-events-eyebrow::before {
    content: "";

    width: 6px;

    height: 6px;

    border-radius: 50%;

    background: #a8cdbd;

    box-shadow:
        0 0 0 5px
        rgba(168, 205, 189, 0.10);
}


/* =========================================================
   TÍTULO PRINCIPAL
   ========================================================= */

.public-events-hero h1 {
    max-width: 920px;

    margin: 0;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            3.1rem,
            7vw,
            6.7rem
        );

    font-weight: 400;

    line-height: 0.92;

    letter-spacing: -0.055em;

    text-wrap: balance;

    text-shadow:
        0 8px 35px
        rgba(0, 0, 0, 0.22);
}


.public-events-hero > p {
    max-width: 660px;

    margin: 28px 0 0;

    color:
        rgba(255, 255, 255, 0.72);

    font-size:
        clamp(
            1rem,
            1.8vw,
            1.16rem
        );

    line-height: 1.8;
}


/* =========================================================
   RESUMO
   ========================================================= */

.public-events-summary {
    display: flex;

    flex-wrap: wrap;

    gap: 14px;

    margin-top: 38px;
}


.public-events-summary div {
    min-width: 185px;

    padding: 20px 24px;

    border:
        1px solid rgba(255, 255, 255, 0.14);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.08);

    box-shadow:
        0 18px 45px
        rgba(0, 0, 0, 0.12);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease;
}


.public-events-summary div:hover {
    transform: translateY(-3px);

    background:
        rgba(255, 255, 255, 0.12);

    border-color:
        rgba(255, 255, 255, 0.24);
}


.public-events-summary strong {
    display: block;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 2.3rem;

    font-weight: 400;

    line-height: 1;
}


.public-events-summary span {
    display: block;

    margin-top: 7px;

    color:
        rgba(255, 255, 255, 0.62);

    font-size: 0.78rem;

    font-weight: 700;

    letter-spacing: 0.03em;
}


/* =========================================================
   CONTAINER DOS EVENTOS
   ========================================================= */

.public-events-shell {
    width: min(1240px, calc(100% - 64px));

    margin:
        0 auto
        clamp(70px, 10vw, 130px);
}


/* =========================================================
   CABEÇALHO DA SEÇÃO
   ========================================================= */

.public-events-section-heading {
    margin-bottom: 32px;
}


.public-events-section-heading h2 {
    margin: 0;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            2.2rem,
            4vw,
            3.8rem
        );

    font-weight: 400;

    letter-spacing: -0.035em;
}


/* =========================================================
   LISTA DE CONGREGAÇÕES
   ========================================================= */

.public-congregation-list {
    display: grid;

    gap: 28px;
}


/* =========================================================
   CARD DA CONGREGAÇÃO
   ========================================================= */

.public-congregation-card {
    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, 0.13);

    border-radius: var(--events-radius);

    background:
        rgba(7, 40, 31, 0.62);

    box-shadow:
        var(--events-shadow);

    backdrop-filter: blur(22px);

    -webkit-backdrop-filter: blur(22px);
}


/* =========================================================
   CABEÇALHO DA CONGREGAÇÃO
   ========================================================= */

.public-congregation-header {
    position: relative;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 30px;

    padding: 27px 30px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.10);

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.09),
            rgba(255, 255, 255, 0.025)
        );
}


.public-congregation-header::before {
    content: "";

    position: absolute;

    left: 30px;

    top: 0;

    width: 65px;

    height: 3px;

    background: #89b5a3;
}


.public-congregation-header span {
    color:
        rgba(255, 255, 255, 0.52);

    font-size: 0.67rem;

    font-weight: 900;

    letter-spacing: 0.15em;

    text-transform: uppercase;
}


.public-congregation-header h3 {
    margin: 6px 0 0;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            1.65rem,
            3vw,
            2.35rem
        );

    font-weight: 400;

    letter-spacing: -0.025em;
}


.public-congregation-header p {
    margin: 0;

    color:
        rgba(255, 255, 255, 0.62);

    font-size: 0.82rem;

    font-weight: 700;

    text-align: right;
}


/* =========================================================
   GRID DOS EVENTOS
   ========================================================= */

.public-event-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                min(100%, 340px),
                1fr
            )
        );

    gap: 18px;

    padding: 22px;
}


/* =========================================================
   CARD INDIVIDUAL DO EVENTO
   ========================================================= */

.public-event-card {
    position: relative;

    display: grid;

    grid-template-columns:
        76px
        minmax(0, 1fr);

    gap: 18px;

    min-width: 0;

    padding: 20px;

    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, 0.11);

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.105),
            rgba(255, 255, 255, 0.045)
        );

    box-shadow:
        0 15px 35px
        rgba(0, 0, 0, 0.12);

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease;
}


.public-event-card::after {
    content: "";

    position: absolute;

    right: -50px;

    bottom: -70px;

    width: 150px;

    height: 150px;

    border-radius: 50%;

    background:
        rgba(105, 163, 138, 0.08);

    pointer-events: none;
}


.public-event-card:hover {
    transform: translateY(-4px);

    border-color:
        rgba(255, 255, 255, 0.22);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.14),
            rgba(255, 255, 255, 0.06)
        );

    box-shadow:
        0 22px 48px
        rgba(0, 0, 0, 0.18);
}


/* =========================================================
   DATA DO EVENTO
   ========================================================= */

.public-event-date {
    position: relative;

    z-index: 1;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    align-self: start;

    width: 76px;

    min-height: 82px;

    border:
        1px solid rgba(255, 255, 255, 0.15);

    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            #397b65,
            #1c5846
        );

    color: #ffffff;

    box-shadow:
        0 12px 28px
        rgba(0, 0, 0, 0.20);
}


.public-event-date strong {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 2rem;

    font-weight: 400;

    line-height: 0.95;
}


.public-event-date span {
    margin-top: 6px;

    font-size: 0.66rem;

    font-weight: 900;

    letter-spacing: 0.13em;

    text-transform: uppercase;
}


/* =========================================================
   CONTEÚDO DO EVENTO
   ========================================================= */

.public-event-content {
    position: relative;

    z-index: 1;

    min-width: 0;
}


.public-event-time {
    display: inline-flex;

    align-items: center;

    margin-bottom: 7px;

    color: #a9cfbf;

    font-size: 0.75rem;

    font-weight: 900;

    letter-spacing: 0.07em;

    text-transform: uppercase;
}


.public-event-time::before {
    content: "";

    width: 5px;

    height: 5px;

    margin-right: 7px;

    border-radius: 50%;

    background: #8fc0ab;
}


.public-event-content h4 {
    margin: 0;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.38rem;

    font-weight: 400;

    line-height: 1.2;
}


.public-event-content > p {
    margin: 11px 0 0;

    color:
        rgba(255, 255, 255, 0.60);

    font-size: 0.88rem;

    line-height: 1.65;

    overflow-wrap: anywhere;
}


/* =========================================================
   INFORMAÇÕES ADICIONAIS
   ========================================================= */

.public-event-content dl {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(110px, 1fr)
        );

    gap: 14px;

    margin: 18px 0 0;

    padding-top: 15px;

    border-top:
        1px solid rgba(255, 255, 255, 0.09);
}


.public-event-content dl > div {
    min-width: 0;
}


.public-event-content dt {
    color:
        rgba(255, 255, 255, 0.38);

    font-size: 0.61rem;

    font-weight: 900;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}


.public-event-content dd {
    margin: 5px 0 0;

    color:
        rgba(255, 255, 255, 0.82);

    font-size: 0.82rem;

    font-weight: 700;

    line-height: 1.4;

    overflow-wrap: anywhere;
}


/* =========================================================
   SEM EVENTOS
   ========================================================= */

.public-events-empty {
    position: relative;

    overflow: hidden;

    padding:
        clamp(
            45px,
            8vw,
            80px
        )
        30px;

    border:
        1px solid rgba(255, 255, 255, 0.14);

    border-radius: var(--events-radius);

    background:
        rgba(7, 40, 31, 0.58);

    box-shadow:
        var(--events-shadow);

    text-align: center;

    backdrop-filter: blur(20px);

    -webkit-backdrop-filter: blur(20px);
}


.public-events-empty::before {
    content: "";

    display: block;

    width: 42px;

    height: 2px;

    margin:
        0 auto
        22px;

    background: #88b4a2;
}


.public-events-empty h3 {
    margin: 0;

    color: #ffffff;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            1.8rem,
            4vw,
            2.8rem
        );

    font-weight: 400;
}


.public-events-empty p {
    max-width: 520px;

    margin:
        14px auto
        0;

    color:
        rgba(255, 255, 255, 0.58);

    line-height: 1.7;
}


/* =========================================================
   RODAPÉ
   ========================================================= */

.public-events-footer {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    justify-content: center;

    gap: 8px;

    width: min(1240px, calc(100% - 64px));

    margin: 0 auto;

    padding: 30px 0 38px;

    border-top:
        1px solid rgba(255, 255, 255, 0.10);

    color:
        rgba(255, 255, 255, 0.44);

    font-size: 0.75rem;
}


.public-events-footer strong {
    color:
        rgba(255, 255, 255, 0.70);
}


/* =========================================================
   RESPONSIVIDADE — NOTEBOOK
   ========================================================= */

@media (max-width: 1100px) {

    .public-events-header,
    .public-events-hero,
    .public-events-shell,
    .public-events-footer {
        width:
            min(
                100% - 44px,
                1240px
            );
    }


    .public-events-hero {
        padding-top: 90px;
    }

}


/* =========================================================
   RESPONSIVIDADE — TABLET
   ========================================================= */

@media (max-width: 820px) {

    .public-events-header {
        padding: 22px 0;
    }


    .public-events-brand img {
        width: min(205px, 48vw);
    }


    .public-events-nav a {
        min-height: 42px;

        padding:
            0
            15px;

        font-size: 0.72rem;
    }


    .public-events-hero {
        padding:
            75px
            0
            70px;
    }


    .public-congregation-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 12px;
    }


    .public-congregation-header p {
        text-align: left;
    }


    .public-event-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   RESPONSIVIDADE — CELULAR
   ========================================================= */

@media (max-width: 600px) {

    .public-events-header,
    .public-events-hero,
    .public-events-shell,
    .public-events-footer {
        width:
            calc(100% - 30px);
    }


    /* -------------------------
       HEADER
       ------------------------- */

    .public-events-header {
        align-items: center;

        flex-direction: column;

        gap: 18px;

        padding:
            20px
            0;
    }


    .public-events-brand {
        justify-content: center;

        width: 100%;
    }


    .public-events-brand img {
        width:
            min(
                220px,
                72vw
            );

        max-height: 68px;

        object-position: center;
    }


    .public-events-nav {
        justify-content: center;

        width: 100%;

        gap: 8px;
    }


    .public-events-nav a {
        flex:
            1
            1
            calc(50% - 8px);

        min-width: 0;

        padding:
            0
            12px;

        white-space: nowrap;
    }


    /* -------------------------
       HERO
       ------------------------- */

    .public-events-hero {
        padding:
            58px
            0
            60px;

        text-align: center;
    }


    .public-events-eyebrow {
        margin-inline: auto;
    }


    .public-events-hero h1 {
        margin-inline: auto;

        font-size:
            clamp(
                2.75rem,
                14vw,
                4.2rem
            );

        line-height: 0.96;
    }


    .public-events-hero > p {
        margin:
            22px auto
            0;

        font-size: 0.94rem;

        line-height: 1.7;
    }


    /* -------------------------
       RESUMO
       ------------------------- */

    .public-events-summary {
        display: grid;

        grid-template-columns:
            repeat(2, 1fr);

        gap: 10px;

        margin-top: 30px;

        text-align: left;
    }


    .public-events-summary div {
        min-width: 0;

        padding: 17px;
    }


    .public-events-summary strong {
        font-size: 2rem;
    }


    .public-events-summary span {
        font-size: 0.68rem;
    }


    /* -------------------------
       SEÇÃO
       ------------------------- */

    .public-events-section-heading {
        margin-bottom: 24px;

        text-align: center;
    }


    .public-events-section-heading h2 {
        font-size: 2.35rem;
    }


    /* -------------------------
       CONGREGAÇÃO
       ------------------------- */

    .public-congregation-card {
        border-radius: 18px;
    }


    .public-congregation-header {
        padding:
            24px
            20px;
    }


    .public-congregation-header::before {
        left: 20px;
    }


    .public-congregation-header h3 {
        font-size: 1.75rem;
    }


    /* -------------------------
       EVENTOS
       ------------------------- */

    .public-event-grid {
        gap: 13px;

        padding: 14px;
    }


    .public-event-card {
        grid-template-columns:
            64px
            minmax(0, 1fr);

        gap: 14px;

        padding: 16px;

        border-radius: 15px;
    }


    .public-event-date {
        width: 64px;

        min-height: 72px;

        border-radius: 12px;
    }


    .public-event-date strong {
        font-size: 1.65rem;
    }


    .public-event-date span {
        font-size: 0.58rem;
    }


    .public-event-content h4 {
        font-size: 1.2rem;
    }


    .public-event-content > p {
        font-size: 0.82rem;
    }


    .public-event-content dl {
        grid-template-columns: 1fr;

        gap: 10px;
    }


    /* -------------------------
       FOOTER
       ------------------------- */

    .public-events-footer {
        text-align: center;
    }

}


/* =========================================================
   RESPONSIVIDADE — CELULARES PEQUENOS
   ========================================================= */

@media (max-width: 390px) {

    .public-events-header,
    .public-events-hero,
    .public-events-shell,
    .public-events-footer {
        width:
            calc(100% - 24px);
    }


    .public-events-nav {
        flex-direction: column;
    }


    .public-events-nav a {
        width: 100%;

        flex: none;
    }


    .public-events-hero h1 {
        font-size: 2.65rem;
    }


    .public-events-summary {
        grid-template-columns: 1fr;
    }


    .public-event-card {
        grid-template-columns: 1fr;
    }


    .public-event-date {
        width: 68px;
    }

}


/* =========================================================
   ACESSIBILIDADE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration:
            0.01ms !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;
    }

}


/* =========================================================
   ANIMAÇÕES CONTROLADAS PELO JAVASCRIPT
   ========================================================= */

.events-reveal {
    opacity: 0;

    transform:
        translateY(30px)
        scale(0.985);

    transition:
        opacity 0.8s ease var(--reveal-delay, 0ms),
        transform 0.8s cubic-bezier(.2, .7, .2, 1)
            var(--reveal-delay, 0ms);

    will-change:
        opacity,
        transform;
}


.events-reveal.events-visible {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   HEADER DURANTE O SCROLL
   ========================================================= */

.public-events-header {
    transition:
        background 0.35s ease,
        backdrop-filter 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}


.public-events-header.events-header-scrolled {
    background:
        rgba(5, 38, 29, 0.60);

    border-color:
        rgba(255, 255, 255, 0.15);

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.12);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);
}


/* =========================================================
   MELHORA A RENDERIZAÇÃO DO FUNDO
   ========================================================= */

.public-events-background {
    will-change: transform;

    transition:
        transform 0.08s linear;
}


/* =========================================================
   CARDS COM MOVIMENTO 3D
   ========================================================= */

.public-event-card {
    transform-style: preserve-3d;

    transform-origin: center;

    will-change: transform;
}


/* =========================================================
   ACESSIBILIDADE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .events-reveal {
        opacity: 1 !important;

        transform: none !important;

        transition: none !important;
    }


    .public-events-background {
        transform: none !important;

        transition: none !important;
    }


    .public-event-card {
        transform: none !important;

        transition: none !important;
    }

}