/*
Theme Name: Allegra Estúdio Blog
Theme URI: https://www.allegraestudio.com.br
Description: Tema único e personalizado para o Blog da Allegra Estúdio Pilates.
Version: 1.4.0
Author: Parceiro de Programação
Author URI: https://www.allegraestudio.com.br
Text Domain: allegra-blog
*/

/* ==========================================================================
   1. Variáveis Globais e Configurações Base (Cantos Retos 0px)
   ========================================================================== */
:root {
    --font-family: 'Montserrat', sans-serif;
    --color-primary-text: #1A1A1A;
    --color-body-text: #333333;
    --color-bg-light: #F9F9FB;
    --color-bg-white: #FFFFFF;
    --color-border: #E0E0E0;
    --color-accent: #079179;
    --color-accent-hover: #056b59;
    --color-success: #2E7D32;
    --color-error: #C62828;
    --color-warning: #F57C00;

    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
    --radius-pill: 0px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0px !important; 
}

body {
    font-family: var(--font-family);
    font-weight: 300;
    font-size: 16px;
    color: var(--color-body-text);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

.site-main {
    flex: 1;
}

/* ==========================================================================
   2. Classes de Layout (Utilitários)
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-wide {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

h1, h2 {
    color: var(--color-primary-text);
    font-size: 40px;
    font-weight: 300;
    margin-bottom: 24px;
    line-height: 1.2;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent-hover);
}

/* ==========================================================================
   3. Componente: Header (Texto Preto no Hover + Linha Sempre Verde)
   ========================================================================== */
.site-header {
    background-color: var(--color-bg-white);
    padding: 20px 0;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    display: block;
    max-width: 138px;
    height: auto;
}

.mobile-menu-toggle,
.mobile-menu-close,
.drawer-overlay {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 300;
    color: var(--color-primary-text);
    text-decoration: none;
    padding: 10px 0;
    display: inline-block;
    transition: color 0.2s ease;
}

/* Hover: Apenas o texto muda para preto */
.nav-menu a:hover {
    color: var(--color-primary-text); 
    font-weight: 600;
}

/* Item ativo permanente permanece em verde destaque */
.nav-menu li.current-menu-item a {
    color: var(--color-accent);
    font-weight: 600;
}

/* CORREÇÃO: Linha inferior decorativa - Sempre Verde (#079179) */
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent); /* Mantém o verde fixo da marca */
    transition: width 0.2s ease;
}

/* Ativa a expansão da linha mantendo a cor verde original */
.nav-menu a:hover::after,
.nav-menu li.current-menu-item a::after,
.nav-menu li.active a::after {
    width: 100%;
}

.header-socials {
    display: flex;
    gap: 18px;
    align-items: center;
}

.header-socials a {
    color: #079179;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.header-socials a:hover {
    transform: scale(1.15);
}

/* ==========================================================================
   4. Componente: Footer (Rodapé com Assinatura Incandescente)
   ========================================================================== */
.site-footer {
    background-image: url('https://www.allegraestudio.com.br/Resources/images/bkg-76a04b10-1920w.png');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 40px 0 0 0;
    text-align: center;
    width: 100%;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo img {
    max-width: 198px;
    height: auto;
    margin-bottom: 24px;
}

.footer-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    gap: 20px;
    padding: 0;
    margin-bottom: 24px;
}

.footer-menu a {
    color: #ffffff;
    font-size: 15px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-menu a:hover {
    opacity: 0.8;
}

.footer-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 60%;
    margin-bottom: 24px;
}

.footer-info {
    font-size: 14px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.footer-info a {
    color: #ffffff;
    text-decoration: none;
}

.footer-phones span {
    opacity: 0.5;
    margin: 0 5px;
}

.footer-copyright {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    width: 100%;
}

.copyright-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.copyright-content p {
    font-size: 13px;
    margin: 0;
    color: #ffffff;
}

.logo-incandescente {
    height: 18px;
    width: auto;
    display: block;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.logo-incandescente:hover {
    opacity: 1;
}

/* ==========================================================================
   5. Página Inicial (index.php) + Barra de Pesquisa
   ========================================================================== */
.blog-intro {
    padding: 60px 0 40px 0;
    text-align: center;
}

.blog-intro h1 {
    font-size: 38px;
    font-weight: 300;
    color: var(--color-primary-text);
    margin-bottom: 12px;
}

.blog-intro p {
    color: #666666;
    font-size: 16px;
}

.blog-search-container {
    max-width: 480px;
    margin: 24px auto 0 auto;
}

.blog-search-form {
    display: flex;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-white);
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 300;
    outline: none;
    color: var(--color-body-text);
}

.search-button {
    background-color: var(--color-accent);
    color: #ffffff;
    padding: 0 20px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-button:hover {
    background-color: var(--color-accent-hover);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.post-card {
    background-color: var(--color-bg-white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.post-thumbnail img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.thumbnail-placeholder {
    width: 100%;
    height: 260px;
    background-color: var(--color-border);
    color: #999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.post-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-category-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-accent);
    background-color: rgba(7, 145, 121, 0.08);
    padding: 4px 10px;
    letter-spacing: 0.5px;
}

.post-date {
    font-size: 12px;
    color: #888888;
    text-transform: uppercase;
    font-weight: 500;
}

.post-title a {
    color: var(--color-primary-text);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 12px;
    display: block;
}

.post-title a:hover {
    color: var(--color-accent);
}

.post-excerpt p {
    font-size: 14px;
    color: var(--color-body-text);
    margin-bottom: 20px;
    line-height: 1.6;
}

.post-readmore {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent);
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-pagination {
    text-align: center;
    margin: 40px 0 60px 0;
}

.blog-pagination .nav-links {
    display: inline-flex;
    gap: 8px;
}

.blog-pagination a, 
.blog-pagination .current {
    padding: 10px 16px;
    background-color: var(--color-bg-white);
    color: var(--color-primary-text);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--color-border);
}

.blog-pagination a:hover,
.blog-pagination .current {
    background-color: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

/* ==========================================================================
   6. Página Interna (single.php)
   ========================================================================== */
.single-post-container {
    width: 100%;
    max-width: 100%;
    margin: 40px 0 60px 0;
    background-color: var(--color-bg-white);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.single-post-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-body-text);
    width: 100%;
    max-width: 100%;
}

.single-post-content p {
    margin-bottom: 24px;
}

.single-post-footer {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.post-navigation-links {
    display: flex;
    justify-content: space-between;
}

.post-navigation-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary-text);
}

.post-navigation-links a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   7. Responsividade Completa (Menu Lateral Deslizante Mobile)
   ========================================================================== */
@media (max-width: 900px) {
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--color-accent);
        font-size: 24px;
        cursor: pointer;
    }

    .drawer-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        backdrop-filter: blur(2px);
    }

    .drawer-overlay.active {
        opacity: 1;
        pointer-events: all;
    }

    .header-navigation {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100vh;
        background-color: var(--color-bg-white);
        z-index: 999;
        padding: 30px 24px;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .header-navigation.active {
        transform: translateX(0);
    }

    .mobile-menu-close {
        display: block;
        align-self: flex-end;
        background: none;
        border: none;
        color: var(--color-primary-text);
        font-size: 24px;
        cursor: pointer;
        margin-bottom: 40px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
        width: 100%;
    }

    .nav-menu a {
        font-size: 16px;
        width: 100%;
        padding: 5px 0;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
    .footer-menu {
        flex-direction: column;
        gap: 12px;
    }
    .footer-divider {
        width: 80%;
    }
    .single-post-container {
        padding: 20px;
    }
    .header-socials {
        display: none;
    }
}