:root {
    --primary-color: #0b5a32;
    --primary-light: #128249;
    --primary-dark: #073d21;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f4f7f6;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- TOPBAR --- */
.topbar {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    font-size: 0.85rem;
    padding: 8px 0;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.topbar a {
    color: var(--bg-white);
    margin-right: 15px;
    transition: var(--transition);
}

.topbar a:hover {
    color: #a0d4b6;
}

/* Responsividade da Topbar Mobile */
@media (max-width: 991px) {
    .topbar-right {
        display: none; /* Esconde links menos importantes no mobile */
    }
    .topbar-content {
        justify-content: center;
    }
}
@media (max-width: 576px) {
    .topbar-left {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .topbar-left::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Edge */
    }
    .topbar a {
        font-size: 0.8rem;
        margin-right: 15px;
    }
}

/* --- HEADER --- */
.main-header {
    background-color: var(--bg-white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-area a {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 70px;
}

.logo-text h1 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: -5px;
}

.logo-text h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.logo-text span {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}

.search-area {
    flex: 1;
    max-width: 400px;
}

.search-box {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-family: var(--font-main);
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background-color: var(--primary-dark);
}

.contact-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    text-align: right;
    font-size: 0.85rem;
}

.contact-info .title { font-weight: 600; }
.contact-info .time { color: var(--text-light); }
.contact-info .phone {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    background-color: #1ebd5a;
}

/* Responsividade Header */
@media (max-width: 991px) {
    .search-area, .contact-area {
        display: none;
    }
    .header-content {
        justify-content: center;
    }
}

/* --- NAV --- */
.main-nav {
    background-color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    justify-content: space-between;
}

.main-nav a {
    display: block;
    padding: 15px 10px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.main-nav a:hover {
    background-color: var(--primary-dark);
}

/* --- HERO BANNER --- */
.hero-banner {
    background: linear-gradient(rgba(11, 90, 50, 0.8), rgba(11, 90, 50, 0.8)), url('../img/banners/banner-bg.jpg') center/cover;
    color: white;
    padding: 40px 0;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-text {
    max-width: 600px;
}

.hero-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-primary {
    background-color: var(--primary-light);
    color: white;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-color);
}

.hero-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
}

.hero-card ul li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-card i {
    color: #a0d4b6;
}

/* --- SEÇÕES GERAIS --- */
.section-padding {
    padding: 60px 0;
}

.section-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    text-transform: uppercase;
    font-weight: 700;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}

/* --- ACESSO RÁPIDO & TRANSPARÊNCIA CARDS --- */
.icon-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px 15px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.icon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary-light);
}

.icon-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.icon-card span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.icon-card small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 5px;
}

.text-center {
    text-align: center;
}

.view-all {
    display: inline-block;
    margin-top: 25px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.view-all:hover {
    text-decoration: underline;
}

/* --- INDICADORES --- */
.grid-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.indicator-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.indicator-icon {
    background-color: #e6f2eb;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.indicator-info h4 {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.indicator-info .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 5px 0;
}

.indicator-info .meta {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* --- GRID LAYOUT (SERVIÇOS, NOTÍCIAS) --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.box-list h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}
.box-list > p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.list-links li {
    border-bottom: 1px solid var(--border-color);
}

.list-links li:last-child {
    border-bottom: none;
}

.list-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.list-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* --- NOTÍCIAS RECENTES --- */
.news-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}
.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-img {
    width: 100px;
    height: 75px;
    border-radius: 4px;
    object-fit: cover;
}

.news-content h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.news-content .date {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* --- FOOTER --- */
.main-footer {
    background-color: var(--primary-dark);
    color: white;
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-light);
}

.footer-col p {
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 10px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    font-size: 0.9rem;
    color: #cccccc;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: white;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
}

.btn-contact {
    display: inline-block;
    margin-top: 15px;
    border: 1px solid white;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-contact:hover {
    background-color: white;
    color: var(--primary-dark);
}

.footer-bottom {
    background-color: #052c17;
    padding: 20px 0;
    font-size: 0.8rem;
    color: #aaaaaa;
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .main-nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }
    .hero-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    .contact-area {
        justify-content: center;
    }
    .topbar-content {
        justify-content: center;
        gap: 10px;
    }
}

 / *   - - -   H I G H   C O N T R A S T   M O D E   - - -   * / 
 b o d y . h i g h - c o n t r a s t   { 
         b a c k g r o u n d - c o l o r :   # 0 0 0 0 0 0   ! i m p o r t a n t ; 
         c o l o r :   # f f f f f f   ! i m p o r t a n t ; 
 } 
 b o d y . h i g h - c o n t r a s t   *   { 
         b a c k g r o u n d - c o l o r :   # 0 0 0 0 0 0   ! i m p o r t a n t ; 
         c o l o r :   # f f f f f f   ! i m p o r t a n t ; 
         b o r d e r - c o l o r :   # f f f f f f   ! i m p o r t a n t ; 
 } 
 b o d y . h i g h - c o n t r a s t   a ,   b o d y . h i g h - c o n t r a s t   a   *   { 
         c o l o r :   # f f f f 0 0   ! i m p o r t a n t ; 
         t e x t - d e c o r a t i o n :   u n d e r l i n e ; 
 } 
 b o d y . h i g h - c o n t r a s t   i m g   { 
         f i l t e r :   g r a y s c a l e ( 1 0 0 % )   c o n t r a s t ( 1 2 0 % ) ; 
 } 
 b o d y . h i g h - c o n t r a s t   . t o p b a r ,   b o d y . h i g h - c o n t r a s t   . m a i n - h e a d e r ,   b o d y . h i g h - c o n t r a s t   . m a i n - n a v ,   b o d y . h i g h - c o n t r a s t   . m a i n - f o o t e r ,   b o d y . h i g h - c o n t r a s t   . h e r o - b a n n e r   { 
         b a c k g r o u n d :   # 0 0 0   ! i m p o r t a n t ; 
         b o r d e r - b o t t o m :   2 p x   s o l i d   # f f f ; 
 } 
  
 
/* Secretarias Page */
.page-secretarias {
    background: var(--bg-light);
    min-height: 100vh;
}
.secretarias-section {
    padding-bottom: 4rem;
}
.sec-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: 100%;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(11, 90, 50, 0.15);
    border-color: var(--primary-light);
}
.sec-card-header {
    padding: 20px;
    background: linear-gradient(135deg, rgba(11, 90, 50, 0.05) 0%, rgba(18, 130, 73, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}
.sec-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.sec-card:hover .sec-icon {
    background: var(--primary-light);
}
.sec-title {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}
.sec-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.sec-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.sec-info-item i {
    color: var(--primary-light);
    margin-top: 4px;
    width: 16px;
    text-align: center;
}
.sec-info-item small {
    display: block;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.sec-info-item strong, .sec-info-item span {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
}
.sec-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 10px 15px;
    background: rgba(11, 90, 50, 0.08);
    color: var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}
.sec-email:hover {
    background: var(--primary-color);
    color: white;
}

/* Dropdown Menu CSS */
.main-nav ul li.nav-dropdown {
    position: relative;
}
.main-nav ul li.nav-dropdown .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-dark);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 0 0 8px 8px;
    padding: 0;
}
.main-nav ul li.nav-dropdown:hover .dropdown-content {
    display: block;
}
.main-nav ul li.nav-dropdown .dropdown-content li {
    display: block;
    margin: 0;
    padding: 0;
}
.main-nav ul li.nav-dropdown .dropdown-content li a {
    padding: 12px 16px;
    display: block;
    color: white;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.main-nav ul li.nav-dropdown .dropdown-content li:last-child a {
    border-bottom: none;
}
.main-nav ul li.nav-dropdown .dropdown-content li a:hover {
    background-color: var(--primary-light);
    color: white;
}

/* Responsive Hamburger Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 991px) {
    .main-nav .container {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 10px 15px;
    }
    
    .menu-toggle {
        display: block;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--primary-dark);
        z-index: 999;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }

    .main-nav ul.active {
        display: flex;
    }

    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .main-nav ul li a {
        padding: 15px 20px;
        display: block;
    }

    .main-nav ul li.nav-dropdown .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        background-color: rgba(0,0,0,0.1);
        width: 100%;
    }
    
    /* Toggle dropdowns on click in mobile */
    .main-nav ul li.nav-dropdown.active .dropdown-content {
        display: block;
    }
}

/* --- ACESSIBILIDADE: ALTO CONTRASTE --- */
body.high-contrast,
body.high-contrast .main-header,
body.high-contrast .main-nav,
body.high-contrast .main-nav ul,
body.high-contrast .main-nav ul li.nav-dropdown .dropdown-content,
body.high-contrast .main-footer,
body.high-contrast .card,
body.high-contrast section,
body.high-contrast main,
body.high-contrast .alert {
    background-color: #000000 !important;
    color: #FFFFFF !important;
}

body.high-contrast * {
    color: #FFFFFF !important;
    border-color: #FFFFFF !important;
}

body.high-contrast a,
body.high-contrast a * {
    color: #FFFF00 !important; /* Links em amarelo para melhor visibilidade */
}

body.high-contrast img,
body.high-contrast .logo-img {
    filter: grayscale(100%) contrast(120%) !important;
}

body.high-contrast .service-card::before,
body.high-contrast .service-icon-box {
    background: none !important;
    background-color: #000 !important;
    border: 1px solid #FFF !important;
}
