/*
Theme Name: Portal Maloca
Theme URI: #
Author: Antigravity
Author URI: #
Description: Tema customizado para o Portal Maloca, com suporte a anúncios, agenda e destaques.
Version: 1.0.0
Text Domain: maloca
*/

:root {
    --primary-color: #92278f; /* Purple used in category badges */
    --secondary-color: #f15a24; /* Orange from the logo */
    --text-color: #333333;
    --text-light: #777777;
    --bg-color: #ffffff;
    --header-bg: #f9f9f9;
    --menu-bg: #333333;
    --border-color: #e0e0e0;
    --font-main: 'Roboto', sans-serif;
    --max-width: 1140px;
}

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

/* Reset & Utilities */
* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--primary-color); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 15px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* Grid System */
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col { padding: 0 15px; flex: 1; }
.col-70 { flex: 0 0 70%; max-width: 70%; }
.col-30 { flex: 0 0 30%; max-width: 30%; }
.col-100 { flex: 0 0 100%; max-width: 100%; }

/* Ad Containers */
.ad-container { text-align: center; margin: 20px 0; background: #f0f0f0; }
.ad-container img, .ad-container video { max-width: 100%; display: inline-block; }
.ad-placement-header { margin: 15px auto; }

/* Header */
.site-header { background: var(--header-bg); border-bottom: 2px solid var(--primary-color); position: sticky; top: 0; z-index: 1000; }
.header-logo-area { text-align: center; padding: 30px 0; }
.site-logo { max-height: 80px; display: inline-block; }
.header-nav-area { background-color: var(--menu-bg); color: #fff; }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 0 15px; height: 60px; }
.main-navigation { display: flex; align-items: center; height: 100%; }
.main-navigation ul { list-style: none; padding: 0; margin: 0; display: flex; height: 100%; }
.main-navigation ul li { margin-right: 25px; display: flex; align-items: center; }
.main-navigation ul li:last-child { margin-right: 0; }
.main-navigation ul li a { 
    color: #fff; 
    text-decoration: none; 
    text-transform: uppercase; 
    font-size: 14px; 
    font-weight: bold; 
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

@keyframes menuGlowJump {
    0% { transform: translateY(0); text-shadow: 0 0 0 transparent; }
    50% { transform: translateY(-3px); text-shadow: 0 4px 8px rgba(255, 255, 255, 0.4); }
    100% { transform: translateY(-2px); text-shadow: 0 2px 4px rgba(255, 255, 255, 0.6); }
}

.main-navigation ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 50%;
    background-color: var(--secondary-color);
    transition: all 0.3s ease-in-out;
    transform: translateX(-50%);
}

.main-navigation ul li a:hover { 
    animation: menuGlowJump 0.4s forwards;
    color: var(--secondary-color); 
}

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

.header-social { display: flex; align-items: center; gap: 20px; }
.header-social a { color: #fff; text-decoration: none; font-size: 18px; transition: transform 0.3s ease, color 0.3s ease; display: flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 50%; background: rgba(255,255,255,0.05); }
.header-social a:hover { color: var(--secondary-color); transform: scale(1.15) rotate(5deg); background: rgba(255,255,255,0.15); }
.header-social-search { display: flex; align-items: center; }
.header-social-search a { color: #fff; margin-left: 15px; }
.header-social-search a:hover { color: var(--secondary-color); }

/* Badges */
.category-badge {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
    border-radius: 3px;
}

/* Post Cards */
.post-card { margin-bottom: 30px; display: flex; flex-direction: column; }
.post-card-image { margin-bottom: 15px; }
.post-card-image img { width: 100%; height: 200px; object-fit: cover; }
.post-card-title { font-size: 1.2rem; margin: 0 0 10px; line-height: 1.4; }
.post-card-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 10px; }
.post-card-meta .dashicons { font-size: 16px; width: 16px; height: 16px; vertical-align: text-bottom; margin-right: 5px; }
.post-card-excerpt p { margin: 0; color: #555; font-size: 0.95rem; }

/* Front Page */
.featured-posts { padding: 40px 0 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 30px; }
.destaques-grid { display: flex; flex-direction: column; gap: 20px; }
.destaques-row { display: flex; gap: 20px; }
.destaque-col { flex: 1; }

.destaque-1-card { position: relative; overflow: hidden; border-radius: 5px; }
.destaque-1-card img { width: 100%; height: 400px; object-fit: cover; }
.destaque-1-card .destaque-placeholder { width: 100%; height: 400px; background: #ddd; }
.destaque-1-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%); color: #fff; }
.destaque-1-overlay .post-card-title { color: #fff; font-size: 2rem; margin-bottom: 5px; }
.destaque-1-overlay .post-card-meta { color: #ccc; }

.destaque-23-card { display: flex; flex-direction: column; border-radius: 5px; overflow: hidden; }
.destaque-23-card img { width: 100%; height: 200px; object-fit: cover; }
.destaque-23-card .destaque-placeholder { width: 100%; height: 200px; background: #ddd; }
.destaque-23-card .post-card-content { padding: 15px 0; }

.home-ad-section, .single-ad-section { margin: 30px 0; text-align: center; }

.section-title { border-bottom: 2px solid var(--primary-color); margin-bottom: 20px; display: flex; align-items: flex-end; }
.section-title h2, .section-title .title-text { background: var(--primary-color); color: #fff; margin: 0; padding: 6px 15px; font-size: 14px; text-transform: uppercase; font-weight: bold; border-radius: 4px 4px 0 0; display: inline-block; line-height: 1.2; }

/* Latest News List Layout */
.latest-news-list .post-card { flex-direction: row; align-items: flex-start; transition: all 0.3s ease; position: relative; }
.latest-news-list .post-card-image { flex: 0 0 250px; margin-right: 20px; margin-bottom: 0; position: relative; overflow: hidden; }

@keyframes cardFloat {
    0% { transform: translateY(0); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
    50% { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
    100% { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.12); }
}

@keyframes flashOverlay {
    0% { opacity: 0; }
    50% { opacity: 0.3; }
    100% { opacity: 0; }
}

.post-card { transition: all 0.3s ease; position: relative; z-index: 1; }
.post-card:hover { animation: cardFloat 0.5s forwards; z-index: 2; }

.post-card-image { position: relative; overflow: hidden; }
.post-card-image img { transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.post-card:hover .post-card-image img { transform: scale(1.08) rotate(1deg); }

.post-card-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}
.post-card:hover .post-card-image::before {
    animation: flashOverlay 0.6s ease-out forwards;
}
.latest-news-list .post-card-image img { height: 160px; }
.latest-news-list .post-card-content { flex: 1; }

/* Single Post */
.single-post-main { margin-top: 40px; margin-bottom: 40px; }
.single-header { margin-bottom: 20px; }
.single-title { font-size: 2.5rem; margin: 10px 0; line-height: 1.2; }
.single-subtitle { font-size: 1.2rem; color: var(--text-light); font-weight: 300; margin-bottom: 15px; }
.single-meta { font-size: 0.9rem; color: var(--text-light); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 10px 0; margin-bottom: 30px; }
.single-featured-image { margin-bottom: 30px; }
.single-featured-image img { width: 100%; height: auto; }
.single-entry-content { font-size: 1.1rem; line-height: 1.8; }
.single-entry-content p { margin-bottom: 20px; }

/* Veja Também Carousel */
.related-posts { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border-color); }
.carousel-container { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px; padding-bottom: 20px; }
.carousel-item { flex: 0 0 300px; scroll-snap-align: start; }
.carousel-item .post-card-image img { height: 180px; }

/* Sidebar */
.widget { margin-bottom: 30px; }
.widget-title { font-size: 1.2rem; background: var(--primary-color); color: #fff; padding: 10px 15px; margin-bottom: 15px; text-transform: uppercase; }

/* Mais Lidas Widget */
.mais-lidas-widget { background: #f2f2f2; border-radius: 0; overflow: hidden; }
.mais-lidas-widget .widget-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 2px solid #ffffff; margin-bottom: 0; }
.mais-lidas-widget .widget-title { margin: 0; background: transparent; color: #333; padding: 0; font-style: italic; font-weight: 300; font-size: 1.4rem; letter-spacing: 1px; }
.star-icon { color: #ffc107; font-size: 24px; width: 24px; height: 24px; }
.mais-lidas-item { display: flex; align-items: center; padding: 20px 25px; border-bottom: 2px solid #ffffff; text-decoration: none; transition: background-color 0.3s ease, transform 0.2s ease; }
.mais-lidas-item:hover { background-color: #e6e6e6; transform: translateX(5px); }
.mais-lidas-item:last-child { border-bottom: none; }
.mais-lidas-number { font-size: 50px; font-weight: 200; color: #333; margin-right: 25px; width: 35px; text-align: center; line-height: 1; font-family: sans-serif; transition: color 0.3s ease; }
.mais-lidas-title { flex: 1; font-size: 16px; font-weight: 400; color: #333; line-height: 1.3; transition: color 0.3s ease; }
.mais-lidas-item:first-child .mais-lidas-number,
.mais-lidas-item:first-child .mais-lidas-title { color: var(--secondary-color); }
.mais-lidas-item:hover .mais-lidas-title { color: var(--primary-color); }

/* Forms */
.search-form { display: flex; }
.search-field { flex: 1; padding: 10px; border: 1px solid var(--border-color); }
.search-submit, .btn-filter { background: var(--secondary-color); border: none; color: #fff; padding: 10px 20px; cursor: pointer; transition: background 0.2s; }
.search-submit:hover, .btn-filter:hover { background: #d64a1a; }

/* Agenda Page */
.agenda-main { margin-top: 40px; }
.agenda-filter-section { background: var(--header-bg); padding: 20px; margin-bottom: 30px; border: 1px solid var(--border-color); border-radius: 5px; }
.agenda-filter-form { display: flex; gap: 20px; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; }
.filter-group label { font-weight: bold; margin-bottom: 5px; }
.filter-group input { padding: 10px; border: 1px solid var(--border-color); }
.agenda-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }

/* Footer */
.site-footer { background: var(--menu-bg); color: #fff; padding: 40px 0 20px; margin-top: 40px; }
.footer-logo img { max-width: 200px; }
.footer-contact h3, .footer-social h3 { border-bottom: 1px solid #555; padding-bottom: 10px; margin-bottom: 15px; }
.social-links a { display: inline-block; width: 40px; height: 40px; background: #555; text-align: center; line-height: 40px; border-radius: 50%; margin-right: 10px; transition: background 0.2s; }
.social-links a:hover { background: var(--secondary-color); }
.social-links .dashicons { line-height: 40px; }
.site-info { text-align: center; border-top: 1px solid #555; margin-top: 30px; padding-top: 20px; font-size: 0.9rem; color: #aaa; }

/* Responsive */
@media (max-width: 768px) {
    .col-70, .col-30 { flex: 0 0 100%; max-width: 100%; }
    .destaques-row { flex-direction: column; }
    .latest-news-list .post-card { flex-direction: column; }
    .latest-news-list .post-card-image { flex: 0 0 auto; margin-right: 0; margin-bottom: 15px; }
    .agenda-filter-form { flex-direction: column; align-items: stretch; }
    .main-navigation ul { display: none; /* simple mobile menu fallback needed */ }
}
