* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, li, ol {
    list-style: none;
}

:root {
    --main-color: #f5f3ee;
    --secondary-color: #1E3A5F;
    --tertiary-color: #C9A227;
    --dark-blue: #162B44;
    --text-dark: #1a1a2e;
    --text-light: #f5f3ee;
    --shadow: 0 4px 24px rgba(30, 58, 95, 0.13);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background-color: var(--main-color);
    display: flex;
    flex-direction: column;
    font-family: "Lato", sans-serif;
    color: var(--text-dark);
}

/* ===== HEADER ===== */
header {
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    height: 90px;
    border-bottom: 3px solid var(--tertiary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

header img {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 2px solid var(--tertiary-color);
    object-fit: cover;
}

header .title {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--main-color);
}

header .title h1 {
    font-family: "Playfair Display", serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

header nav.links {
    display: flex;
    align-items: center;
    gap: 4px;
}

header nav.links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--main-color);
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.25s, color 0.25s;
    letter-spacing: 0.03em;
}

header nav.links a:hover,
header nav.links a.active {
    background-color: var(--tertiary-color);
    color: var(--dark-blue);
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background-color: var(--main-color);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== MAIN ===== */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    color: var(--main-color);
    border-top: 4px solid var(--tertiary-color);
}

footer img {
    width: 18px;
    height: 18px;
    margin-right: 7px;
    flex-shrink: 0;
}

footer #contato {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 24px 20px 18px;
    gap: 6px;
}

footer #contato h2 {
    font-family: "Playfair Display", serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--tertiary-color);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

footer #contato p {
    font-size: 14.5px;
    display: flex;
    align-items: center;
}

footer #contato .data {
    display: flex;
    gap: 40px;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

footer #contatos,
footer #local {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

footer #local .cep {
    padding-left: 25px;
}

footer .social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(201,162,39,0.3);
    padding: 14px 0 10px;
}

footer .social .media {
    display: flex;
    gap: 18px;
}

footer .social .media a {
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
}

footer .social .media a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

footer .social .media img {
    width: 26px;
    height: 26px;
    margin: 0;
}

footer .social .copyright {
    font-size: 12.5px;
    opacity: 0.6;
    letter-spacing: 0.03em;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ===== CARD ANIMATIONS ===== */
.horario-card,
.preview-card,
.comunidade-card,
.pastoral-card,
.evento-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.horario-card.visible,
.preview-card.visible,
.comunidade-card.visible,
.pastoral-card.visible,
.evento-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== iPad Mini (≤ 768px) ===== */
@media (max-width: 768px) {
    header {
        padding: 0 24px;
        height: 72px;
    }

    header .title h1 {
        font-size: 16px;
    }

    header img {
        width: 50px;
        height: 50px;
    }

    .hamburger {
        display: flex;
    }

    header nav.links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background-color: var(--dark-blue);
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0;
        box-shadow: 0 8px 20px rgba(0,0,0,0.25);
        border-bottom: 3px solid var(--tertiary-color);
        z-index: 99;
    }

    header nav.links.open {
        display: flex;
    }

    header nav.links a {
        padding: 14px 24px;
        border-radius: 0;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }

    /* Footer iPad Mini */
    footer #contato {
        padding: 20px 24px 16px;
    }

    footer #contato h2 {
        font-size: 16px;
        text-align: center;
    }

    footer #contato .data {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    footer #contatos,
    footer #local {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    footer #contato p {
        font-size: 13.5px;
        justify-content: center;
    }

    footer .social {
        padding: 12px 0 10px;
        gap: 8px;
    }

    footer .social .copyright {
        font-size: 11.5px;
        text-align: center;
        padding: 0 16px;
    }
}

/* ===== iPhone SE (≤ 375px) ===== */
@media (max-width: 375px) {
    header {
        padding: 0 14px;
        height: 64px;
    }

    header .title h1 {
        font-size: 13px;
        line-height: 1.3;
    }

    header img {
        width: 42px;
        height: 42px;
    }

    header nav.links {
        top: 64px;
    }

    header nav.links a {
        padding: 13px 18px;
        font-size: 15px;
    }

    /* Footer iPhone SE */
    footer #contato {
        padding: 16px 14px 12px;
    }

    footer #contato h2 {
        font-size: 14px;
    }

    footer #contato p {
        font-size: 12.5px;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 4px;
    }

    footer #contato p img {
        flex-shrink: 0;
    }

    footer #contatos,
    footer #local {
        gap: 8px;
        width: 100%;
    }

    footer .social .media img {
        width: 22px;
        height: 22px;
    }

    footer .social .copyright {
        font-size: 11px;
        padding: 0 12px;
    }
}
