/* ================================================================
   CUSTOM STYLES - Tailwind CSS Complements
   ================================================================ */

:root {
    /* Cores institucionais — verde governamental */
    --ink:          #0d1f12;          /* verde-escuro quase preto */
    --muted:        #4a6b52;          /* verde-acinzentado */
    --line:         #d0e0d4;
    --paper:        #ffffff;
    --soft:         #f0f0f0;
    --primary:      #0a6640;          /* verde institucional profundo */
    --primary-dark: #064d2e;
    --accent:       #c8960a;          /* dourado governamental */
    --gold:         #e8ae1a;
    --shadow:       0 18px 45px rgba(6, 77, 46, 0.16);
}

/* ================================================================
   ANIMAÇÕES
   ================================================================ */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* ================================================================
   REVEAL ANIMATION
   ================================================================ */
.reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.75s ease, transform 0.75s ease;
    transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible,
.reveal.is-visible {
    animation-duration: 0.7s;
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
    animation-fill-mode: both;
}

.animate-slide-left.is-visible { animation-name: slideLeftIn; }
.animate-slide-right.is-visible { animation-name: slideRightIn; }
.animate-slide-up.is-visible { animation-name: slideUpIn; }
.animate-slide-down.is-visible { animation-name: slideDownIn; }
.animate-zoom-in.is-visible { animation-name: zoomInSoft; }
.animate-zoom-in-up.is-visible { animation-name: zoomInUp; }
.animate-zoom-in-down.is-visible { animation-name: zoomInDown; }
.animate-wobble.is-visible { animation-name: wobbleIn; }
.animate-swing.is-visible { animation-name: swingIn; transform-origin: top center; }
.animate-pulse.is-visible { animation-name: pulseIn; }
.animate-rubber-band.is-visible { animation-name: rubberBandIn; }
.reveal.is-visible:not(.animate-on-scroll) { animation-name: slideUpIn; }

@keyframes slideLeftIn {
    from { opacity: 0; transform: translateX(-46px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideRightIn {
    from { opacity: 0; transform: translateX(46px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUpIn {
    from { opacity: 0; transform: translateY(42px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDownIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomInSoft {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes zoomInUp {
    from { opacity: 0; transform: translateY(38px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes zoomInDown {
    from { opacity: 0; transform: translateY(-18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wobbleIn {
    from { opacity: 0; transform: translateY(36px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes swingIn {
    from { opacity: 0; transform: translateX(46px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes rubberBandIn {
    from { opacity: 0; transform: translateY(34px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}

/* ================================================================
   LIGHTBOX
   ================================================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.is-active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: transform 0.2s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-close i {
    width: 24px;
    height: 24px;
}

.lightbox-img-container {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
}

.lightbox-img {
    cursor: zoom-in;
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.lightbox-img:hover {
    transform: scale(1.02);
}

/* ================================================================
   LOAD ANIMATION
   ================================================================ */
body {
    opacity: 0;
    transition: opacity 0.7s ease;
}

body.site-loaded {
    opacity: 1;
}

/* ================================================================
   EYEBROW — rótulo institucional
   ================================================================ */
.eyebrow {
    margin: 0;
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ================================================================
   HERO SEÇÃO
   ================================================================ */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 78vh;
    padding: 96px clamp(18px, 5vw, 80px) 60px;
    color: #fff;
    display: grid;
    place-items: center;
}

.hero-slider {
    position: absolute;
    inset: 0;
}

.hero-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-slider img.is-active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.65) 50%,
        rgba(0, 0, 0, 0.38) 100%
    );
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
    z-index: 3;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
    gap: 40px;
    align-items: center;
    max-width: 1180px;
    width: 100%;
}

.hero-content h1 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.4rem, 5.5vw, 4.4rem);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hero-content h1::after {
    content: '';
    display: block;
    width: 64px;
    height: 4px;
    background: var(--accent);
    margin-top: 16px;
    border-radius: 2px;
}

.hero-content p {
    max-width: 560px;
    margin: 18px 0 0;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.88);
}

/* Card do Presidente */
.president-card {
    overflow: hidden;
    align-self: center;
    max-width: 340px;
    margin-left: auto;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.97);
    border-top: 4px solid var(--accent);
    border-radius: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateX(34px);
    animation: cardEnter 0.9s ease forwards 0.35s;
}

@keyframes cardEnter {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.president-card img {
    display: block;
    width: 100%;
    height: auto;
    background: var(--soft);
    object-fit: contain;
    object-position: center top;
}

.president-message {
    padding: 18px 20px;
}

.president-message .eyebrow {
    margin-bottom: 10px;
}

.president-message blockquote {
    display: -webkit-box;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

.president-message strong,
.president-message span {
    display: block;
}

.president-message strong {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
}

.president-message span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ================================================================
   LIMITAR TÍTULOS DOS SERVIÇOS E PROJETOS
   ================================================================ */
#servicos h3,
#projetos h3,
#noticias h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
}

@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .president-card {
        max-width: 100%;
        margin-left: 0;
    }
}

/* ================================================================
   AJUSTES DE ESPAÇAMENTO
   ================================================================ */
/* Reduzir espaçamento inferior nas seções e no footer */
section.py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Reduzir espaçamento inferior dos títulos das seções */
section .text-center.mb-16 {
    margin-bottom: 2rem !important;
}

/* Ajustes no footer */
.site-footer {
    padding-top: 2.5rem !important;
    padding-bottom: 2rem !important;
}

.site-footer .footer-grid {
    gap: 2rem !important;
    row-gap: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

/* Reduzir espaçamento da seção de ligações úteis no footer */
.site-footer h3 {
    margin-bottom: 1.25rem !important;
}

.site-footer .footer-brand strong {
    margin-bottom: 0.75rem !important;
    display: block;
}

.site-footer .footer-brand p {
    margin-bottom: 1rem !important;
}

.site-footer ul {
    gap: 0.75rem !important;
}

.site-footer ul li {
    margin-bottom: 0.5rem !important;
}

.site-footer .footer-grid > div:nth-child(2) a {
    display: block;
    min-height: 0;
    min-width: 0;
    line-height: 1.2;
    padding: 0;
}

/* Reduzir espaçamento inferior das grids de cards */
section .grid.mb-10 {
    margin-bottom: 1.5rem !important;
}

/* AJUSTES ADICIONAIS NO FOOTER */
.site-footer .footer-grid > div:nth-child(2) {
    /* Ligações úteis - reduzir espaçamento inferior */
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.site-footer .footer-grid > div:nth-child(2) ul {
    margin-bottom: 0 !important;
    gap: 0.75rem !important;
}

.site-footer .footer-grid > div:nth-child(2) li {
    margin-bottom: 0.5rem !important;
}

.site-footer .footer-bottom {
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.75rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-copy,
.site-footer .footer-developed {
    margin: 0;
}

.site-footer .footer-developed a {
    color: #fff;
    font-weight: 600;
}
/* Reduzir espaçamento entre as colunas do footer */
.site-footer .footer-grid {
    row-gap: 1.5rem !important;
}

.site-footer .footer-contacts {
    margin-bottom: 0 !important;
    gap: 0.75rem !important;
}

.site-footer .footer-contacts li {
    margin-bottom: 0.5rem !important;
}

/* Estilos discretos em cinza para a seção Desenvolvido por */
.site-footer .footer-developed {
    margin: 0;
    color: rgba(150, 150, 150, 0.5);
    font-size: 0.85rem;
    font-weight: 400;
}

.site-footer .footer-developed a {
    color: rgba(120, 120, 120, 0.6);
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.site-footer .footer-developed a:hover {
    color: rgba(180, 180, 180, 0.8);
    text-decoration: underline;
}
/* Reduzir espaçamento entre as colunas do footer */
.site-footer .footer-grid {
    row-gap: 1.5rem !important;
}

.site-footer .footer-contacts {
    margin-bottom: 0 !important;
    gap: 0.75rem !important;
}

.site-footer .footer-contacts li {
    margin-bottom: 0.5rem !important;
}
