/* ═══════════════════════════════════════════
   Efeitos visuais — Template Câmara Municipal
   ═══════════════════════════════════════════ */

/* Header scroll */
.site-header {
    transition: box-shadow 0.35s, background 0.35s, padding 0.35s;
}

.site-header.is-scrolled {
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
}

.site-header.is-scrolled .header-inner {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.site-header.is-scrolled .brand-logo {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
}

/* Hero effects */
.hero {
    overflow: hidden;
}

.hero-bg-layer {
    animation: heroKenBurns 18s ease-in-out infinite alternate;
}

@keyframes heroKenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}

.hero-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.04) 45%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 55%,
        transparent 60%
    );
    animation: heroShine 8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes heroShine {
    0%, 100% { transform: translateX(-30%); opacity: 0.5; }
    50% { transform: translateX(30%); opacity: 1; }
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content.reveal.active h1 {
    animation: heroTitleIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-content.reveal.active p {
    animation: heroTitleIn 0.9s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-content.reveal.active .hero-actions {
    animation: heroTitleIn 0.9s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroTitleIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Section headers */
.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--blue-accent));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active .section-header h2::after,
.section-header:hover h2::after {
    width: 100%;
}

/* Cards hover lift */
.vereador-card,
.panel,
.quick-icon-item,
.people-card,
.mesa-card,
.comissao-card,
.service-card,
.info-panel {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease,
                border-color 0.25s ease,
                background 0.25s ease;
}

.vereador-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.panel:hover,
.info-panel:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}


.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-card--split:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
}

/* Vereador photo shimmer on hover */
.vereador-card .photo {
    position: relative;
    overflow: hidden;
}

.vereador-card .photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.vereador-card:hover .photo::after {
    transform: translateX(100%);
}

/* Stats bar glow */
.stats-bar {
    position: relative;
}

.stats-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.03);
}

.stat-item .icon {
    transition: transform 0.4s ease, color 0.3s;
}

.stat-item:hover .icon {
    transform: scale(1.08);
    color: var(--green-brand);
}

/* Progress bars animate when visible */
.reveal.active .progress-bar .fill {
    animation: progressFill 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes progressFill {
    from { width: 0 !important; }
}

/* Live badge pulse */
.badge-live {
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Floating tabs enhanced */
.floating-tab {
    transition: transform 0.25s, padding 0.25s, box-shadow 0.25s;
    box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.15);
}

.floating-tab:hover {
    padding-right: 0.85rem;
    filter: brightness(1.08);
    box-shadow: -8px 8px 24px rgba(0, 0, 0, 0.25);
}

/* Buttons ripple feel */
.btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
    transform: scale(0.97);
}

.btn-green:hover {
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}

/* Search overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 1.25rem 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
}

.search-overlay.open {
    opacity: 1;
    visibility: visible;
}

.search-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
}

.search-modal {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    transform: translateY(-20px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-overlay.open .search-modal {
    transform: translateY(0) scale(1);
}

.search-modal h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    color: var(--navy-800);
}

.search-modal > p {
    margin: 0 0 1.25rem;
    font-size: 0.88rem;
    color: var(--gray-400);
}

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
}

.search-close:hover {
    background: var(--navy-800);
    color: #fff;
}

.search-modal-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.search-modal-form input {
    flex: 1;
    padding: 0.85rem 1.1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-modal-form input:focus {
    outline: none;
    border-color: var(--navy-600);
    box-shadow: 0 0 0 4px rgba(30, 68, 120, 0.12);
}

.search-modal-form button {
    padding: 0.85rem 1.5rem;
    background: var(--navy-800);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.search-modal-form button:hover {
    background: var(--navy-600);
    transform: translateY(-1px);
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.search-suggestions span {
    color: var(--gray-400);
    font-weight: 600;
}

.search-suggestions a {
    padding: 0.3rem 0.75rem;
    background: var(--gray-100);
    border-radius: 999px;
    color: var(--navy-700);
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.search-suggestions a:hover {
    background: var(--navy-800);
    color: #fff;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--navy-800);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--green);
    transform: translateY(-3px);
}

/* Logo subtle pulse */
.brand-logo {
    transition: transform 0.3s, box-shadow 0.3s;
}

.brand:hover .brand-logo {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(30, 68, 120, 0.3);
}

/* Topbar link underline animation */
.topbar-links a {
    position: relative;
}

.topbar-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.25s;
}

.topbar-links a:hover::after {
    width: 100%;
}

/* Photo grid hover zoom */
.photo-grid img {
    cursor: pointer;
}

/* News list slide */
.news-list .item {
    transition: background 0.2s, transform 0.2s;
    border-radius: 6px;
    margin: 0 -0.5rem;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

.news-list .item:hover {
    background: var(--gray-50);
    transform: translateX(4px);
}

/* Footer newsletter focus */
.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

/* Destaques slider — animação do conteúdo */
.highlight-slide.is-active .highlight-content {
    animation: highlightContentIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes highlightContentIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .hero-bg-layer { animation: none; }
    .hero-shine { animation: none; }
}
