/*
Theme Name: AricaMía Theme
Theme URI: https://aricamia.cl
Author: AricaMía
Description: Theme moderno para el portal de noticias e información de Arica, Chile.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: aricamia
*/

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

:root {
    --primary: #800020;
    --primary-dark: #5c0017;
    --accent: #39518e;
    --accent-light: #4a6ab5;
    --text: #333;
    --text-light: #666;
    --bg: #f5f5f5;
    --white: #fff;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 6px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

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

/* === LAYOUT === */
.site-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === TOPBAR === */
.topbar {
    background: var(--primary-dark);
    color: #fff;
    font-size: 0.8rem;
    padding: 6px 0;
}
.topbar .site-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar a { color: rgba(255,255,255,0.8); }
.topbar a:hover { color: #fff; }

/* === HEADER === */
.site-header {
    background: #fff;
    color: var(--text);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--primary);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-logo a {
    display: flex;
    align-items: center;
}
.site-logo img {
    height: 38px;
    width: auto;
}

/* === NAVIGATION === */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
}
.main-nav a {
    color: var(--text);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav .current-menu-item a {
    background: var(--primary);
    color: #fff;
}

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* === HERO / FEATURED === */
.featured-section {
    margin: 30px 0;
}
.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
.featured-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 400px;
    background: var(--primary-dark);
}
.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}
.featured-main .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
}
.featured-main .overlay h2 { font-size: 1.6rem; margin-bottom: 8px; }
.featured-main .overlay .meta { font-size: 0.85rem; opacity: 0.8; }

.featured-sidebar { display: flex; flex-direction: column; gap: 20px; }
.featured-side-item {
    flex: 1;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    min-height: 185px;
    background: var(--accent);
}
.featured-side-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
}
.featured-side-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
}
.featured-side-item .overlay h3 { font-size: 1rem; }

/* === CATEGORY BLOCKS (Homepage) === */
.category-section {
    margin: 40px 0;
}
.category-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 10px;
}
.category-section .section-header h2 {
    font-size: 1.4rem;
    color: var(--primary);
}
.category-section .section-header a {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* === ARTICLE CARD === */
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.article-card .card-image {
    height: 180px;
    overflow: hidden;
    background: var(--border);
}
.article-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.article-card:hover .card-image img { transform: scale(1.05); }
.article-card .card-body { padding: 18px; }
.article-card .card-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 10px;
}
.article-card h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 10px;
}
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--primary); }
.article-card .card-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 10px;
}
.article-card .card-meta {
    font-size: 0.78rem;
    color: #999;
}

/* === SINGLE POST === */
.single-post-header {
    margin: 30px 0 20px;
}
.single-post-header .post-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 12px;
}
.single-post-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text);
}
.single-post-header .post-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}
.single-post-header .post-meta span { margin-right: 15px; }

.post-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-bottom: 50px;
}

.post-content {
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.post-content p { margin-bottom: 1.2em; }
.post-content h2 { font-size: 1.5rem; margin: 1.5em 0 0.8em; color: var(--primary-dark); }
.post-content h3 { font-size: 1.25rem; margin: 1.3em 0 0.6em; }
.post-content ul, .post-content ol { margin: 1em 0; padding-left: 1.8em; }
.post-content li { margin-bottom: 0.5em; }
.post-content blockquote {
    border-left: 4px solid var(--primary);
    margin: 1.5em 0;
    padding: 15px 20px;
    background: rgba(128,0,32,0.04);
    font-style: italic;
}
.post-content img {
    border-radius: var(--radius);
    margin: 1.5em 0;
}

/* === SIDEBAR === */
.sidebar .widget {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}
.sidebar .widget h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}
.sidebar .widget ul { list-style: none; }
.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget li a { color: var(--text); }
.sidebar .widget li a:hover { color: var(--primary); }

/* === HOMEPAGE PROMO BANNERS === */
.promo-banner-section {
    margin: 50px 0 30px;
}
.promo-banner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}
.promo-banner {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    padding: 35px 30px;
    color: #fff !important;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.promo-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    color: #fff !important;
}
.promo-casino {
    background: linear-gradient(135deg, #800020, #b8002e);
}
.promo-apuestas {
    background: linear-gradient(135deg, #39518e, #4a6ab5);
}
.promo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 12px;
}
.promo-banner h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    line-height: 1.3;
}
.promo-banner p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 15px;
    line-height: 1.5;
}
.promo-cta {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.promo-banner:hover .promo-cta {
    background: rgba(255,255,255,0.35);
}

@media (max-width: 768px) {
    .promo-banner-grid { grid-template-columns: 1fr; }
}

/* === SIDEBAR PROMO WIDGETS === */
.widget-promo {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
    color: #fff;
    text-align: center;
}
.widget-promo h3 {
    color: #fff !important;
    border-bottom-color: rgba(255,255,255,0.3) !important;
}
.widget-promo p {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 15px;
    opacity: 0.9;
}
.promo-btn {
    display: inline-block;
    background: #fff;
    color: var(--primary) !important;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: var(--primary-dark) !important;
}
.promo-btn-alt {
    background: var(--accent-light);
    color: #fff !important;
}
.promo-btn-alt:hover {
    background: var(--accent);
    color: #fff !important;
}

/* === ARCHIVE / LISTING === */
.archive-header {
    margin: 30px 0 25px;
}
.archive-header h1 {
    font-size: 1.8rem;
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    padding-bottom: 12px;
}
.archive-header p {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.archive-list .article-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    margin-bottom: 20px;
}
.archive-list .article-card .card-image { height: 100%; min-height: 180px; }

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 40px 0;
}
.pagination a, .pagination span {
    padding: 10px 16px;
    background: var(--white);
    border-radius: var(--radius);
    font-size: 0.9rem;
    box-shadow: var(--shadow);
}
.pagination .current {
    background: var(--primary);
    color: #fff;
}

/* === BREADCRUMBS === */
.breadcrumbs {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 15px 0;
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs .separator { margin: 0 6px; }

/* === FOOTER === */
.site-footer {
    background: #1a1a1a;
    color: rgba(255,255,255,0.7);
    padding: 50px 0 0;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.9rem; line-height: 1.6; }

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

/* === SEARCH === */
.search-form {
    display: flex;
    gap: 10px;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}
.search-form input[type="search"]:focus {
    border-color: var(--accent);
    outline: none;
}
.search-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
}
.search-form button:hover { background: var(--primary-dark); }

/* === 404 === */
.page-404 {
    text-align: center;
    padding: 80px 20px;
}
.page-404 h1 { font-size: 5rem; color: var(--primary); }
.page-404 h2 { font-size: 1.5rem; margin: 15px 0 25px; }
.page-404 .search-form { max-width: 500px; margin: 0 auto; }

/* === PAGE === */
.page-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 30px 0;
    max-width: 800px;
}
.page-content h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
}
.page-content p { margin-bottom: 1.2em; }
.page-content h2 { font-size: 1.4rem; margin: 1.5em 0 0.8em; color: var(--primary-dark); }
.page-content ul, .page-content ol { margin: 1em 0; padding-left: 1.8em; }
.page-content li { margin-bottom: 0.5em; }

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .featured-grid { grid-template-columns: 1fr; }
    .featured-main { min-height: 300px; }
    .featured-sidebar { flex-direction: row; }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .post-content-wrapper { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) and (min-width: 993px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 15px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border);
    }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav a { display: block; padding: 12px 15px; }

    .articles-grid { grid-template-columns: 1fr; }
    .featured-sidebar { flex-direction: column; }

    .archive-list .article-card { grid-template-columns: 1fr; }
    .archive-list .card-image { height: 200px; }

    .single-post-header h1 { font-size: 1.5rem; }
    .post-content { padding: 20px; }
    .page-content { padding: 25px; }
    .footer-grid { grid-template-columns: 1fr; }
}
