/* ==========================================================================
   1. VARIABLES & CONFIG
   ========================================================================== */
:root {
    /* Typography */
    --font-primary: 'Barlow Semi Condensed', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    
    --font-size-xl: 2rem;
    --font-size-lg: 1.5rem;
    --font-size-md: 1.25rem;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;

    --line-height-base: 1.1;
    --letter-spacing-base: 0%;

    /* Colors */
    --base_dark_003: #555555;
    --base_dark_002: #757575;
    --base_dark_001: #A5A5A5;
    
    --base_clean_004: #FFFFFF;
    --base_clean_003: #EFEFEF;
    --base_clean_002: #E2E2E2;
    --base_clean_001: #C3C3C3;
    
    --action_color_001: #5B7163;

    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Effects */
    --shadow-sm: 0px 4px 8px 0px rgba(0, 0, 0, 0.3);
    --text-shadow-dark: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-base);
    letter-spacing: var(--letter-spacing-base);
    color: var(--base_dark_002);
    background-color: var(--base_dark_003);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-base);
    letter-spacing: var(--letter-spacing-base);
    color: var(--base_dark_003);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

ul, ol { list-style: none; }
img { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; }
main { display: block; }

/* Utility Classes */
.barlow-light { font-weight: var(--font-weight-light); }
.barlow-medium { font-weight: var(--font-weight-medium); }
.barlow-italic { font-style: italic; }

/* ==========================================================================
   3. ACCESSIBILITY (Screen Readers)
   ========================================================================== */
.screen-reader-text,
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 10px;
    clip: auto;
    overflow: visible;
    z-index: 1000;
    background-color: var(--base_clean_004);
    color: var(--action_color_001);
    text-align: center;
}

/* ==========================================================================
   4. COMPONENT STYLES (MOBILE FIRST DEFAULT)
   ========================================================================== */

/* --- Header & Navigation --- */
.site-header {
    width: 100%;
    min-height: 100px;
    padding: 0 var(--spacing-sm, 24px) var(--spacing-md, 32px);
    position: absolute;
    z-index: 10;
}

.site-header .site-title {
    position: absolute;
    top: 104px;
    left: 24px;
    font-size: 48px;
    font-weight: var(--font-weight-medium, 500);
    color: var(--base_clean_004);
    line-height: var(--line-height-base);
    z-index: 50;
    text-shadow: var(--text-shadow-dark);
}

.page-template-template-full-text .site-header .site-title {
    top: -120px;
}

.menu-toggle {
    display: block;
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 100;
    width: 56px;
    height: 56px;
    padding: 12px;
    background-color: var(--base_clean_001);
    background-image: url('../images/menu-hamburguer.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 32px 32px;
    border: none;
    border-radius: 32px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.open_navigation > .menu-toggle {
    background-image: url('../images/close.svg');
}

.main-navigation {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 4px;
    background-color: transparent;
}

.open_navigation {
    position: fixed;
    padding: 24px;
    background-color: var(--base_clean_003);
    border-radius: 0 0 16px 0;
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.main-navigation ul {
    display: none;
}

.open_navigation ul {
    display: block;
    margin-top: 80px;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    color: var(--base_dark_003);
}

.main-navigation li {
    margin-bottom: 8px;
}

/* --- Hero Banner --- */
.hero-banner {
    display: block;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.featured-post {
    width: 100%;
    height: 100vh;
    box-shadow: var(--shadow-sm);
}

.single-post .featured-post {
    height: 85vh;
    max-height: 915px;
}

.featured-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.single-page .featured-post img {
    object-position: top;
}

.featured-post-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 21.5vh;
    width: 100%;
    padding: 0 24px;
    box-sizing: border-box;
}

.featured-post-caption .featured-link {
    display: block;
    text-align: right;
}

.featured-post-caption .featured-link .featured-title {
    margin: 0 0 16px 0;
    font-size: var(--font-size-lg);
    color: var(--base_clean_004);
    text-shadow: var(--text-shadow-dark);
}

/* --- Posts Layout (Grid & Items) --- */
.latest-posts, 
.single-post-content {
    width: 100%;
    padding: 16px 24px;
    box-sizing: border-box;
    background-color: var(--base_clean_003);
    border-radius: 16px;
    margin: -20vh 50% 0 50%;
    transform: translateX(-50%);
    box-shadow: var(--shadow-sm);
}

.single-post-content {
    margin-top: -1vh;
}

.full-text-post .single-post-content {
    margin-top: 210px;
}

.section-title {
    margin: 0 0 24px 0;
    font-size: var(--font-size-lg);
    color: var(--base_dark_003);
}

.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0 0 24px 0;
    padding: 0;
    list-style: none;
}

.post-thumb {
    position: relative;
    width: 100%;
    height: 327px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    padding: 8px;
    background-color: var(--base_clean_002);
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

.category-tag {
    position: absolute;
    bottom: 16px;
    left: 0px;
    color: var(--base_dark_003);
    padding: 6px 8px 6px 48px;
    border-radius: 0 8px 8px 0;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    margin: 0;
    background-image: url(../images/mini_tag.svg);
    background-color: rgba(226, 226, 226, 0.7);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: 12px center;
}

.post-content {
    padding: 8px;
    background-color: var(--base_clean_002);
    min-height: 130px;
}

/* Ajuste mobile specific */
@media (max-width: 767px) {
    .post-content {
        padding: 8px 24px 24px 24px;
    }
}

.post-item h3 {
    margin: 0 0 8px 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--base_dark_003);
}

.post-item > a > div:last-of-type p {
    margin: 0 0 12px 0;
    font-size: var(--font-size-md);
    color: var(--base_dark_002);
    line-height: var(--line-height-base);
}

.cta-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--action_color_001);
    color: var(--base_clean_004);
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.cta-button:hover {
    opacity: 0.8;
}

/* --- About Box --- */
a.about-box-cta { display: block; width: 100%; }

.about-intro-box {
    box-sizing: border-box;
    border-radius: var(--border-radius-lg);
    background-color: var(--base_clean_002);
    padding: 8px;
    min-height: 136px;
    box-shadow: var(--shadow-sm);
}

.about-intro-box img {
    width: 128px;
    height: 120px;
    border-radius: var(--border-radius-sm);
    float: left;
    object-fit: cover;
}

.about-intro-box h3 {
    margin: 0 0 8px 144px;
    font-size: var(--font-size-md);
    color: var(--base_dark_003);
}

.about-intro-box p {
    margin: 0 0 0 144px;
    font-size: var(--font-size-base);
    color: var(--base_dark_002);
}

/* --- Pagination --- */
.pagination {
    display: block;
    text-align: center;
    margin: 24px 0 0 0;
}

.pagination a {
    display: inline-block;
    background-color: var(--base_dark_001);
    color: var(--base_clean_004);
    font-weight: 500;
    font-size: var(--font-size-md);
    width: calc(50% - 10px);
    padding: 8px 0;
    border-radius: 8px;
    margin: 0 4px;
}

a.next-page-link { border-radius: 0 8px 8px 0; }
a.prev-page-link { border-radius: 8px 0 0 8px; }

a.single-link {
    border-radius: 8px;
}

/* --- Footer --- */
.site-footer {
    position: relative;
    margin-top: 36px;
    width: 100%;
}

.footer-navigation {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
}

.footer-navigation ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0 0 0 24px;
    padding: 0;
}

.footer-navigation a {
    display: block;
    padding: 8px 0;
    margin-left: 24px;
    font-size: var(--font-size-md);
    color: var(--base_clean_003);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-navigation a:hover {
    color: var(--base_clean_001);
    text-decoration: underline;
}

.copyright-text {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 120px;
    padding-bottom: 24px;
    box-sizing: border-box;
    font-size: var(--font-size-base);
    color: var(--base_dark_003);
    background-image: url(../images/faixa-branca-mobile.png);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}

/* --- Single Post Specifics --- */
.featured-single-image .featured-post-caption {
    position: absolute;
    width: 100%;
    padding: 0 24px;
    box-sizing: border-box;
    z-index: 1;
    pointer-events: auto;
    display: block;
    text-align: right;
}

.featured-single-image .featured-post-caption a.featured-link {
    display: inline-block;
    background-image: url(../images/search-plus.svg);
    background-repeat: no-repeat;
    height: 56px;
    width: 56px;
    line-height: 999px; /* Fallback */
    overflow: hidden;
}

.title-single-post {
    display: inline-block;
    width: calc(50% - 8px);
    vertical-align: top;
    margin: 0 0 16px 0;
    box-sizing: border-box;
}

.single-post-content h2 {
    margin: 0 0 4px 0;
    font-size: var(--font-size-xl);
}

.post-meta-tags {
    display: inline-block;
    width: calc(49% - 8px);
    vertical-align: top;
    margin-left: 16px;
    margin-bottom: 24px;
    box-sizing: border-box;
    background-color: var(--base_clean_002);
    padding: 8px;
    border-radius: var(--border-radius-sm);
}

.post-meta-tags .category-tag,
.post-meta-tags .media-tag {
    background-color: var(--base_clean_002);
    position: unset;
    padding: 6px 0px 6px 36px;
    border-radius: 0;
    margin: 0;
    background-position: left center;
    color: var(--base_dark_003);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    background-repeat: no-repeat;
    background-size: contain;
}

.media-tag { background-image: url(../images/round-brush.svg); }

.post-text-content p {
    margin: 0 0 24px 0;
    font-size: var(--font-size-md);
    color: var(--base_dark_003);
    line-height: var(--line-height-base);
}

.post-text-content p a {
    font-weight: var(--font-weight-medium);
    text-decoration: underline;
}

.wp-caption {
    max-width: 100%;
    margin: 0 0 24px 0;
    padding: 8px;
    box-sizing: border-box;
    border-radius: var(--border-radius-sm);
    background-color: var(--base_clean_002);
}

.wp-caption img { border-radius: var(--border-radius-sm); }
.wp-caption p { margin: 8px 0 0 0; font-size: var(--font-size-sm); }

/* Ajuste mobile single post */
@media (max-width: 767px) {
    .title-single-post,
    .post-meta-tags {
        display: block;
        width: 100%;
        margin: 0px 0 16px 0;
    }
}

/* ==========================================================================
   5. MODAL & OVERLAY (ALL DEVICES)
   ========================================================================== */
.overlay-modal {
    position: fixed; 
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.5); 
    display: none; 
    z-index: 999; 
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-modal.is-active {
    display: block;
    opacity: 1;
}

.modal-full-image {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%); 
    width: 92vw; height: 92vh;
    background-color: var(--base_clean_004, #FFFFFF); 
    z-index: 1000;
    overflow: hidden; /* Scroll acontece no wrapper interno */
    display: none; 
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: var(--border-radius-lg);
    border: solid 4px var(--base_dark_001);
    box-shadow: var(--shadow-sm);
}

.modal-full-image.is-active {
    display: flex; /* Para centralizar o wrapper */
    opacity: 1;
    transform: translate(-50%, -50%) scale(1); 
    justify-content: center; 
    align-items: center;
}

.modal-content-wrapper {
    width: 100%;
    height: 100%;
    overflow: auto; /* Scroll aqui */
    display: flex; /* Flex para centralizar imagem menor que a tela */
    justify-content: center;
    align-items: center;
}

.modal-full-image img {
    max-width: none; /* Permite tamanho real */
    height: auto;
    width: auto;
    display: block;
    /* Centralização robusta com Flexbox no pai */
    margin: auto; 
    flex-shrink: 0;
    margin-left: 700px;
}

.close-modal {
    position: fixed;
    top: 10px; right: 30px;
    background: var(--base_clean_004);
    box-shadow: var(--shadow-sm);
    border-radius: 30px;
    border: none;
    cursor: pointer;
    color: var(--base_dark_003, #222);
    height: 50px; width: 50px;
    background-image: url(../images/close.svg);
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1001;
    /* Texto escondido acessivelmente via span interno (screen-reader-text) ou text-indent */
}

/* ==========================================================================
   6. MEDIA QUERIES (PROGRESSIVE ENHANCEMENT)
   ========================================================================== */

/* --- Tablet (768px - 1279px) --- */
@media (min-width: 768px) and (max-width: 1279px) {
    .posts-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .post-thumb { height: 220px; }
    .pagination a { width: 192px; }

    .copyright-text { background-image: url(../images/faixa-branca-desktop.png); }

    .footer-navigation ul {
        flex-direction: row;
        gap: 24px;
    }

    .footer-navigation a { margin-left: 0; }
}

/* --- Desktop (>= 1280px) --- */
@media (min-width: 1280px) {

    /* Header & Navigation Transition */
    .site-header {
        position: fixed;
        top: 0; left: 50%;
        transform: translateX(-50%);
        width: 1280px; height: 152px;
        background-color: var(--base_clean_003);
        border-radius: 0 0 16px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 24px;
        margin: 0 auto;
        box-shadow: var(--shadow-sm);
        transition: height 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
    }

    .site-header.scrolled { height: 80px; }

    .menu-toggle { display: none; }

    .site-header .site-title {
        position: static;
        margin: 0;
        padding-top: 32px;
        color: var(--base_dark_003);
        font-size: 48px;
        text-shadow: none;
        transition: font-size 0.4s ease, padding-top 0.4s ease;
    }

    .site-header.scrolled .site-title {
        font-size: 38.4px; 
        padding-top: 0;
    }

    .site-header .main-navigation {
        position: static;
        width: auto;
        padding-top: 80px;
        margin-left: auto;
        background-color: transparent;
        transition: padding-top 0.4s ease;
    }

    .site-header.scrolled .main-navigation {
        padding-top: 0;
    }

    .main-navigation ul {
        display: flex;
        gap: 24px;
        margin: 0;
    }
    
    .main-navigation li { width: 100px; height: 40px; margin-bottom: 0; }

    /* Nav Link Animations */
    .main-navigation a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%; height: 100%;
        position: relative;
    }

    .main-navigation a:hover { text-decoration: none; }

    .main-navigation a::after {
        content: ''; 
        position: absolute;
        bottom: 0; left: 0;
        width: 100%; height: 8px;
        background-color: var(--base_dark_002);
        transform: scaleX(0); 
        transform-origin: center; 
    }

    @keyframes border-grow-in {
        from { transform: scaleX(0); }
        to { transform: scaleX(1); }
    }

    .main-navigation .current_page_item a::after {
        animation: border-grow-in 0.7s ease 1 forwards;
    }

    /* Layout Adjustments */
    .featured-post { height: 760px; }
    
    .single-post .featured-post { height: 100vh; } /* 1280-1439 fix */

    .latest-posts, 
    .single-post-content {
        margin: -90px 50% 0 50%;
        width: 100%;
        max-width: 1280px;
    }

    .full-text-post .single-post-content { margin-top: 170px; }

    .posts-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .post-thumb { height: 324px; }

    /* Featured Caption & About Box */
    .featured-post-caption {
        position: relative;
        bottom: unset;
        left: 50%;
        transform: translateX(-50%);
        margin: -250px 0 110px 0;
        max-width: 1280px;
        display: flex;
        align-items: flex-end;
        gap: 32px;
        pointer-events: none;
    }

    .single-post .featured-post-caption { margin: -160px 0 110px 0; }

    .featured-post-caption .featured-link {
        flex: 1 1 50%;
        text-align: left;
        pointer-events: auto;
    }

    .featured-post-caption .featured-link .featured-title {
        margin: 0;
        font-size: var(--font-size-lg);
        align-self: flex-end;
    }

    a.about-box-cta {
        width: 50%;
        margin-left: auto;
        pointer-events: auto;
    }

    .about-intro-box { min-height: 211px; }
    
    .about-intro-box img { width: 208px; height: 195px; }
    
    .about-intro-box h3 { margin: 56px 0 8px 216px; }
    .about-intro-box p { margin: 0 0 0 216px; }

    /* Footer & Pagination */
    .pagination a { width: 192px; }
    
    .copyright-text {
        height: 200px;
        background-image: url(../images/faixa-branca-desktop.png);
    }
    
    .footer-navigation ul {
        flex-direction: row;
        gap: 24px;
    }
    
    .footer-navigation a { margin-left: 0; }
}

/* --- Large Desktop Adjustments --- */
@media (min-width: 1440px) {
    .single-post .featured-post { height: 95vh; }
}

@media (min-width: 1680px) {
    .featured-post { height: 850px; }
}

@media (min-width: 1920px) {
    .single-post .featured-post { height: 95vh; }
}

/* ==========================================================================
   7. DESTAQUES DE IMAGENS DENTRO DOS POSTS
   ========================================================================== */

.alignright {
    float: right;
    margin: 16px 0 16px 16px;
}

.alignleft {
    float: left;
    margin: 16px 16px 16px 0;
}