/*
Theme Name: Tema Absolar
Theme URI: https://absolar.org.br/
Author: Lucas (F5WebNet)
Author URI: https://absolar.org.br/
Description: Tema feito para a absolar.
Version: 0.1
Text Domain: absolar
*/
/* === Fonts === */
@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-ThinItalic.ttf') format('truetype');
    font-weight: 100;
    font-style: italic;
}

@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-BlackItalic.ttf') format('truetype');
    font-weight: 900;
    font-style: italic;
}

/* === Variables === */
:root {
    --primary: #006633;
    --link: #009245;
    --link-hover: #007a3c;
    --link-active: #005f2a;
    --accent: #daf1dd;
    --secondary: #f8b033;
    --text-on-primary: #fff;
    --text-on-accent: #000;
    --text-on-secondary: #000;
}

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    background-color: #fff;
    flex: 1 0 auto;
    min-height: 0;
}

main a {
    color: var(--link);
}

main a:hover {
    color: var(--link-hover);
}

main a:active {
    color: var(--link-active);
}

.main_layout {
    padding: 1rem 15rem;
}

.horizontal_padding {
    padding-left: 15rem;
    padding-right: 15rem;
}

.p-justify {
    text-align: justify;
}

.horizontal_margin {
    margin-left: 15rem;
    margin-right: 15rem;
}

.row_gap {
    gap: 2rem;
}

/* === Top bar === */
.top-bar {
    background: var(--primary);
    color: var(--text-on-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar .left,
.top-bar .right {
    display: flex;
    align-items: center;
}

/* === Main header === */
.header-main {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    background-color: #fff;
}

/* Header logo */
.header-main .custom-logo {
    max-height: 80px;
    object-fit: contain;
    width: 250px;
}

/* Footer logo (smaller or centered) */
.footer-logo .custom-logo {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

/* desktop nav */
.header-main nav.desktop-menu {
    display: flex;
    gap: 1rem;
}

/* mobile nav button */
.header-main .menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* === Drawer === */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 9999;
    padding: 2rem 1rem;
}

.mobile-drawer.open {
    right: 0;
}

.mobile-drawer .close-btn {
    font-size: 1.5rem;
    background: none;
    border: none;
    float: right;
    cursor: pointer;
}

.mobile-drawer nav {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Footer Top */
.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem 15rem;
    background: var(--accent);
}

.footer-top .footer-col h4 {
    margin-bottom: 0.75rem;
}

.footer-top .footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-top .footer-col ul li+li {
    margin-top: 0.5rem;
}

/* Footer Bottom */
.footer-bottom {
    background: var(--primary);
    color: var(--text-on-primary);
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--text-on-primary);
    text-decoration: none;
}

.button-secondary-filled {
    background-color: var(--secondary);
    color: var(--text-on-secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
}

.button-outline {
    background-color: transparent;
    color: var(--text-on-primary);
    border: 2px solid var(--text-on-primary);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
}

.top-bar .right {
    gap: 1rem;
}

/* 1) Horizontal top-level menu */
.nav-primary .nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

/* 2) Top-level items */
.nav-primary .nav-menu>li {
    position: relative;
    /* for absolutely positioned submenu */
}

.nav-primary .nav-menu>li>a {
    display: block;
    padding: 0.5rem;
    color: var(--text-on-accent);
    text-decoration: none;
}

.nav-primary .nav-menu>li:hover>a {
    background: white;
}

/* 3) Hide all sub-menus */
.nav-primary .nav-menu li ul {
    display: none;
    position: absolute;
    top: 100%;
    /* drop it immediately below its parent */
    left: 0;
    background: white;
    border: 1px solid var(--primary);
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 180px;
    z-index: 1000;
    border-radius: 5px;
}

/* 4) Show submenu on hover */
.nav-primary .nav-menu li:hover>ul {
    display: block;
}

/* 5) Submenu items (always vertical) */
.nav-primary .nav-menu li ul li {
    width: 100%;
}

.nav-primary .nav-menu li ul li a {
    display: block;
    padding: 10px 15px;
    color: var(--text-on-accent);
    text-decoration: none;
}

.nav-primary .nav-menu li ul li a:hover {
    background: var(--accent);
}

/* Highlight the active menu item */
.nav-primary .nav-menu li.active>a {
    border-bottom-color: var(--primary);
    border-bottom-width: 5px;
    border-bottom-style: solid;
}

/* Optional: siblings get a subtle hover to contrast */
.nav-primary .nav-menu li>a:hover {
    background-color: var(--accent);
    color: var(--text-on-secondary);
}

/* Remove bullets and default padding/margin */
.nav-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Links: no underlines */
.nav-footer ul li a {
    text-decoration: none;
    display: block;
    /* makes padding click-friendly */
    padding: 4px 0;
    /* tweak vertical spacing as needed */
}

/* Depth-1 items */
.nav-footer>ul>li>a {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.2rem;
}

/* Depth-2 items (sub-list) */
.nav-footer ul li ul {
    margin-left: 1em;
    /* indent second level */
}

.nav-footer ul li ul li a {
    font-weight: normal;
    color: var(--text-on-accent);
}

.breadcrumb {
    font-size: 14px;
    margin-bottom: 1em;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
    font-size: 1rem;
    padding-right: 0.7rem;
    padding-left: 0.7rem;
    border-right: 2px solid var(--primary);
}

.breadcrumb span {
    color: var(--text-on-secondary);
    font-size: 1rem;
    padding-left: 0.7rem;
}

.video_posts .wp-block-post-template {
    margin-bottom: 2rem;
}

.video_posts .wp-block-latest-posts__featured-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.video_posts .wp-block-latest-posts__post-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-on-primary);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

/* associados posts */

.associados_posts .wp-block-post-template {
    margin-bottom: 2rem;
}

.associados_posts li {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
}

/* Add border-bottom only if there are at least 2 more siblings after this li */
.associados_posts li:nth-last-child(n+3) {
    border-bottom: 1px solid #ddd;
}

/* Title */
.associados_posts .wp-block-latest-posts__post-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

/* Title */
.associados_posts .wp-block-latest-posts__post-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.associados_posts_mobile .wp-block-post-template {
    margin-bottom: 2rem;
}

.associados_posts_mobile li {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
}

/* Add border-bottom only in the first one */
.associados_posts_mobile li:first-child {
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

/* Title */
.associados_posts_mobile .wp-block-latest-posts__post-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

/* News Posts */
.news_posts .wp-block-post-template {
    margin-bottom: 2rem;
}

/* Thumbnail */
.news_posts .wp-block-latest-posts__featured-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Title */
.news_posts .wp-block-latest-posts__post-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

/* Excerpt / Description */
.news_posts .wp-block-latest-posts__post-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-on-accent);
}

.news_posts .wp-block-latest-posts__post-date {
    color: #555;
}

/* Home Posts*/
.home_posts .wp-block-post-template {
    margin-bottom: 2rem;
}

/* Thumbnail */
.home_posts .wp-block-latest-posts__featured-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Title */
.home_posts .wp-block-latest-posts__post-title {
    font-size: 1.5rem;
    color: var(--text-on-accent);
    text-decoration: none;
}

.home_posts .wp-block-latest-posts__post-title:hover {
    color: var(--primary);
}

/* Excerpt / Description */
.home_posts .wp-block-latest-posts__post-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-on-accent);
}

.home_posts .wp-block-latest-posts__post-date {
    color: #555;
}

.graphs_home {
    padding-top: 2rem;
    padding-bottom: 2rem;
    background-image: url('assets/images/home_bg.png');
    background-repeat: no-repeat;
    background-size: contain;
}

.graphs_home_grid {
    gap: 2rem;
}

.graphs_home_card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.graphs_home_card img {
    width: 100%;
    height: auto;
}

.institucional_card {
    padding-bottom: 1rem;
}

/* Container styling */
.nav-mobile {
    width: 100%;
    background: var(--drawer-background, #fff);
}

/* Level 1 items: full-width button/list links */
.nav-drawer li {
    list-style: none;
}

.nav-drawer li .menu-item-has-children,
.nav-drawer li a {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #fff;
    color: var(--text-on-accent);
    border: none;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.nav-drawer li .menu-item-has-children:hover,
.nav-drawer li a:hover {
    background-color: var(--accent);
}

/* Sub-menu hidden by default */
.nav-drawer .sub-menu {
    display: none;
}

.nav-drawer .sub-menu .menu-item a {
    display: block;
    padding: 12px 12px 12px 24px;
    background: #fff;
    color: var(--text-color, #333);
}

.nav-drawer .sub-menu .menu-item a:hover {
    background: var(--accent);
}

/* Active page highlight */
.nav-drawer a.current,
.nav-drawer .menu-item-has-children.current {
    background: var(--primary);
    color: var(--text-on-primary) !important;
}

/* Expand sub-menu when parent has .open */
.nav-drawer li.menu-item-has-children .sub-menu.open {
    display: block;
}

.certificacao_card {
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid var(--primary);
    margin: 1rem 15rem;
}

.certificacao_row {
    width: 100%;
    padding: 1rem 2rem;
}

.energia_fv_card_list {
    margin: 1rem 20rem;
}

.energia_fv_card {
    border-radius: 2rem;
    padding: 2rem;
}

.energia_fv_number {
    background-color: #68c3ee;
    border-radius: 50%;
    padding: 0.5em;
    width: 0.5em;
    height: 0.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.p-relative {
    position: relative;
    border-radius: 2rem;
}

.line_space_big {
    line-height: 2rem;
}

.energia_fv_acl {
    background-color: #f58529;
    outline: 5px solid #fff;
    border-radius: 50%;
    padding: 1em;
    top: -20%;
    position: absolute;
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    text-wrap: nowrap;
}

.energia_fv_acr {
    background-color: #ffcb05;
    outline: 5px solid #fff;
    border-radius: 50%;
    padding: 1em;
    top: -20%;
    position: absolute;
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    text-wrap: nowrap;
}

.h-100 {
    height: 100%;
}

.wpcf7-acceptance label,
.wpcf7-checkbox label,
.wpcf7-radio label {
    display: flex;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    margin-right: 1rem;
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: middle;
    accent-color: var(--primary);
}

input[type="radio"]:checked,
input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

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

select,
textarea,
input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--primary);
    border-radius: 1rem;
    background-color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

input[type="button"],
input[type="submit"] {
    background-color: var(--primary);
    color: var(--text-on-primary);
    width: auto;
    border: none;
    padding: 0.5rem 2rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
}

input::placeholder,
textarea::placeholder {
    color: #999;
}

.ouvidoria_number {
    background-color: var(--primary);
    border-radius: 50%;
    padding: 1em;
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.see-more-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 1rem;
}

.see-more-button:hover {
    background: var(--link-hover);
}

.see-more-button .disabled {
    color: #ccc;
    pointer-events: none;
}

.d-lg-none {
    display: none !important;
}

/* === Responsive Design === */

@media (max-width: 1024px) {
    .main_layout {
        padding: 1rem 2rem;
    }

    .energia_fv_card_list {
        margin: 1rem 2rem;
    }

    .horizontal_padding {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .horizontal_margin {
        margin-left: 2rem;
        margin-right: 2rem;
    }

    .header-main {
        padding: 1rem;
        align-items: center;
        gap: 1rem;
    }
}

@media (max-width: 768px) {

    .energia_fv_acl,
    .energia_fv_acr {
	margin-top: 2rem !important;
    }
    .d-lg-none {
        display: block !important;
    }

    .main_layout {
        padding: 1rem 1rem;
    }

    .energia_fv_card_list {
        margin: 1rem 5rem;
    }

    .d-xs-none {
        display: none !important;
    }

    .horizontal_padding {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .horizontal_margin {
        margin-left: 2rem;
        margin-right: 2rem;
    }

    .header-main {
        padding: 1rem;
        align-items: center;
        gap: 1rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        text-align: center;
    }

    .footer-top .footer-col {
        margin-bottom: 1.5rem;
    }

    .header-main nav.desktop-menu {
        display: none;
    }

    .header-main .menu-toggle {
        display: block;
    }

    .graphs_home_grid {
        grid-template-columns: 1fr !important;
    }

    .top-bar .left {
        display: none;
    }

    /* Escalar font */
    .top-bar .right .button-outline {
        font-size: 0.8rem;
    }

    .top-bar .right .button-secondary-filled {
        font-size: 0.8rem;
    }

    .certificacao_card {
        margin: 1rem 2rem;
    }

    .certificacao_row {
        width: 100%;
        padding: 1rem 1rem;
    }
}

.post-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary);
}

.post-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    flex-wrap: wrap;
}

.post-thumbnail {
    flex: 0 0 180px;
    margin-right: 1.5rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .post-thumbnail {
        flex: 0 0 100%;
        width: 100%;
        margin-right: 1.5rem;
        border-radius: 6px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }
}

.post-title {
    margin-top: 0;
    margin-bottom: 0.5em;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: #222;
    text-decoration: underline;
}

.post-meta {
    color: #888;
    font-size: 0.95em;
    margin-bottom: 0.5em;
}

.post-excerpt {
    font-size: 1.05em;
    color: #333;
    line-height: 1.6;
}

.pagination {
    text-align: center;
    margin: 2rem 0;
}

.evento-card {
    border-radius: 1rem;
}

.evento-date {
    border-radius: 1rem;
}

.evento-title {
    border-left: 5px solid var(--secondary);
    transition: border-color 0.3s;
}

.evento-title:hover {
    border-left: 5px solid white;
}

.dot-2013 li::marker {
    color: #29abe2;
}

.dot-2014 li::marker {
    color: #f15a24;
}

.dot-2015 li::marker {
    color: #8cc63f;
}

.dot-2016 li::marker {
    color: #8047dd;
}

.dot-2017 li::marker {
    color: #009245;
}

.dot-2018 li::marker {
    color: #ed1c24;
}

.dot-2019 li::marker {
    color: #fbb03b;
}

.dot-2020 li::marker {
    color: #00a99d;
}

.dot-2021 li::marker {
    color: #8c6239;
}

.dot-2022 li::marker {
    color: #ed1e79;
}

.dot-2023 li::marker {
    color: #009245;
}

.dot-2024 li::marker {
    color: #ed1c24;
}

.carousel-social-dots,
.carousel-dots {
    display: none;
    text-align: center;
    margin-top: 0.5rem;
}

.carousel-social-dots span,
.carousel-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
}

.carousel-social-dots span.active,
.carousel-dots span.active {
    background: #333;
}

@media (max-width: 768px) {
    .flex-col-reverse {
        flex-direction: column-reverse;
    }

    .post-list-carousel.video_posts {
        width: 100%;
    }

    .social-list-carousel,
    .post-list-carousel {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        display: flex !important;
        padding: 1rem !important;
        flex-wrap: nowrap !important;
        gap: 1rem !important;
    }

    .social-list-carousel .social-post,
    .post-list-carousel li {
        flex: 0 0 100%;
        scroll-snap-align: start;
    }

    .carousel-social-dots,
    .carousel-dots {
        display: block;
    }
}

.timeline-hidden {
    display: none;
}

.timeline-container {
    display: flex;
    max-width: 800px;
    margin: 50px auto;
}

.timeline-line {
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.timeline-line::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ddd;
}

.timeline-line img {
    z-index: 100;
}

.timeline-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid;
    margin: 30px 0;
    z-index: 1;
}

.timeline-content {
    flex: 1;
    padding-left: 30px;
}

.timeline-year {
    font-size: 1.5em;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.timeline-divider {
    height: 2px;
    background: #ccc;
    margin: 10px 0;
}

.timeline-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.align-stretch {
    align-items: stretch !important;
}

.timeline-list li {
    position: relative;
    margin: 5px 0;
    padding-left: 20px;
}

.timeline-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

.see-more {
    cursor: pointer;
    display: inline-block;
    text-decoration: underline;
    margin-top: 1rem;
    padding-bottom: 1rem;
}