/* Noticia Page Styles */

/* Container for news article + sidebar layout */
.news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.noticia {
    flex: 1;
    margin: 0;
    padding: 0;
}

.news-article {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Article Header Container */
.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
    padding: 2rem 2rem 0 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: -0.02em;
}

/* Article Meta */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 2rem;
    font-size: 0.875rem;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.article-meta .author {
    color: #444;
    font-weight: 500;
}

.article-meta .author a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.article-meta .author a:hover {
    color: #0d5bbd;
    text-decoration: underline;
}

.article-meta .date,
.article-meta .updated {
    color: #666;
}

.article-meta span:not(:first-child)::before {
    content: "•";
    margin: 0 0.5rem;
    color: #ccc;
}

/* Social Share Buttons */
.social-share {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.share-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-btn.facebook {
    background: linear-gradient(135deg, #3b5998 0%, #2d4373 100%);
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #1ea952 100%);
}

.share-btn.share {
    background: linear-gradient(135deg, #444 0%, #222 100%);
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

/* Article Image */
.article-image {
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
    background-color: #f5f5f5;
    line-height: 0;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Article Content */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #2c2c2c;
    padding: 2rem;
    font-family: Georgia, 'Times New Roman', serif;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: left;
}

.article-content p:first-child {
    font-size: 1.25rem;
    line-height: 1.7;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 4px solid #1a73e8;
}

.article-content p:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (min-width: 768px) {
    .news-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .noticia {
        max-width: 900px;
    }

    .sidebar-ad {
        flex-shrink: 0;
        width: 300px;
        position: sticky;
        top: 20px;
    }
}

@media (max-width: 767px) {
    .news-container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .news-article {
        border-radius: 6px;
    }

    .article-title {
        font-size: 1.875rem;
        padding: 1.5rem 1.5rem 0 1.5rem;
    }

    .article-meta {
        font-size: 0.8125rem;
        gap: 0.25rem;
        padding: 0 1.5rem;
    }

    .article-meta span:not(:first-child)::before {
        margin: 0 0.375rem;
    }

    .social-share {
        gap: 0.5rem;
        padding: 0 1.5rem;
    }

    .share-btn {
        padding: 0.625rem 1.125rem;
        font-size: 0.8125rem;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.7;
        padding: 1.5rem;
    }

    .article-content p:first-child {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .noticia {
        margin: 0.5rem auto;
        padding: 0 0.5rem;
    }

    .news-article {
        border-radius: 4px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .article-title {
        font-size: 1.5rem;
        line-height: 1.25;
        padding: 1.25rem 1.25rem 0 1.25rem;
    }

    .article-meta {
        font-size: 0.75rem;
        padding: 0 1.25rem;
    }

    .social-share {
        flex-wrap: wrap;
        padding: 0 1.25rem;
        gap: 0.5rem;
    }

    .share-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .article-content {
        font-size: 0.9375rem;
        line-height: 1.7;
        padding: 1.25rem;
    }

    .article-content p:first-child {
        font-size: 1.0625rem;
        padding-left: 0.75rem;
        border-left-width: 3px;
    }
}

/* Sidebar Ad Styles for News Page */
.sidebar-ad {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: none;
}

.sidebar-ad img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Show sidebar on desktop */
@media (min-width: 768px) {
    .sidebar-ad {
        display: block;
    }
}

/* ============================================
   RELATED NEWS SECTION - CUSTOM STYLES
   ============================================ */

.related-news-section {
    max-width: 1200px;
    margin: 3rem auto 2rem;
    padding: 0 1rem;
}

.related-news-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #1a73e8;
}

.related-news-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: -0.02em;
}

.related-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Card Style similar to secondary-news */
.related-news-card {
    position: relative;
    height: 250px;
    /* Fixed height for uniformity */
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
    overflow: hidden;
    background: #000;
    /* Fallback background */
}

.related-news-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: #fff;
}

.related-news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.related-news-link:hover .related-news-image {
    transform: scale(1.05);
}

/* Overlay Style */
.related-news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 30%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    z-index: 10;
    pointer-events: none;
    /* Allow clicks to pass through to the link */
}

/* Badge Style */
.related-news-badge {
    background-color: var(--primary);
    /* Use primary color or specific variable if available */
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 4px;
}

/* Badge variations */
/* Badge variations */
.related-news-badge[data-category] {
    background-color: var(--primary);
    background: var(--primary);
}


.related-news-heading {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.related-news-excerpt {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    color: #f0f0f0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.related-news-read-more {
    display: none;
    /* Hidden in this layout style */
}

/* Responsive Grid Layout */
@media (min-width: 640px) {
    .related-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .related-news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .related-news-section {
        margin: 4rem auto 3rem;
    }
}

/* Mobile optimizations */
@media (max-width: 639px) {
    .related-news-section {
        margin: 2rem auto 1.5rem;
        padding: 0 0.75rem;
    }

    .related-news-heading {
        font-size: 1rem;
    }

    .related-news-card {
        height: 220px;
    }
}