/**
 * Modulo: news-page
 * Layout: Hero 2 colonne (presentation-style) + contenuto scorrevole
 * Sistema: CSS Variables, BEM, mobile-first, glass morphism, img-3d
 */

/* ========================================
   LAYOUT PRINCIPALE
   ======================================== */

   .news-page {
    position: relative;
    background: var(--gradient-dark);
    color: var(--text-primary);
    width: 100%;
}

/* ========================================
   HERO SECTION (2 colonne)
   ======================================== */

.news-page__hero {
    position: relative;
    min-height: auto;
    width: 100%;
}

/* Colonna Testo (SX) */
.news-page__text-col {
    order: 1;
    display: flex;
    align-items: center;
    /* min-height: 100vh; */
}

.news-page__hero-content {
    padding: var(--space-3xl) var(--space-md);
    max-width: 600px;
}

/* Colonna Immagine (DX) */
.news-page__image-col {
    order: 2;
    height: 100%;
    position: relative;
}

.news-page__image-wrapper {
    position: relative;
    height: 100%;
    overflow: hidden;
    min-height: 100vh;
}

.news-page__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ========================================
   META TAGS (data + categoria)
   ======================================== */

.news-page__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    margin-bottom: var(--space-xl);
}

.news-page__date {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--bg-glass-hover);
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.news-page__date::before {
    content: '\f017';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary);
}

.news-page__category {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(var(--primary-rgb), 0.13);
    border: 1px solid var(--primary);
    border-radius: var(--radius-full);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.news-page__category::before {
    content: '\f02d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* ========================================
   TITOLO E EXCERPT
   ======================================== */

.news-page__title {
    font-family: var(--font-display);
    font-size: var(--text-h1);
    font-weight: 600;
    line-height: 0.9;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    text-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
}

.news-page__excerpt {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.625;
    margin-bottom: var(--space-lg);
}

/* ========================================
   CONTENUTO ARTICOLO (sotto hero)
   ======================================== */

.news-page__article {
    position: relative;
    /* background: var(--gradient-dark); */
    padding-bottom: var(--space-4xl);
    /* min-height: 50vh; */
    padding-top: var(--space-xl);
}

.news-page__content {
    /* position: relative; */
    /* background: var(--bg-glass); */
    /* backdrop-filter: blur(20px); */
    /* border: 1px solid var(--bg-glass-hover); */
    /* border-radius: var(--radius-lg); */
    /* padding: var(--space-3xl); */
    /* font-family: var(--font-primary); */
    /* font-size: 1.125rem; */
    /* line-height: 1.7; */
    /* color: var(--text-secondary); */
    /* box-shadow: var(--shadow-lg); */
    /* max-width: 900px; */
    margin: 0 auto;
}

.news-page__content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(
        180deg,
        var(--primary) 0%,
        var(--accent) 100%
    );
    border-radius: var(--radius-sm);
}

/* Typography nel contenuto */
.news-page__content h1,
.news-page__content h2,
.news-page__content h3,
.news-page__content h4,
.news-page__content h5,
.news-page__content h6 {
    color: var(--text-primary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.news-page__content h1:first-child,
.news-page__content h2:first-child,
.news-page__content h3:first-child {
    margin-top: 0;
}

.news-page__content p, .news-page__content * {
    margin-bottom: var(--space-md);
    /* line-height: 1.7; */
    text-align: left!important;
}

.news-page__content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(var(--primary-rgb), 0.3);
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

.news-page__content a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.news-page__content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
    font-style: italic;
    color: var(--text-primary);
    background: rgba(var(--primary-rgb), 0.05);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
}

.news-page__content ul,
.news-page__content ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-xl);
    list-style: disc;
}

.news-page__content ul {
    list-style-type: disc;
}

.news-page__content ol {
    list-style-type: decimal;
}

.news-page__content li {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.news-page__content strong,
.news-page__content b {
    color: var(--text-primary);
    font-weight: 600;
}

.news-page__content em,
.news-page__content i {
    font-style: italic;
}

.news-page__content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-md);
}

/* ========================================
   STATO VUOTO
   ======================================== */

.news-page__empty-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.news-page__empty {
    text-align: center;
    padding: var(--space-4xl) var(--space-lg);
    max-width: 600px;
    margin: 0 auto;
}

.news-page__empty-title {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
}

.news-page__empty-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--bg-glass-hover);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.news-page__empty::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 4rem;
    color: rgba(var(--primary-rgb), 0.3);
    display: block;
    margin-bottom: var(--space-lg);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Mobile: Immagine prima, testo dopo */
@media (max-width: 767px) {
    .news-page__text-col {
        /* order: 2; */
        min-height: auto;
    }
    
    .news-page__image-col {
        order: 1;
    }
    
    .news-page__image-wrapper {
        min-height: 50vh;
        height: 50vh;
    }
    
    .news-page__hero-content {
        padding: var(--space-4xl) var(--space-md);
    }
    
    .news-page__title {
        font-size: 4rem;
    }
    
    .news-page__meta {
        /* flex-direction: column; */
        /* align-items: flex-start; */
        /* gap: var(--space-sm); */
    }
    
    .news-page__content {
        /* padding: var(--space-xl); */
        /* font-size: 1rem; */
    }
    
    .news-page__empty-title {
        font-size: 3.5rem;
    }
}

/* Mobile small */
@media (max-width: 480px) {
    .news-page__hero-content {
        padding: var(--space-lg) var(--space-sm);
    }
    
    .news-page__title {
        font-size: 3.5rem;
    }
    
    .news-page__content {
        padding: var(--space-lg);
    }
    
    .news-page__empty-title {
        font-size: 3rem;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .news-page__image-wrapper {
        /* min-height: 100vh; */
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .news-page__hero-content {
        padding: var(--space-3xl) var(--space-xl);
    }
    
    .news-page__content {
        padding: var(--space-4xl);
        font-size: 1.25rem;
    }
}

/* ========================================
   ANIMAZIONI E TRANSIZIONI
   ======================================== */

.news-page__hero-content {
    animation: fadeInLeft 0.8s ease-out;
    margin: auto;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.news-page__image-col {
    animation: fadeInRight 0.8s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.news-page__content {
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ACCESSIBILITÃ€
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .news-page__hero-content,
    .news-page__image-col,
    .news-page__content,
    .news-page__image {
        animation: none;
        transition: none;
    }
}

@media (prefers-contrast: high) {
    .news-page__content {
        border: 2px solid var(--primary);
        background: var(--bg-primary);
    }
    
    .news-page__date,
    .news-page__category {
        border-width: 2px;
    }
}
