/* ==============================================================================
   news.css — Portale news.agi-one.ai (stile AGI-ONE dark)
============================================================================== */

:root {
    --news-bg: #090b1a;
    --news-card-bg: rgba(15, 23, 42, 0.78);
    --news-card-border: rgba(255, 255, 255, 0.12);
    --news-text: #ffffff;
    --news-muted: #94a3b8;
    --news-secondary: #cbd5e1;
    --news-accent-ai: #6366f1;
    --news-accent-tech: #06b6d4;
    --news-accent-science: #10b981;
    --news-accent-robotic: #fb7185;
    --news-accent-blog: #f59e0b;
}

body[data-marketing-shell="news"] {
    background: radial-gradient(circle at 50% 0%, #15193c 0%, #090b1a 65%, #05060e 100%) !important;
    color: var(--news-text) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
}

/* Override stili globali chiari (h1–h3 / footer / navbar ereditano spesso #0f172a) */
body[data-marketing-shell="news"] h1,
body[data-marketing-shell="news"] h2,
body[data-marketing-shell="news"] h3,
body[data-marketing-shell="news"] h4 {
    color: #ffffff !important;
}

body[data-marketing-shell="news"] .navbar {
    background: rgba(9, 11, 26, 0.92) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-marketing-shell="news"] .nav-link,
body[data-marketing-shell="news"] .logo-text {
    color: #e2e8f0 !important;
}

body[data-marketing-shell="news"] .nav-link:hover,
body[data-marketing-shell="news"] .nav-link[aria-current="page"] {
    color: #ffffff !important;
}

body[data-marketing-shell="news"] .footer {
    background: #070816 !important;
    color: var(--news-secondary) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-marketing-shell="news"] .footer-link,
body[data-marketing-shell="news"] .footer-tagline,
body[data-marketing-shell="news"] .footer-bottom p {
    color: var(--news-secondary) !important;
}

.news-brand-badge {
    font-size: 0.72rem;
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.6);
    padding: 2px 7px;
    border-radius: 6px;
    color: #c7d2fe;
    margin-left: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.news-search-form {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 0.2rem 0.35rem 0.2rem 0.85rem;
}

.news-search-form input {
    background: transparent;
    border: 0;
    color: #fff;
    min-width: 11rem;
    font-size: 0.9rem;
    outline: none;
}

.news-search-form input::placeholder {
    color: var(--news-muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.news-hero {
    padding: 3.5rem 0 1.5rem;
    text-align: center;
}

.news-hero__badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.5);
    color: #c7d2fe;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.news-hero h1 {
    margin: 1rem auto 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    color: #fff;
    max-width: 18ch;
    line-height: 1.15;
}

.news-hero h1 .gradient-text {
    background: linear-gradient(120deg, #a5b4fc, #67e8f9, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.news-hero__lead {
    max-width: 42rem;
    margin: 0 auto;
    color: var(--news-secondary);
    font-size: 1.05rem;
    line-height: 1.55;
}

.news-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem auto 2.5rem;
    max-width: 1100px;
    padding: 0 1rem;
}

.news-section-card {
    display: block;
    text-decoration: none;
    padding: 1.35rem 1.25rem;
    border-radius: 18px;
    border: 1px solid var(--news-card-border);
    background: var(--news-card-bg);
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    color: inherit;
}

.news-section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.news-section-card[data-section="ai"] { border-color: rgba(99, 102, 241, 0.45); }
.news-section-card[data-section="tech"] { border-color: rgba(6, 182, 212, 0.45); }
.news-section-card[data-section="science"] { border-color: rgba(16, 185, 129, 0.45); }
.news-section-card[data-section="robotic"] { border-color: rgba(251, 113, 133, 0.5); }
.news-section-card[data-section="blog"] { border-color: rgba(245, 158, 11, 0.45); }

.news-section-card__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--news-muted);
    margin-bottom: 0.4rem;
}

.news-section-card h2 {
    margin: 0 0 0.45rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    color: #fff;
}

.news-section-card p {
    margin: 0;
    color: var(--news-secondary);
    font-size: 0.92rem;
    line-height: 1.45;
}

.news-block {
    max-width: 1100px;
    margin: 0 auto 2.75rem;
    padding: 0 1rem;
}

.news-block__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.news-block__head h2 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    color: #ffffff !important;
}

.news-block__head span {
    color: #94a3b8 !important;
    font-size: 0.85rem;
}

.news-featured {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 860px) {
    .news-featured {
        grid-template-columns: 1fr;
    }

    .news-search-form input {
        min-width: 7rem;
    }

    .news-back-site {
        display: none;
    }
}

.news-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid var(--news-card-border);
    background: var(--news-card-bg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
    min-height: 100%;
}

.news-card:hover {
    border-color: rgba(165, 180, 252, 0.5);
    transform: translateY(-3px);
}

.news-card__media {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card__media-fallback {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #a5b4fc;
    opacity: 0.85;
}

.news-card__body {
    padding: 1.15rem 1.2rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}

.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    font-size: 0.78rem;
    color: var(--news-muted);
}

.news-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.news-pill--ai { color: #c7d2fe; border-color: rgba(99, 102, 241, 0.45); }
.news-pill--tech { color: #a5f3fc; border-color: rgba(6, 182, 212, 0.45); }
.news-pill--science { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.45); }
.news-pill--robotic { color: #fda4af; border-color: rgba(251, 113, 133, 0.5); }
.news-pill--blog { color: #fcd34d; border-color: rgba(245, 158, 11, 0.45); }

.news-card h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    line-height: 1.3;
    color: #fff;
}

.news-card p {
    margin: 0;
    color: var(--news-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
    flex: 1;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.1rem;
}

.news-empty,
.news-status {
    text-align: center;
    color: var(--news-muted);
    padding: 2rem 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

.news-article {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}

.news-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: var(--news-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.news-article h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

.news-article__subtitle {
    color: var(--news-secondary);
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0 0 1.5rem;
}

.news-article__cover {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--news-card-border);
}

.news-article__cover img {
    width: 100%;
    display: block;
}

.news-article__body {
    color: var(--news-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.news-article__body h3 {
    color: #fff;
    font-family: 'Outfit', sans-serif;
    margin: 1.75rem 0 0.75rem;
}

.news-article__body p {
    margin: 0 0 1rem;
}

.news-article__source {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.news-article__source a {
    color: #a5b4fc;
}
