/*
Theme Name: SGEPI
Theme URI: http://sgepi.ib.itaborai.rj.gov.br
Author: Prefeitura de Itaboraí
Author URI: http://sgepi.ib.itaborai.rj.gov.br
Description: Tema esqueleto com Bootstrap 5, Chart.js e RemixIcon (via CDN).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
License: GPL-2.0-or-later
Text Domain: sgepi
*/


/******************************/
/*********** NAVBAR ***********/
/******************************/

.navbar {
    background-color: #07517B;
    padding: 0.75rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
}

.navbar img {
    width: 140px;
    height: auto;
}

@media (min-width: 768px) {
    .navbar {
        padding: 1.25rem 0;
    }

    .navbar img {
        width: 180px;
    }
}

@media (min-width: 992px) {
    .navbar {
        padding: 1.5rem 0;
    }

    .navbar img {
        width: 220px;
    }
}


/****************************/
/*********** HERO ***********/
/****************************/

.hero {
    background: url(img/bg-hero.jpg) no-repeat center;
    background-size: cover;
    min-height: 230px;
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
}

.hero .text-hero {
    color: #fff;
    font-size: 1rem;
    font-weight: 200;
    line-height: 1.3;
}

.hero .text-hero p {
    font-size: 1.55rem;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .hero .text-hero p {
        font-size: 2.3rem;
    }
}


/****************************/
/*********** INDEX **********/
/****************************/


.event-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Altura enxuta e proporcional para mobile e desktop */
.event-card-img-wrapper {
    position: relative;
    height: 130px;
    overflow: visible;
    /* Permite a badge se sobrepor levemente */
    background-color: #f5f5f5;
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
}

.event-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
}

/* Badge centralizada na parte inferior da imagem */
.event-status-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #212529;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
    white-space: nowrap;
}

.event-status-badge.status-abertas {
    background-color: #198754;
}

.event-status-badge.status-em-breve {
    background-color: #0d6efd;
}

.event-status-badge.status-encerrado {
    background-color: #dc3545;
}

.event-card-body {
    padding: 1.25rem 0.75rem 0.75rem;
}

/* Correção para limitação de linhas sem conflito com Flexbox */
.event-title {
    color: #0b4870;
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 1.3;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.event-title a {
    color: inherit;
    text-decoration: none;
}

.event-title a:hover {
    color: #083350;
}

.event-date {
    color: #6c757d;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Empty State */
.empty-events-box {
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.empty-events-icon {
    font-size: 2.5rem;
    color: #adb5bd;
    margin-bottom: 0.5rem;
    display: inline-block;
}



/****************************/
/********** FOOTER **********/
/****************************/

.footer {
    background-color: #07517B;
    padding: 2rem 0;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer img {
    width: 140px;
    height: auto;
    margin-right: 15px;
}

.footer .text-footer {
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
}

@media (min-width: 768px) {
    .footer {
        padding: 3.5rem 0;
    }

    .footer .container {
        flex-direction: row;
        gap: 0;
    }

    .footer img {
        width: auto;
    }

    .footer .text-footer {
        font-size: 18px;
        margin-left: 1rem;
        padding-left: 1rem;
        border-left: 1px solid #fff;
        line-height: 20px;
    }
}


/******************************/
/***** CARD SOBRE BANNER ******/
/******************************/

:root {
    --sgepi-brand: #07517B;
    --sgepi-radius: 1.25rem;
    --sgepi-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
    --sgepi-border: 1px solid rgba(7, 81, 123, 0.08);
}

.sgepi-evento-banner {
    line-height: 0;
}

#conteudo.sgepi-card-sobre-banner {
    background: #fff;
    border-top-left-radius: var(--sgepi-radius);
    border-top-right-radius: var(--sgepi-radius);
    border: var(--sgepi-border);
    border-bottom: none;
    position: relative;
    z-index: 2;
    margin-top: -320px;
    margin-bottom: 3rem;
    padding: 1.75rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06), var(--sgepi-shadow);
}

@media (min-width: 768px) {
    #conteudo.sgepi-card-sobre-banner {
        padding: 3rem;
    }
}

@media (max-width: 767.98px) {
    #conteudo.sgepi-card-sobre-banner {
        margin-top: -40px;
        border-top-left-radius: 0.75rem;
        border-top-right-radius: 0.75rem;
        padding: 1.25rem;
    }
}

/* Respiro interno e ritmo das seções */
#conteudo.sgepi-card-sobre-banner p {
    line-height: 1.7;
}

#conteudo.sgepi-card-sobre-banner dl.row {
    row-gap: 0.5rem;
    margin-top: 1.5rem;
}

#conteudo.sgepi-card-sobre-banner h2 {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(7, 81, 123, 0.12);
}

/* Cards-filho (categorias relacionadas) */
#conteudo.sgepi-card-sobre-banner .card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#conteudo.sgepi-card-sobre-banner .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}

#conteudo.sgepi-card-sobre-banner .card-title a {
    color: var(--sgepi-brand);
    text-decoration: none;
}

#conteudo.sgepi-card-sobre-banner .card-title a:hover {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    #conteudo.sgepi-card-sobre-banner .card {
        transition: none;
    }
}


/********************************************/
/**** BLOCO DE INFORMAÇÕES (sem_formulário) */
/********************************************/

.main-container {
    background-color: #ffffff;
    padding: 50px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a2c51;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 40px;
    max-width: 80%;
}

.info-block {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.col-12 .info-block {
    border-bottom: none;
}

.icon-container {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-right: 25px;
}

.icon-blue {
    background-color: #e6f0ff;
    color: #0d6efd;
}

.icon-green {
    background-color: #e6f5ea;
    color: #198754;
}

.label-text {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 3px;
}

.value-text {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a2c51;
}

@media (min-width: 768px) {
    .divider-col {
        border-right: 1px solid #e9ecef;
    }
}


/********************************************/
/********* CARD CATEGORIA RELACIONADA *******/
/********************************************/

.categoria-card {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 102px;

    padding: 18px 20px;

    background: #ffffff;

    border: 1px solid #e8edf3;
    border-radius: 14px;

    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.04),
        0 4px 12px rgba(15, 23, 42, 0.04);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;

    cursor: pointer;
}

.categoria-card:hover {
    transform: translateY(-2px);

    border-color: #d9e5f5;

    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.08),
        0 2px 6px rgba(15, 23, 42, 0.04);
}

.categoria-icon {
    flex: 0 0 60px;

    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 18px;

    background: #eaf3ff;

    border-radius: 50%;

    color: #0066d6;

    font-size: 31px;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.categoria-card:hover .categoria-icon {
    background: #dcecff;
    color: #0059b8;
}

.categoria-content {
    flex: 1;
    min-width: 0;
}

.categoria-title {
    margin: 0 0 5px;

    color: #0967cf;

    font-size: 17px;
    font-weight: 700;

    line-height: 1.2;
}

.categoria-description {
    margin: 0;

    color: #4b5563;

    font-size: 14px;
    font-weight: 400;

    line-height: 1.4;
}

.categoria-contagem {
    margin: 4px 0 0;

    color: #4b5563;

    font-size: 14px;
    font-weight: 400;

    line-height: 1.4;
}

.categoria-arrow {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-left: 16px;

    color: #0066d6;

    font-size: 27px;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.categoria-card:hover .categoria-arrow {
    transform: translateX(3px);
    color: #0059b8;
}

.categoria-card:focus-visible {
    outline: 3px solid rgba(0, 102, 214, 0.25);
    outline-offset: 3px;
}

@media (max-width: 576px) {
    .categoria-card {
        min-height: 88px;

        padding: 14px 15px;

        border-radius: 12px;
    }

    .categoria-icon {
        flex-basis: 50px;

        width: 50px;
        height: 50px;

        margin-right: 14px;

        font-size: 26px;
    }

    .categoria-title {
        font-size: 16px;
    }

    .categoria-description {
        font-size: 13px;
    }

    .categoria-arrow {
        margin-left: 10px;
        font-size: 24px;
    }
}


/********************************************/
/*********** FORMULÁRIOS SGEPI **************/
/********************************************/

.sgepi-form-page {
    margin-left: auto;
    margin-right: auto;
}

/* Cabeçalho da página */
.sgepi-form-page .page-header {
    text-align: center;
    padding: 1rem 0 2rem;
}

.sgepi-form-page .page-header h1 {
    color: var(--sgepi-brand);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.2;
}

.sgepi-form-page .page-header p {
    color: #4b5563;
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0.5rem auto 0;
}

/* Seção (card) */
.sgepi-form-page .card {
    border: 1px solid #e8edf3;
    border-radius: 14px;
    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.04),
        0 4px 12px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.sgepi-form-page .card-header {
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
    padding: 1.25rem 1.5rem;
}

.sgepi-form-page .card-header.sgepi-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sgepi-form-page .card-header.sgepi-section-header i {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #0066d6;
    background: #eaf3ff;
}

.sgepi-form-page .card-header h3 {
    margin: 0;
    color: #0967cf;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.sgepi-form-page .card-body {
    padding: 1.5rem;
}

/* Rótulos de campo */
.sgepi-form-page label:not(.form-check-label) {
    font-weight: 600;
    color: #1f2d3d;
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
}

/* Campos de texto */
.sgepi-form-page .form-control {
    border-radius: 10px;
    border-color: #d7dee8;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sgepi-form-page .form-control:focus {
    border-color: #0066d6;
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 214, 0.15);
}

/* Upload de arquivos */
.sgepi-form-page input[type="file"].form-control {
    padding: 0.5rem 0.75rem;
    background: #f8fbff;
    border-style: dashed;
    border-color: #b9d4f5;
}

.sgepi-form-page input[type="file"].form-control::file-selector-button {
    border: none;
    border-radius: 8px;
    background: #eaf3ff;
    color: #0066d6;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    margin-right: 0.75rem;
    cursor: pointer;
}

/* Texto de ajuda */
.sgepi-form-page .text-muted {
    font-size: 0.82rem;
}

/* Radios e checkboxes */
.sgepi-form-page .form-check-input:checked {
    background-color: var(--sgepi-brand);
    border-color: var(--sgepi-brand);
}

/* Botão de envio */
.sgepi-form-page .form-actions .btn-primary {
    background: var(--sgepi-brand);
    border-color: var(--sgepi-brand);
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 700;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sgepi-form-page .form-actions .btn-primary:hover {
    background: #053f5f;
    border-color: #053f5f;
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .sgepi-form-page .form-actions .btn-primary {
        transition: none;
    }
}