/*
Theme Name: Google News Style (Child)
Template: twentytwentyfive
Author: Antigravity
Version: 1.4
*/

/* Primary Colors: #CC3333 and #CC6666 */

body {
    background-color: #fcfcfc;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none !important;
    color: inherit;
    transition: color 0.3s;
}

/* Header Styling */
.site-header-custom {
    background: #fff;
    padding: 25px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.site-logo img {
    max-height: 70px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.site-title {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
}

.site-title a {
    color: #CC3333;
}

.site-description {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

/* Nav Bar - Formal Style */
.category-nav-bar {
    background: #CC3333;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}

.nav-container ul li a {
    display: block;
    padding: 15px 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid transparent;
}

.nav-container ul li a:hover {
    border-bottom: 3px solid #fff;
}

/* Grid Layout */
.news-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 30px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Headers */
.section-header {
    grid-column: span 12;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #CC3333;
}

.section-header h2 {
    margin: 0;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #CC3333;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Carousel Fixes */
.featured-carousel-container {
    position: relative;
    overflow: hidden;
    grid-column: span 8;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-article {
    position: relative;
    height: 450px;
}

.carousel-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
    z-index: 2;
}

.carousel-caption .post-title a {
    color: #fff !important;
    font-size: 1.95rem;
    font-weight: 700;
}

.carousel-caption .post-meta {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 8px 0;
}

.carousel-caption .post-excerpt {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Buttons and Dots */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    padding: 12px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: #CC3333;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
}

.carousel-dot.active {
    background: #fff;
    width: 10px;
    height: 10px;
}

/* Secondary Posts */
.secondary-posts {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.secondary-posts .post-card {
    padding: 0;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.secondary-posts .post-title {
    font-size: 0.95rem;
    font-weight: 700;
}

/* Category Grid Fixes */
.category-section-grid {
    grid-column: span 12;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
    margin: 40px 0;
}

.cat-column {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-top: 5px solid #CC3333;
    overflow: hidden;
    padding: 15px;
}

.cat-column h4 {
    color: #CC3333;
    padding: 20px 20px 10px;
    margin: 0;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
}

/* Horizontal Grid Fixes */
.horizontal-grid {
    grid-column: span 12;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
}

.horizontal-grid .post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    padding: 15px;
}

.horizontal-grid .post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* Pagination */
.gn-pagination {
    grid-column: span 12;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.gn-pagination .page-numbers {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 700;
}

.gn-pagination .current {
    background: #CC3333;
    color: #fff;
    border-color: #CC3333;
}

/* Footer */
.gn-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 24px 30px;
    margin-top: 80px;
    text-align: center;
}

.gn-footer ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.gn-footer ul li a {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.copyright-text {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 20px;
}

/* Resets para Single Post centralizado */
.single-post #primary,
.single-post .wp-site-blocks,
.single-post main {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

/* Single Post Advanced Layout */
.post-layout-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 800px 1fr !important;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto !important;
    padding: 30px 24px;
    align-items: start;
    width: 100%;
}

.post-content-column {
    min-width: 0;
    width: 800px;
}

.ad-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.ad-desktop-side {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.ad-placeholder {
    background: #f7f7f7 !important;
    border: 2px dashed #ddd !important;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    min-height: 600px;
    width: 100%;
}

.single-post-container {
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.single-post-container .entry-header {
    margin-bottom: 30px;
}

.single-post-container .entry-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333;
    line-height: 1.2;
    margin-bottom: 15px;
}

.single-post-container .entry-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.single-post-container .post-thumbnail {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.single-post-container .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post-container .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.single-post-container .entry-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Mobile Ad Modal */
.mobile-ad-modal {
    display: none;
    /* Hidden by default on desktop */
}

@media (max-width: 1200px) {
    .post-layout-wrapper {
        grid-template-columns: 1fr;
        max-width: 900px;
    }

    .ad-desktop-side {
        display: none;
    }
}

@media (max-width: 900px) {
    .single-post-container {
        padding: 25px 20px;
    }

    .single-post-container .entry-title {
        font-size: 1.8rem;
    }

    .mobile-ad-modal {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        padding: 5px;
    }

    .mobile-ad-content {
        position: relative;
        max-width: 320px;
        margin: 0 auto;
    }

    .mobile-ad-modal .ad-placeholder {
        min-height: 50px;
        background: #f8f8f8;
    }

    .close-ad {
        position: absolute;
        top: -10px;
        right: -10px;
        background: #333;
        color: #fff;
        border: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
}

.post-navigation .nav-links {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    max-width: 45%;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #CC3333;
    font-weight: 800;
    margin-bottom: 5px;
}

.post-navigation .nav-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.4;
}

@media (max-width: 900px) {

    .featured-carousel-container,
    .secondary-posts,
    .category-section-grid,
    .horizontal-grid,
    .single-post-container {
        grid-column: span 12;
    }

    .horizontal-grid {
        grid-template-columns: 1fr;
    }

    .category-section-grid {
        grid-template-columns: 1fr;
    }
}