/*
Theme Name: Baú do Velho
Theme URI: https://baudovelho.com.br
Author: Manus AI
Description: Um tema WordPress nativo, leve e de alta performance para blogs de HQs e Quadrinhos. Estilo Pop/Comic moderno.
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: bau-do-velho
*/

/* -------------------------------------------------------------------------
   VARIABLES
------------------------------------------------------------------------- */
:root {
    --color-primary: #fae21c;
    --color-accent: #ed6f1a;
    --color-secondary: #f6b128;
    --color-dark: #040100;
    --color-light: #f9f9f9;
    --color-white: #ffffff;
    --font-heading: 'Bebas Neue', cursive;
    --font-body: 'Inter', sans-serif;
    --border-width: 3px;
    --box-shadow: 6px 6px 0px 0px var(--color-dark);
    --transition: all 0.3s ease;
}

/* -------------------------------------------------------------------------
   RESET & BASE
------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-light);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .btn, .menu-item a {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* -------------------------------------------------------------------------
   HEADER
------------------------------------------------------------------------- */
.site-header {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 15px 0;
    border-bottom: var(--border-width) solid var(--color-primary);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.imgCabecalho {
    width: 100%;
    height: 280px;
    background: url(images/headerPage.jpg) top;
}

.site-logo img {
    max-width: 120px;
    height: auto;
}

.main-navigation ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

.main-navigation li {
    position: relative; /* Essential for dropdown positioning */
}

.main-navigation a {
    font-size: 1.2rem;
    color: var(--color-white);
    padding: 10px 0;
    display: block;
}

.main-navigation a:hover {
    color: var(--color-primary);
}

/* SUBMENU / DROPDOWN STYLES */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-dark);
    border: 2px solid var(--color-primary);
    box-shadow: 4px 4px 0px var(--color-dark);
    display: none; /* Hide by default */
    flex-direction: column;
    min-width: 200px;
    z-index: 100;
    gap: 0;
    padding: 10px 0;
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: 10px 20px;
    font-size: 1rem;
    white-space: nowrap;
}

.main-navigation ul ul a:hover {
    background-color: var(--color-primary);
    color: var(--color-dark);
}

/* SHOW DROPDOWN ON HOVER */
.main-navigation li:hover > ul {
    display: flex;
}

/* INDICATOR FOR SUBMENU */
.menu-item-has-children > a::after {
    content: ' ▼';
    font-size: 0.7rem;
    vertical-align: middle;
}

/* -------------------------------------------------------------------------
   HERO SECTION
------------------------------------------------------------------------- */
.hero-section {
    padding: 40px 0 20px;
    background-color: var(--color-white);
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 220px);
    gap: 20px;
    margin-bottom: 20px;
}

.hero-item {
    position: relative;
    overflow: hidden;
    border: var(--border-width) solid var(--color-dark);
    box-shadow: var(--box-shadow);
    background-color: var(--color-dark);
}

.hero-item:first-child {
    grid-row: span 2;
}

.hero-link-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: var(--transition);
}

.hero-item:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: var(--color-white);
    z-index: 3;
}

.hero-category {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 4px 12px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.hero-title {
    font-size: 2.2rem;
    line-height: 1;
}

.hero-title a:hover {
    color: var(--color-primary);
}

/* -------------------------------------------------------------------------
   MAIN LAYOUT
------------------------------------------------------------------------- */
.main-content-area {
    padding: 20px 0 60px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.content-left {
    flex: 1;
    min-width: 0; /* Prevent flex overflow */
}

.sidebar-right {
    flex: 0 0 320px;
}

/* -------------------------------------------------------------------------
   POST CARDS
------------------------------------------------------------------------- */
.post-card {
    background: var(--color-white);
    border: var(--border-width) solid var(--color-dark);
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    display: flex;
    overflow: hidden;
    width: 100%;
}

.post-card-image {
    flex: 0 0 300px;
    border-right: var(--border-width) solid var(--color-dark);
}

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

.post-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-card-category a {
    color: var(--color-accent);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.post-card-title {
    font-size: 2.2rem;
    margin: 10px 0;
    line-height: 1;
}

.post-card-title a:hover {
    color: var(--color-accent);
}

.post-card-excerpt {
    font-size: 1rem;
    color: #444;
    margin-bottom: 20px;
}

.btn-read-more {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-dark);
    padding: 10px 25px;
    border: 2px solid var(--color-dark);
    font-weight: bold;
    align-self: flex-start;
    box-shadow: 3px 3px 0px var(--color-dark);
}

.btn-read-more:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px var(--color-dark);
}

/* -------------------------------------------------------------------------
   SIDEBAR & WIDGETS
------------------------------------------------------------------------- */
.widget {
    background: var(--color-white);
    border: var(--border-width) solid var(--color-dark);
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: 5px 5px 0px var(--color-dark);
}

.widget-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 4px solid var(--color-primary);
    padding-bottom: 5px;
    display: inline-block;
}

.search-form {
    display: flex;
}

.search-field {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--color-dark);
    font-family: var(--font-body);
}

.search-submit {
    background: var(--color-dark);
    color: var(--color-white);
    border: none;
    padding: 0 20px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 10px 0;
    border-bottom: 1px dashed #ddd;
}

.widget li a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

/* -------------------------------------------------------------------------
   FOOTER
------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 60px 0 30px;
    border-top: var(--border-width) solid var(--color-accent);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-widget-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.95rem;
    opacity: 0.8;
}

/* -------------------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .main-content-area {
        flex-direction: column;
    }
    .sidebar-right {
        flex: 0 0 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .hero-item:first-child {
        height: 350px;
    }
    .hero-item {
        height: 250px;
    }
    .post-card {
        flex-direction: column;
    }
    .post-card-image {
        flex: 0 0 220px;
        border-right: none;
        border-bottom: var(--border-width) solid var(--color-dark);
    }
}
