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

html { scroll-behavior: smooth; }
body { font-family: Dosis, Tahoma, Geneva, Verdana, sans-serif; background: #fff; color: #333; font-size: 15px; line-height: 1.5; }
a { color: #b41221; text-decoration: none; transition: color .15s, background .15s; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.skip-link {
    position: absolute; top: -100px; left: 0; z-index: 1000;
    padding: 8px 16px; background: #333; color: #fff; font-weight: 600;
    border-radius: 0 0 4px 0;
}
.skip-link:focus { top: 0; text-decoration: none; color: #fff; }

.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* Utility floats (matching original) */
.f-left { float: left; }
.f-right { float: right; }

/* Font weight helpers (matching original Dosis 500/700) */
.dosis-m { font-family: 'Dosis', sans-serif; font-weight: 500; }
.dosis-b { font-family: 'Dosis', sans-serif; font-weight: 700; }

/* Accessibility bar */
.ajuda-visual {
    background: #333; color: #ccc; font-size: 13px;
    min-height: 40px; border-bottom: 1px solid #eaeaea;
}
.ajuda-visual .container {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 6px; padding-bottom: 6px;
}
.ajuda-visual a { color: #fff; margin-right: 12px; }
.ajuda-visual a:hover { color: #FF0; text-decoration: none; }
.ajuda-visual .acessibilidade-acoes a { margin-left: 8px; margin-right: 0; }

/* Header */
.site-header { background: #fff; position: relative; }
.site-header .container {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; padding-bottom: 12px;
}
.site-logo { display: flex; align-items: center; gap: 15px; }
.site-logo img { height: auto; width: auto; }
.site-logo .site-title { font-size: 20px; font-weight: 700; color: #333; }
.site-header-actions { display: flex; align-items: center; gap: 15px; }
.btn-search { background: none; border: none; cursor: pointer; font-size: 18px; color: #b41221; padding: 4px 8px; }

/* Search form */
.search-form-wrapper { display: none; position: absolute; top: 100%; right: 0; z-index: 100; background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.1); margin-top: 5px; }
.search-form-wrapper.open { display: block; }
.search-form { display: flex; gap: 6px; }
.search-form input { padding: 6px 10px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px; width: 200px; }
.search-form button { padding: 6px 14px; background: #b41221; color: #fff; border: none; border-radius: 3px; cursor: pointer; font-size: 14px; }
.search-form button:hover { background: #8f0e1a; }

/* Navigation — matching original: white bg, gray links, yellow hover, green active */
.site-nav {
    background: transparent; border-bottom: 1px solid #eaeaea;
    min-height: 32px; z-index: 999; position: relative;
    transition: box-shadow .2s;
}
.site-nav.sticky { position: fixed; top: 0; left: 0; right: 0; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.site-nav .container { display: flex; align-items: center; justify-content: center; }
/* Nav link styles moved to .site-nav .nav-menu a (dropdown section below) */
/* Nav hover moved to .site-nav .nav-menu a:hover */
/* Nav active moved to .site-nav .nav-menu a.active */

/* Hamburger */
/* Nav links -- horizontal row */
.nav-links { display: flex; flex-direction: row; }
.nav-toggle { display: none; background: none; border: none; color: #333; font-size: 24px; padding: 10px 16px; cursor: pointer; }

/* Breadcrumbs — matching original */
.breadcrumbs { width: 100%; color: #aaa; font-size: .7em; margin-bottom: 5px; }
.breadcrumbs a { color: #aaa; }
.breadcrumbs a:hover { color: #ffd13a; text-decoration: none; }
.breadcrumbs .separator { margin: 0 6px; color: #ccc; }

/* Page heading */
h1 { color: #b41221; margin: 20px 0; font-size: 26px; line-height: 1.2; }
h2 { margin: 18px 0 8px; color: #b41221; font-size: 22px; }
h3 { margin: 14px 0 6px; font-size: 18px; }
h4 { margin: 12px 0 5px; font-size: 16px; }
h5 { margin: 10px 0 4px; font-size: 15px; }
h6 { margin: 8px 0 3px; font-size: 14px; }
hr { margin: 20px 0; border: none; border-top: 1px solid #ddd; }

/* Slider / destaques */
.slider-container { position: relative; margin: 20px 0; overflow: hidden; border-radius: 4px; }
.slider { overflow: hidden; position: relative; background: #fff; }
.slider-track { display: flex; transition: transform 0.5s ease-in-out; }
.slide { min-width: 100%; box-sizing: border-box; position: relative; line-height: 0; }
.slide img { width: 100%; height: auto; display: block; }
/* .slide-mask removed - banners have embedded text */
/* .slide-mask h2 removed */
/* .slide-mask a removed */
/* removed */
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(128,0,128,0.6); color: #fff; border: none; font-size: 28px; width: 40px; height: 40px; cursor: pointer; z-index: 2; border-radius: 50%; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.slider-arrow:hover { background: rgba(128,0,128,0.9); }
.slider-prev { left: 8px; }
.slider-next { right: 8px; }
.slider-dots { text-align: center; padding: 8px 0; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 2; }
.slider-dots .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); border: 2px solid rgba(255,255,255,0.8); margin: 0 4px; cursor: pointer; padding: 0; }
.slider-dots .dot.active { background: #ffd13a; border-color: #ffd13a; }

/* Home grid */
.home-grid { display: flex; gap: 30px; margin-top: 20px; }
.home-main { flex: 1; min-width: 0; }
.home-sidebar { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 0; }
.home-sidebar .module { background: #fff; padding: 0; margin-bottom: 20px; border-radius: 4px; overflow: hidden; border: 1px solid #eaeaea; }
    .home-sidebar .module h3 { background: linear-gradient(to bottom, #007bff, #0056b3); color: #fff; padding: 8px 16px; margin: 0; font-size: 14px; font-weight: 600; }
    .home-sidebar .module:nth-child(2) h3 { background: linear-gradient(to bottom, #f0ad4e, #d68910); }
    .home-sidebar .module .module-content { padding: 16px; }
.home-sidebar .module h3 { margin-top: 0; color: #fff; font-size: 14px; font-weight: 600; }

/* News list */
.news-list { list-style: none; }
.news-list li { padding: 12px 0; border-bottom: 1px solid #eee; }
.news-list li:first-child { padding-top: 0; }
.news-list .date { display: block; color: #888; font-size: 12px; margin-bottom: 2px; }
.more { display: block; text-align: right; margin-top: 10px; font-weight: 600; }

/* Content layout with sidebar */
.content-with-sidebar { display: flex; gap: 30px; }
.content-main { flex: 1; min-width: 0; }
.content-sidebar { width: 280px; flex-shrink: 0; }

/* News article list */
.news-article { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid #eee; }
.news-article:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.news-article h2 { margin-top: 0; }

/* News single */
.article-meta { color: #888; font-size: 13px; margin-bottom: 20px; }
.article-content { line-height: 1.8; font-size: 15px; }
.article-content p { margin-bottom: 14px; }

/* Filters */
.filtros { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; align-items: end; }
.filtros label { font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.filtros select, .filtros input { display: block; font-size: 13px; padding: 5px 8px; border: 1px solid #bbb; border-radius: 3px; background: #fff; }
.filtros button { padding: 6px 24px; background: #b41221; color: #fff; border: none; border-radius: 3px; cursor: pointer; font-size: 14px; font-weight: 600; align-self: end; }
.filtros button:hover { background: #8f0e1a; }

/* Tables */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; border-bottom: 2px solid #000; }
th {
    background: #ddd; color: #333; font-weight: bold;
    padding: 6px 8px; text-align: center; border-bottom: 2px solid #000;
    white-space: nowrap;
}
td { padding: 4px 6px; border-bottom: 1px solid #eee; text-align: center; font-size: 12px; }
tr.gray td { background: #eee; }
tr:hover td { background: #f0f0f0; }

/* Share — matching original #compartilhe */
.share {
    border-top: 1px solid #fff; clear: both; margin-bottom: 15px; padding-top: 10px; width: 100%;
    text-align: left; font-size: 13px;
}
.share span { font-weight: 600; color: #666; }
.share a {
    display: inline-block; margin-left: 6px; padding: 3px 10px;
    background: #eee; border-radius: 3px; font-size: 13px; color: #333;
}
.share a:hover { background: #b41221; color: #fff; text-decoration: none; }

/* Module */
.module { background: #eee; padding: 18px; margin-bottom: 16px; border-radius: 4px; }
.module h3 { margin-top: 0; color: #b41221; font-size: 16px; }

/* Footer — matching original: light gray bg, border-top */
.site-footer { background: #f5f5f5; border-top: 1px solid #ddd; margin-top: 40px; padding: 0 0 0; }
.site-footer .footer-grid { display: flex; gap: 40px; flex-wrap: wrap; padding: 20px 0; }
.site-footer .footer-col { flex: 1; min-width: 180px; }
.site-footer h4 { color: #333; font-size: 15px; margin-bottom: 12px; }
.site-footer p { margin-bottom: 6px; line-height: 1.6; color: #666; }
.site-footer a { color: #666; }
.site-footer a:hover { color: #b41221; text-decoration: none; }
.site-footer .social-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.site-footer .social-links a {
    display: inline-block; padding: 4px 10px; background: #ddd;
    border-radius: 3px; color: #333; font-size: 12px;
}
.site-footer .social-links a:hover { background: #ffd13a; color: #1f1801; }
.social-icons { display: flex; gap: 8px; align-items: center; margin-left: 12px; }
.social-icons a { display: flex; align-items: center; }
.social-icons svg { transition: opacity 0.2s; }
.social-icons a:hover svg { opacity: 0.8; }
.footer-bottom {
    background: #f5f5f5; border-top: 1px solid #eaeaea;
    text-align: center; padding: 14px 20px; color: #666; font-size: 12px;
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; margin: 24px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-block; padding: 6px 12px; border: 1px solid #ddd;
    border-radius: 3px; font-size: 13px; color: #333; background: #fff;
}
.pagination a:hover { background: #ffd13a; color: #1f1801; border-color: #e8ba23; text-decoration: none; }
.pagination .active span { background: #269c59; color: #fff; border-color: #269c59; }
.pagination .disabled span { color: #ccc; background: #f5f5f5; }

/* Etapas list */
.etapa-item { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.etapa-item:last-child { border-bottom: none; }

/* Post content (WordPress migrated) */
.post-content p { margin-bottom: 12px; }
.post-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 10px 0; }
.post-content ul, .post-content ol { margin: 8px 0 12px 20px; }
.post-content li { margin-bottom: 4px; }
.post-content blockquote { border-left: 3px solid #b41221; padding-left: 14px; margin: 12px 0; color: #666; }
.post-content table { margin: 10px 0; }

/* Badges for classification legend */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 3px;
    font-size: 11px; font-weight: bold; color: #fff; background: #666;
}
.badge-inverse { background: #333; }
.badge-important { background: #b41221; }
.badge-warning { background: #ffd13a; color: #333; }
.badge-success { background: #269c59; }
.badge-info { background: #5bc0de; }

/* Mobile */
@media (max-width: 768px) {
    .container { padding: 0 12px; }
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    .home-grid { flex-direction: column; }
    .home-sidebar { width: 100%; }
    .content-with-sidebar { flex-direction: column; }
    .content-sidebar { width: 100%; }
    table { font-size: 12px; }
    th, td { padding: 4px 5px; }
    .filtros { flex-direction: column; align-items: stretch; }
    .filtros select, .filtros input { width: 100%; }
    .site-logo img.jemg-logo { height: 60px; width: auto; }
    .site-logo .site-title { font-size: 16px; }
    .site-logo img { height: 36px; }

    .nav-toggle { display: block; }
    .site-nav .nav-links { display: none; flex-direction: column; width: 100%; }
    .site-nav .nav-links.open { display: flex; }
    .site-nav .container { flex-wrap: wrap; }
    .site-nav .nav-menu a { border-top: 1px solid #eee; border-radius: 0; white-space: normal; }
    .search-form { display: flex; gap: 4px; align-items: center; }
    .search-form input { width: 180px; padding: 4px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 13px; }
    .search-form button { padding: 4px 12px; background: #333; color: #fff; border: none; border-radius: 3px; cursor: pointer; font-size: 13px; }

    .site-footer .footer-grid { flex-direction: column; gap: 24px; }
    .site-footer .footer-col { min-width: 0; }
}

@media (max-width: 480px) {
    h1 { font-size: 18px; }
    .site-header .container { flex-wrap: wrap; gap: 8px; }
    .ajuda-visual .container { flex-direction: column; gap: 4px; }
}

/* Content with sidebar layout */
.content-with-sidebar { display: flex; gap: 30px; align-items: flex-start; }
.content-area { flex: 1; min-width: 0; }
.content-sidebar { width: 280px; flex-shrink: 0; }

.content-sidebar .sidebar-module { background: #f5f5f5; padding: 18px; margin-bottom: 16px; border-radius: 4px; }
.content-sidebar .sidebar-module h4 { margin: 0 0 10px; font-size: 15px; color: #333; border-bottom: 2px solid #ffd13a; padding-bottom: 6px; }
.content-sidebar .sidebar-module ul { list-style: none; padding: 0; margin: 0; }
.content-sidebar .sidebar-module li { margin-bottom: 6px; }
.content-sidebar .sidebar-module li a { color: #333; font-size: 13px; }
.content-sidebar .sidebar-module li a:hover { color: #b41221; text-decoration: underline; }
.content-sidebar .sidebar-module p { font-size: 13px; color: #555; line-height: 1.4; }
.content-sidebar .sidebar-module .sidebar-date { font-size: 11px; color: #999; }


/* Footer sponsors */
.footer-sponsors { background: #fff; border-top: 1px solid #eaeaea; padding: 16px 0; }
.footer-sponsors .container { overflow: hidden; }
.sponsor-track { display: flex; gap: 32px; align-items: center; justify-content: center; flex-wrap: wrap; }
.sponsor-item { display: flex; align-items: center; justify-content: center; }
.sponsor-item img { max-height: 50px; width: auto; opacity: 0.7; transition: opacity .2s; }
.sponsor-item img:hover { opacity: 1; }


/* Dropdown menu */
.site-nav .nav-menu { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 24px; }
.site-nav .nav-menu li { position: relative; }
.site-nav .nav-menu .sub-menu {
    display: none; position: absolute; top: 100%; left: 0; z-index: 999;
    background: #fff; border: 1px solid #eaeaea; border-top: 2px solid #269c59;
    min-width: 200px; padding: 4px 0; box-shadow: 0 4px 12px rgba(0,0,0,.1);
    list-style: none; margin: 0;
}
.site-nav .nav-menu .sub-menu .sub-menu { top: -4px; left: 100%; border-top: 2px solid #ffd13a; }
.site-nav .nav-menu li:hover > .sub-menu { display: block; }
.site-nav .nav-menu .sub-menu a {
    padding: 8px 16px; border-radius: 0; font-size: 13px; border-bottom: 1px solid #f5f5f5;
}
.site-nav .nav-menu .sub-menu a:hover { background: #ffd13a; }
.site-nav .nav-menu .sub-menu a.active { background: #269c59; color: #fff; }
.site-nav .nav-menu .menu-item-has-children > a::after {
    content: ' \25BC'; font-size: 9px; vertical-align: middle; margin-left: 4px;
}

@media (max-width: 768px) {
    .site-nav .nav-menu { flex-direction: column; width: 100%; }
    .site-nav .nav-menu li { width: 100%; }
    .site-nav .nav-menu a { border-top: 1px solid #eee; border-radius: 0; white-space: normal; }
    .site-nav .nav-menu .sub-menu { position: static; box-shadow: none; border: none; border-left: 3px solid #269c59; margin-left: 12px; min-width: 0; }
    .site-nav .nav-menu li:hover > .sub-menu { display: none; }
    .site-nav .nav-menu li.open > .sub-menu { display: block; }
}


/* Menu abaixo do slider (home) */
.slider-container + .site-nav {
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    margin-top: 20px;
}
.slider-container + .site-nav .nav-menu {
    justify-content: center;
    gap: 24px;
}
.slider-container + .site-nav .nav-menu a {
    padding: 8px 12px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}
.slider-container + .site-nav .nav-menu a:hover {
    background: #ffd13a;
    color: #1f1801;
}


/* Documents list - spaced links */
.post-content {
    line-height: 2;
}
.post-content a {
    display: inline-block;
    margin-bottom: 8px;
    line-height: 1.6;
}
.post-content a[href*=".pdf"] {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
}

/* News thumbnails - home list */
.news-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.news-item:first-child { padding-top: 0; }
.news-thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.news-item-content { flex: 1; min-width: 0; }

/* News thumbnails - noticias listing */
.news-article {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}
.news-article .news-thumb {
    width: 180px;
    height: 120px;
    flex-shrink: 0;
}
.news-article-body { flex: 1; min-width: 0; }

/* Fotos preview on home */
.fotos-preview {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* Mobile */
@media (max-width: 768px) {
    .news-item { flex-direction: column; }
    .news-thumb { width: 100%; height: auto; max-height: 160px; }
    .news-article { flex-direction: column; }
    .news-article .news-thumb { width: 100%; height: auto; max-height: 200px; }
}

/* Flickr module - legacy layout: thumb left, title right */
.module-fotos .module-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}
.flickr-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
}
.flickr-link:hover { text-decoration: none; }
.fotos-thumb {
    width: 97px;
    height: 97px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}
.flickr-link h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #00a0d2;
    line-height: 1.3;
}
.flickr-link:hover h4 { text-decoration: underline; }
.flickr-dots {
    width: 100%;
    color: #999;
    font-size: 12px;
    margin: 0;
    padding: 0;
}

.module-fotos h3,
.module-inscricoes h3 {
    border-radius: 50px 50px 0 0;
    padding: 8px 20px 12px;
    text-align: center;
    position: relative;
    margin: 0 -1px;
}
.module-fotos h3 {
    background: linear-gradient(135deg, #00a0d2 0%, #0077b6 100%);
    color: #fff;
}
.module-inscricoes h3 {
    background: linear-gradient(135deg, #f5a623 0%, #e8941c 100%);
    color: #fff;
}




/* Sidebar modules row for fotos/inscrições */
.home-sidebar-modules {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.home-sidebar-modules .module {
    flex: 1;
    min-width: 0;
}

/* Arc-shaped headers for fotos/inscrições — matching legacy */
.module-fotos h3,
.module-inscricoes h3 {
    border-radius: 50% 50% 0 0 / 20px 20px 0 0;
    padding: 5px 12px 10px;
    text-align: center;
    position: relative;
    margin: 0 -1px;
    border: none;
    letter-spacing: 0.5px;
}
.module-fotos h3 {
    background: linear-gradient(135deg, #00b4e6 0%, #0088cc 100%);
    color: #fff;
}
.module-inscricoes h3 {
    background: linear-gradient(135deg, #f5b731 0%, #e8a020 100%);
    color: #fff;
}

/* === Form styles (contato, busca) === */
.form-contato { max-width: 600px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; margin-bottom: 4px; }
.form-input { width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; }
.form-error { color: #b41221; }

.alert { padding: 16px; border-radius: 4px; margin-bottom: 20px; }
.alert-success { background: #d4edda; color: #155724; }

.btn { border: none; border-radius: 4px; cursor: pointer; font-size: 16px; }
.btn-primary { background: #269c59; color: #fff; padding: 10px 24px; }
.btn-primary:hover { background: #1e8a4a; }

.search-page-form { margin-bottom: 24px; }
.search-input { padding: 8px 12px; width: 60%; max-width: 400px; border: 1px solid #ccc; border-radius: 4px; }
.search-total { margin-bottom: 16px; color: #666; }
.search-result { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.search-result-title { margin: 0 0 4px; font-size: 18px; }
.search-result-meta { font-size: 12px; color: #999; margin-bottom: 6px; }
.search-result-excerpt { margin: 0; font-size: 14px; color: #555; }
