/* --- NEWS PREMIUM DESIGN SYSTEM (Turner Style) --- */

/* 1. LAYOUT & CONTAINERS */
.page--scope-noticia-detalle .container--large,
.page--scope-noticia-detalle .article-cta-section.prel {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: var(--master-axis-x, 8%);
    padding-right: var(--master-axis-x, 8%);
}

@media (min-width: 992px) {
    .page--scope-noticia-detalle .container--large,
    .page--scope-noticia-detalle .article-cta-section.prel {
        padding-left: 8%;
        padding-right: 8%;
    }
}

/* Fluid Section Padding */
.news-detail,
.page--scope-noticias main {
    padding-top: var(--vr-section-gap);
    padding-bottom: var(--vr-section-gap);
}

@media (max-width: 991px) {
    .news-detail,
    .page--scope-noticias main {
        padding-top: var(--vr-row-gap);
        padding-bottom: var(--vr-row-gap);
    }
}

.news-detail__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: stretch;
}

@media (min-width: 992px) {
    .news-detail__layout {
        grid-template-columns: 1fr 320px;
        gap: 8rem;
    }

    .news-detail__main {
        max-width: 1000px;
        margin-left: 0;
        margin-right: auto;
    }
}

/* Tablet fluid adjustment */
@media (min-width: 768px) and (max-width: 1199px) {
    .news-detail__main {
        width: 100%;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 2. HERO COMPONENT (Redesign for News Detail) */
body.page--scope-noticia-detalle .hero.hero--left .hero__content,
body.page--scope-noticias .hero.hero--left .hero__content {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding-left: 8%;
    padding-right: 8%;
}

@media (max-width: 991px) {
    body.page--scope-noticias .hero.hero--left .hero__content,
    body.page--scope-noticia-detalle .hero.hero--left .hero__content {
        padding-left: var(--master-axis-x, 8%);
        padding-right: var(--master-axis-x, 8%);
    }
}

body.page--scope-noticia-detalle .hero .hero__title,
.page--scope-noticias .hero .hero__title {
    font-size: clamp(2.3rem, 5vw, 4rem);
    font-weight: 300;
    line-height: var(--lh-tight);
}

body.page--scope-noticia-detalle .hero .hero__desc {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    opacity: 0.9;
}

/* Remove Hero Entrance Animation for News Detail */
body.page--scope-noticia-detalle .hero__content>* {
    animation: none;
    opacity: 1;
    transform: none;
}

/* 3. TYPOGRAPHY (Editorial Style) */
.page--scope-noticias .news-item h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 700;
    line-height: 1.3;
}

/* Reading Body Container */
.container--narrow {
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .container--narrow {
        width: 92%;
    }
}

/* Content Area */
body.page--scope-noticia-detalle .news-detail__content {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.8;
    color: #4b5563;
    font-weight: 300;
}

.news-detail__content p {
    margin-bottom: 32px;
}

.news-detail__content h2,
.news-detail__content h2.turner-title.fs-40 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    /* Scalable title */
    margin-top: 4rem;
    margin-bottom: 32px;
    color: #404041;
    font-weight: 300;
    text-transform: none;
    line-height: 1.2;
}

.news-detail__content .lead {
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    /* ~19px to 23px */
    font-weight: 300;
    color: var(--primary-color);
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* 4. IMAGES & GRID (Architectural Cut) */
.page--scope-noticia-detalle .news-detail__content img,
.page--scope-noticia-detalle .news-detail__featured img,
.page--scope-noticia-detalle .news-detail__grid-v img,
.page--scope-noticia-detalle .news-detail__image-c img {
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}

.news-detail__content img {
    width: 100%;
    height: auto;
    display: block;
    margin: 2.5rem 0;
}

.page--scope-noticia-detalle .news-detail__featured {
    height: auto;
    max-height: 700px;
    margin-bottom: 2.5rem;
    overflow: visible;
}

.page--scope-noticia-detalle .news-detail__featured img {
    height: auto;
    aspect-ratio: 16 / 9;
}

.news-detail__grid-v {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin: 2.5rem 0;
}

.news-detail__grid-v img {
    aspect-ratio: 4 / 5; /* Controlled vertical ratio */
    object-fit: cover;
    width: 100%;
}

@media (max-width: 991px) {
    .news-detail__grid-v {
        gap: 2rem; /* Reduced gap for tablet */
    }
}

@media (max-width: 576px) {
    .news-detail__grid-v {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.news-detail__image-c {
    margin: 2.5rem 0;
}

.page--scope-noticia-detalle .news-detail__featured-caption {
    padding: 2.5rem;
    color: var(--white);
    font-style: italic;
    border-bottom: none;
    opacity: 0.9;
    font-weight: 300;
}

/* 5. SIDEBAR (Boxed & Floating) */
.news-detail__sidebar {
    padding-top: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.news-detail__sidebar.is-visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 991px) {
    .news-detail__sidebar {
        opacity: 1;
        visibility: visible;
        margin-top: 2rem; /* Reduced to avoid double gap */
        margin-bottom: 2rem;
        padding-top: 0;
        border-top: none;
    }

    .sidebar__sticky {
        position: static;
        padding: 1.5rem;
        background-color: #f9f9f9;
        border: 1px solid #ebebeb;
    }
}

.sidebar__sticky {
    position: sticky;
    top: 120px;
    background-color: #f9f9f9;
    border: 1px solid #ebebeb;
    padding: 2.5rem;
    border-radius: 0; /* Premium 90 */
}

.sidebar__block {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #ebebeb;
}

.sidebar__block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar__kicker {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 0; /* Premium 90 */
    background: var(--gray-100);
    object-fit: contain;
    padding: 10px;
    border: 1px solid var(--gray-200);
}

.share-links-v {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.share-links-v a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 0; /* Premium 90 */
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.share-links-v a:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* --- NEWS LISTING: EDITORIAL TURNER SYSTEM (2.0) --- */

/* --- MODULE A: RESPONSIVE STRUCTURE & MASTER AXIS X --- */
/* Scoped to main to avoid breaking header/footer containers */
body.page--scope-noticias main .container {
    width: 100%;
    max-width: 100%;
    padding-left: 8%;
    padding-right: 8%;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    body.page--scope-noticias main .container {
        padding-left: 5%;
        padding-right: 5%;
    }
}

body.page--scope-noticias .news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for desktop */
    gap: 4rem 3rem; /* Adjusted for 3 columns */
    margin-top: 2rem;
}


@media (max-width: 1199px) {
    body.page--scope-noticias .news-list {
        grid-template-columns: repeat(2, 1fr); /* Back to 2 columns for smaller desktops and tablets */
        gap: 3rem 2.5rem;
    }
}

@media (max-width: 767px) {
    body.page--scope-noticias .news-list {
        grid-template-columns: 1fr; /* Stack in 1 column only for mobile */
        gap: 3rem;
    }
}

@media (max-width: 480px) {
    body.page--scope-noticias .news-list {
        gap: 2.5rem;
    }
}

/* ELIMINADO: El Hero de noticias ahora usa la clase global .hero--listing */

/* 1. CINEMATIC FEATURED NEWS (Double-class specificity to avoid override by regular card) */
body.page--scope-noticias .news-item.news-item--featured {
    grid-column: 1 / -1; /* Full width */
    display: grid; /* No here to allow JS style="display:none" to work */
    grid-template-columns: 1.3fr 1fr;
    gap: 0;
    margin-bottom: 0;
    border-bottom: none; /* Removed the line below featured news */
    background: transparent;
}

body.page--scope-noticias .news-item--featured .news-item-header {
    height: 480px; /* Reduced from 600px for a more elegant desktop scale */
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body.page--scope-noticias .news-item--featured .news-image {
    height: 100%;
    margin-bottom: 0;
}

body.page--scope-noticias .news-item--featured .news-content {
    padding: 4rem 4rem 4rem 5rem;
}

body.page--scope-noticias .news-item--featured h3 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -2px;
}

/* --- MODULE B: ADAPTACIÓN RESPONSIVA (DESTACADA) --- */
@media (max-width: 1200px) {
    body.page--scope-noticias .news-item.news-item--featured .news-content {
        padding: 4rem 3rem;
    }
}

@media (max-width: 991px) {
    body.page--scope-noticias .news-item.news-item--featured {
        grid-template-columns: 1fr; /* Stack vertical */
    }

    body.page--scope-noticias .news-item.news-item--featured .news-item-header {
        height: auto; /* Fixed: Removed fixed height to eliminate empty space */
        margin-bottom: 1rem; /* Aligned with regular news-image margin */
    }

    body.page--scope-noticias .news-item.news-item--featured .news-content {
        padding: 0.5rem 0; /* Aligned with regular news-content padding */
    }

    body.page--scope-noticias .news-item.news-item--featured .news-image {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    /* Reducción Tipográfica para Tablet/Móvil */
    body.page--scope-noticias .news-item.news-item--featured h3 {
        font-size: 2.25rem; /* More balanced than 3.5rem on tablet */
    }
}

@media (max-width: 480px) {
    body.page--scope-noticias .news-item.news-item--featured .news-item-header {
        height: auto; /* Fixed: Removed fixed height for mobile too */
    }

    body.page--scope-noticias .news-item.news-item--featured h3 {
        font-size: 1.75rem; /* Precise for mobile readability */
        letter-spacing: -1px;
    }

    body.page--scope-noticias .news-item h3 {
        font-size: 1.35rem; /* Refined for regular cards on mobile */
    }

    body.page--scope-noticias .news-badge {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }
}

/* 2. PREMIUM NEWS CARD (Editorial Turner) */
body.page--scope-noticias .news-item {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    transition: opacity 1.4s var(--motion-bezier-premium), 
                transform 1.4s var(--motion-bezier-premium);
    display: flex;
    flex-direction: column;
    transform: translateY(15px); /* Desplazamiento reducido para suavidad editorial */
}

/* El estado activo elimina el desplazamiento */
body.page--scope-noticias .news-item.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

body.page--scope-noticias .news-item:hover {
    transform: none;
    box-shadow: none;
}

body.page--scope-noticias .news-item-link-wrapper {
    text-decoration: none;
    display: block;
    color: inherit;
}

body.page--scope-noticias .news-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* Standardized Architectural Aspect Ratio */
    height: auto;
    border-radius: 0; /* Premium 90 */
    overflow: hidden;
    margin-bottom: 1rem; /* Reduced from 2.5rem */
    position: relative;
    background: var(--gray-100); /* Placeholder color during load */
}

body.page--scope-noticias .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures any image size fills the container correctly */
    display: block;
    transition: transform 1.2s cubic-bezier(0.2, 0, 0.2, 1);
}

body.page--scope-noticias .news-image:hover img {
    transform: scale(1.08); /* Cinematic zoom limited to image hover */
}

body.page--scope-noticias .news-badge {
    position: static;
    display: block;
    background: transparent;
    color: var(--accent-color);
    padding: 0;
    margin-bottom: 1.25rem;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 2px;
    box-shadow: none;
}

body.page--scope-noticias .news-content {
    padding: 0.5rem 0 1.5rem 0; /* Reduced top padding from 1.5rem to 0.5rem */
}

body.page--scope-noticias .news-date {
    display: block; /* Ensures it stays above the title */
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 0.75rem; /* Reduced space between date and title */
}

body.page--scope-noticias .news-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 1.5rem;
}

body.page--scope-noticias .news-item h3 {
    margin: 0; /* Reset all default margins to control exactly from wrappers */
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 300;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 0; /* Margin moved to link wrapper */
    position: relative;
    display: inline-block;
}

/* Underline Animation like indicators */
body.page--scope-noticias .news-item h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.page--scope-noticias .news-item:hover h3::after {
    transform: scaleX(1);
    transform-origin: left;
}

body.page--scope-noticias .news-item p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

body.page--scope-noticias .news-link {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 15px;
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
}

body.page--scope-noticias .news-link i {
    color: var(--accent-color);
    transform: none;
}

/* Redundant rules removed as they are now handled in Module A/B/C above */

/* End of News Premium Styles */

/* --- FILTER BAR: EDITORIAL NAV --- */
body.page--scope-noticias .news-filters-bar {
    background: transparent;
    border-bottom: none;
    padding: var(--vr-row-gap) 0 0 0;
    position: relative;
    z-index: 100;
}

body.page--scope-noticias .filters-container {
    display: flex;
    justify-content: flex-start; /* Aligned with Master Axis X */
    gap: 1rem;
}

body.page--scope-noticias .filter-link {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--gray-500);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 0.7rem 1.8rem;
    border-radius: 0; /* Premium 90 */
    transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}

body.page--scope-noticias .filter-link.active {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(87, 139, 49, 0.2);
}

body.page--scope-noticias .filter-link:hover:not(.active) {
    background: var(--gray-100);
    color: var(--primary-color);
    border-color: var(--gray-300);
    transform: translateY(-2px);
}

body.page--scope-noticias .filter-link::after {
    display: none;
}

@media (max-width: 991px) {
    body.page--scope-noticias .news-filters-bar {
        padding: 2.5rem 0 1rem 0;
    }

    body.page--scope-noticias .filters-container {
        justify-content: center; /* Center on tablet if they fit */
        padding-bottom: 0.5rem;
    }

    body.page--scope-noticias .filter-link {
        padding: 0.5rem 1.4rem;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    body.page--scope-noticias .filters-container {
        justify-content: flex-start; /* Start-aligned for scrolling */
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0 5% 1rem 5%; /* Align with Master Axis X padding */
        gap: 0.75rem;
        margin-left: -5%; /* Break container padding to allow edge-to-edge scroll */
        margin-right: -5%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    body.page--scope-noticias .filters-container::-webkit-scrollbar {
        display: none;
    }

    body.page--scope-noticias .filter-link {
        white-space: nowrap;
        flex: 0 0 auto;
    }
}

/* Typography Refinement */
body.page--scope-noticias .hero__title span {
    color: var(--accent-color);
    font-weight: 600;
}
