/* ==========================================================================
   WP Blog Starter - Base CSS
   Structure based on Anamma portal layout
   ========================================================================== */

/* --- CSS Variables --- */
:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #fff;
    --border-color: #e0e0e0;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --font-family: 'Ubuntu Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-max: 1200px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* --- Container --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    gap: 1rem;
}

.logo img,
.logo .site-title {
    height: 40px;
}

.logo .site-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 40px;
}

/* --- Main Nav --- */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-nav .menu__item a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}

.main-nav .menu__item a:hover {
    background: var(--bg-color);
    color: var(--highlight-color);
}

/* --- Search Forms --- */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-form input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-form input:focus {
    border-color: var(--accent-color);
}

.search-form button {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.search-form button:hover {
    background: var(--highlight-color);
}

.mobile-search-form {
    display: none;
}

.header-search {
    display: none;
}

/* --- Mobile Menu Toggle --- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* ==========================================================================
   MAIN GRID LAYOUT
   ========================================================================== */
.site-main {
    padding: 1.5rem 1rem;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.post-page-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.category-page-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

/* ==========================================================================
   HOME - FEATURED ARTICLE
   ========================================================================== */
.featured-article {
    margin-bottom: 1.5rem;
}

.featured-article a {
    display: block;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s;
}

.featured-article a:hover {
    box-shadow: var(--shadow-hover);
}

.featured-image .image-container {
    width: 100%;
    aspect-ratio: 2/1;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-info {
    padding: 1rem 1.25rem;
    background: var(--white);
}

.featured-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ==========================================================================
   HOME - POSTS GRID
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s, transform 0.2s;
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.post-card a {
    display: block;
}

.post-card .image-container {
    width: 100%;
    aspect-ratio: 2/1;
    overflow: hidden;
}

.post-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card time {
    display: block;
    padding: 0.5rem 0.75rem 0;
    font-size: 0.75rem;
    color: var(--text-light);
}

.post-card h3 {
    padding: 0.25rem 0.75rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
}

/* ==========================================================================
   SECTION BLOCKS (Category sections on home)
   ========================================================================== */
.section-block {
    margin-top: 2.5rem;
}

.section-block h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--highlight-color);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s, transform 0.2s;
}

.info-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.info-card a {
    display: block;
}

.info-card img {
    width: 100%;
    aspect-ratio: 2/1;
    object-fit: cover;
}

.info-card time {
    display: block;
    padding: 0.5rem 0.75rem 0;
    font-size: 0.75rem;
    color: var(--text-light);
}

.info-card h3 {
    padding: 0.25rem 0.75rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}

.sidebar-block {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.sidebar-block h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--highlight-color);
}

.mais-lidos-list li {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.mais-lidos-list li + li {
    border-top: 1px solid var(--border-color);
}

.mais-lidos-list .image-container {
    flex-shrink: 0;
    width: 75px;
    height: 75px;
    border-radius: var(--radius);
    overflow: hidden;
}

.mais-lidos-list .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mais-lidos-list h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.mais-lidos-list h3 a:hover {
    color: var(--highlight-color);
}

.mais-lidos-list time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.read-more-link {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

.read-more-link:hover {
    color: var(--highlight-color);
}

.arrow-icon {
    margin-left: 0.25rem;
}

/* ==========================================================================
   SINGLE POST
   ========================================================================== */
.post-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.post-header {
    margin-bottom: 1.5rem;
}

.post-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-meta a {
    color: var(--accent-color);
    font-weight: 600;
}

.post-meta a:hover {
    color: var(--highlight-color);
}

.separator {
    margin: 0 0.25rem;
}

.post-featured-image {
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
}

/* --- Post Content --- */
.post-content-area {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.post-content-area h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2rem 0 0.75rem;
}

.post-content-area h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1.5rem 0 0.5rem;
}

.post-content-area p {
    margin-bottom: 1rem;
}

.post-content-area ul,
.post-content-area ol {
    margin: 0.75rem 0 1rem 1.5rem;
}

.post-content-area ul {
    list-style: disc;
}

.post-content-area ol {
    list-style: decimal;
}

.post-content-area li {
    margin-bottom: 0.5rem;
}

.post-content-area a {
    color: var(--accent-color);
    text-decoration: underline;
}

.post-content-area a:hover {
    color: var(--highlight-color);
}

.post-content-area blockquote {
    border-left: 4px solid var(--highlight-color);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    background: var(--bg-color);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.post-content-area img {
    border-radius: var(--radius);
    margin: 1rem 0;
}

/* --- References --- */
.references {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.references p {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.references ul {
    list-style: none;
    margin-left: 0;
}

.references li {
    font-size: 0.8rem;
    word-break: break-all;
}

/* --- Author Box --- */
.author-box {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    padding: 1.25rem;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.author-title a {
    color: var(--accent-color);
}

.author-title a:hover {
    color: var(--highlight-color);
}

.author-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ==========================================================================
   RELATED POSTS
   ========================================================================== */
.related-posts {
    margin-top: 2.5rem;
}

.related-posts h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--highlight-color);
}

/* ==========================================================================
   CATEGORY PAGE
   ========================================================================== */
.category-header {
    margin-bottom: 1.5rem;
}

.category-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.category-content .posts-grid {
    grid-template-columns: repeat(3, 1fr);
}

.catposts .image-container {
    aspect-ratio: 16/10;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination .page {
    display: inline-flex;
}

.pagination .page a,
.pagination .page span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: background 0.2s, color 0.2s;
}

.pagination .page a:hover {
    background: var(--accent-color);
    color: var(--white);
}

.pagination .page--current span {
    background: var(--accent-color);
    color: var(--white);
}

/* ==========================================================================
   PAGE (Static pages like "Quem Somos")
   ========================================================================== */
.pouso {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--primary-color);
    color: var(--white);
    margin-top: 3rem;
}

.footer-top {
    padding: 2.5rem 0 1.5rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-logo-box {
    text-align: center;
}

.footer-logo img,
.footer-logo .site-title {
    max-width: 350px;
    margin: auto;
}

.footer-col p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-col h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

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

.footer-col ul li a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem 0;
    text-align: center;
}

.footer-bottom ul {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-bottom li a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom li a:hover {
    color: var(--white);
}

/* ==========================================================================
   MOBILE OVERLAY
   ========================================================================== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.mobile-overlay.active {
    display: block;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .main-grid,
    .post-page-grid,
    .category-page-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-content .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .header-search {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background: var(--white);
        z-index: 999;
        padding: 1.5rem;
        overflow-y: auto;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
        flex-direction: column;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav .menu__item a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-search-form {
        display: flex;
        margin-bottom: 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .category-content .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 1.35rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .post-wrapper {
        padding: 1rem;
    }
}

/* --- Desktop search visible --- */
@media (min-width: 769px) {
    .header-search {
        display: block;
    }
}

/* --- Image containers generic --- */
.image-container {
    position: relative;
    overflow: hidden;
    background: var(--border-color);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-container:hover img {
    transform: scale(1.03);
}
