/* ==========================================================================
   VARIÁVEIS GLOBAIS
   ========================================================================== */
:root {
    --background-primary: #fffafa;
    --background-secondary: #ffffff;
    --backgroundontrast: #bebebe;
    --font-family: Arial, sans-serif;
    --text-color: #000000;
    --mtext-color: #808080;
    --footer-bg: #222;
    --button-bg-hover: #000000;
    --button-text-hover: #ffffff;
    --box-shadow: 0 0px 10px #00000060;
}

/* ==========================================================================
   RESET BÁSICO
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* ==========================================================================
   ELEMENTOS UTILITÁRIOS
   ========================================================================== */
span.underlinespan {
    display: inline;
    text-decoration: underline;
}

span.hrsspan {
    display: block;
    width: 30%;
    height: 2px;
    margin: 5px auto;
    background-color: var(--background-primary);
    border-radius: 50px;
}

span.mtext {
    color: var(--mtext-color);
    font-size: 13px;
}

span.metext {
    font-size: 16px;
}

span.fullstrong {
    font-weight: bolder;
}

span.godown {
    color: var(--background-primary);
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 25px;
}

span.goup {
    color: var(--background-primary);
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 25px;
}

span.goright {
    color: var(--background-primary);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 50px;
    font-size: 25px;
}

span.goleft {
    color: var(--background-primary);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 50px;
    font-size: 25px;
}

/* ==========================================================================
   LAYOUT GERAL
   ========================================================================== */
html,
body {
    height: 100%;
    background-color: var(--background-primary);
    font-family: var(--font-family);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    background-color: var(--background-primary);
    color: var(--text-color);
    padding: 20px;
    min-height: 95px;
    max-height: 95px;
    gap: 100px;
}

header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

header div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header img {
    height: 40px;
    width: 100px;
    object-fit: cover;
    filter: invert(1) grayscale(1);
}

/* ==========================================================================
   HEADER - NAVEGAÇÃO
   ========================================================================== */
header nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

header nav#s-nav {
    display: none;
}

header nav a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.5s;
    text-align: center;
}

/* Efeito de sublinhado */
header nav a span::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -3px;
    width: 0%;
    height: 2px;
    background: var(--text-color);
    border-radius: 25px;
    transform: translateX(-50%);
    transition: all 0.5s ease;
}

/* Ícones */
header nav a ion-icon {
    transition: transform 0.5s;
}

header nav#s-nav ion-icon.s-nav-chevron {
    transform: rotate(90deg);
    cursor: pointer;
    transition: all 0.5s;
}

header nav#s-nav ion-icon.on {
    transform: rotate(630deg);
}

/* ==========================================================================
   HEADER - DROPDOWN
   ========================================================================== */
.dropdown {
    position: absolute;
    top: 40px;
    left: 0;
    display: none;
    opacity: 0;
    transform: translateY(-20px);
    flex-direction: column;
    background: var(--background-primary);
    padding: 10px;
    min-width: 150px;
    border-radius: 0 0 10px 10px;
    pointer-events: none;
    transition: all 0.5s;
    z-index: 1001;
}

.dropdown a {
    display: block;
    padding: 8px 12px;
    font-weight: bold;
    text-align: left;
    line-height: 20px;
    color: inherit;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    display: flex;
    flex-direction: column;
    background: var(--footer-bg);
    color: white;
    padding: 50px;
    gap: 100px;
    flex-shrink: 0;
    white-space: nowrap;
}

#footer-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 100px;
    white-space: nowrap;
    background: var(--footer-bg);
}

#footer-content div {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 25px;
}

footer div span {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 10px;
}

footer div#copyr {
    align-self: center;
    text-align: center;
}

/* ==========================================================================
   MAIN
   ========================================================================== */
main {
    flex: 1 1 auto;
    padding: 20px;
}

main section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: calc(100vh - 95px);
    overflow: hidden;
}

/* ==========================================================================
   QUEM SOMOS INÍCIO - SECTION
   ========================================================================== */
#quemsomos-section-inicio {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#quemsomos-section-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 100px;
}

#quemsomos-section-text {
    display: flex;
    flex-direction: column;
    max-width: 550px;
}

#quemsomos-section-text h3 {
    margin-bottom: 15px;
    font-weight: normal;
}

#quemsomos-section-text h1 {
    margin-bottom: 25px;
    font-size: 50px;
}

#quemsomos-section-embeds img {
    width: 600px;
    height: 450px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: var(--box-shadow);
}

/* ==========================================================================
   MENU LATERAL (Mobile)
   ========================================================================== */
#main-menu {
    position: fixed;
    top: 95px;
    right: 0;
    width: 80%;
    height: calc(100vh - 95px);
    background-color: var(--background-primary);
    padding: 20px 50px 20px 20px;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 25px;
    font-size: large;
    font-weight: bold;
    text-align: right;
    overflow-y: auto;
    z-index: 999;
    transition: all 0.5s;
}

#main-menu ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0 20px 0 0;
    gap: 15px;
    font-weight: normal;
}

#main-menu.on {
    display: flex;
}

/* ==========================================================================
   GRADE DE MINISTÉRIOS & SECTION DE MINISTÉRIOS
   ========================================================================== */
#ministerios-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ministerios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.ministerio-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    background: var(--background-secondary);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    gap: 10px;
    transition: transform 0.3s ease;
}

.ministerio-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
}

.ministerio-card h3 {
    font-size: 1.25rem;
}

.ministerio-card p {
    color: #444;
}

.ministerio-card a {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.ministerio-card a button {
    background-color: transparent;
    color: var(--text-color);
    width: 50%;
    padding: 10px 20px;
    border: 2px solid var(--text-color);
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.5s;
}

#ministerios-section-inicio-text {
    margin-bottom: 20px;
    text-align: center;
}

/* ==========================================================================
   GRADE DE REDES SOCIAIS & SECTION DE REDES SOCIAIS
   ========================================================================== */
#redessociais-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.redessociais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.redessociais-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    background: var(--background-secondary);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    gap: 10px;
    transition: transform 0.3s ease;
}

.redessociais-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
}

.redessociais-card h3 {
    font-size: 1.25rem;
}

.redessociais-card p {
    color: #444;
}

.redessociais-card a {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.redessociais-card a button {
    background-color: transparent;
    color: var(--text-color);
    width: 50%;
    padding: 10px 20px;
    border: 2px solid var(--text-color);
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.5s;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
    header nav a:hover {
        transform: translateY(-2px);
    }

    header nav a:hover ion-icon {
        transform: rotate(540deg);
    }

    header nav a:hover span::after {
        width: 100%;
    }

    .ministerios-grid:hover:has(.ministerio-card:hover) .ministerio-card {
        transform: scale(0.9);
        filter: grayscale(1) blur(2px);
    }

    .ministerio-card:hover {
        transform: translateY(-5px) scale(1.05) !important;
        filter: grayscale(0) blur(0px) !important;
    }

    .ministerio-card a button:hover {
        background-color: var(--button-bg-hover);
        color: var(--button-text-hover);
        width: 100%;
    }

    .redessociais-grid:hover:has(.redessociais-card:hover) .redessociais-card {
        transform: scale(0.9);
        filter: grayscale(1) blur(2px);
    }

    .redessociais-card:hover {
        transform: translateY(-5px) scale(1.05) !important;
        filter: grayscale(0) blur(0px) !important;
    }

    .redessociais-card a button:hover {
        background-color: var(--button-bg-hover);
        color: var(--button-text-hover);
        width: 100%;
    }
}


@media (max-width: 768px) {
    #iconsdiv {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding: 0 10px;
    }

    header nav#b-nav {
        display: none;
    }

    header nav#s-nav {
        display: flex;
    }

    footer {
        white-space: normal;
    }

    #footer-content {
        flex-direction: column;
        align-items: center;
        white-space: normal;
    }

    footer div#copyr {
        white-space: normal;
        text-align: center;
    }

    #quemsomos-section-inicio {
        flex-direction: column;
    }

    #quemsomos-section-content {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    #quemsomos-section-text h1 {
        font-size: 30px;
    }

    #quemsomos-section-embeds img {
        width: 100%;
    }

    .ministerios-grid {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: 277px;
        gap: 20px;
        padding: 10px;
        overflow-x: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .ministerio-card {
        padding: 15px;
    }


    .ministerio-card img {
        height: 160px;
    }

    .ministerio-card h3 {
        font-size: 1.1rem;
    }

    .ministerio-card p {
        font-size: 0.95rem;
    }

    .ministerio-card button {
        font-size: 0.95rem;
        padding: 8px 16px;
    }

    #ministerios-section-inicio-text {
        margin: 0;
    }

    .redessociais-grid {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: 277px;
        gap: 20px;
        padding: 10px;
        overflow-x: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .redessociais-card {
        padding: 15px;
    }

    .redessociais-card img {
        height: 160px;
    }

    .redessociais-card h3 {
        font-size: 1.1rem;
    }

    .redessociais-card p {
        font-size: 0.95rem;
    }

    .redessociais-card button {
        font-size: 0.95rem;
        padding: 8px 16px;
    }

    span.mtext {
        font-size: 10px;
    }
}