/*
 * Archivio13 — componenti del sito pubblico (homepage, categoria, articolo).
 * Si appoggia alle variabili e ai bottoni definiti in theme.css.
 */

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.container-wide {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ---------------------------------------------------------------- */
/* Header                                                             */
/* ---------------------------------------------------------------- */

.site-header {
    background: #000;
    border-bottom: 1px solid var(--a13-border);
    padding: 1.4rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-header .brand {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    text-decoration: none;
}

.site-header .brand strong {
    font-family: 'Rock Salt', cursive;
    font-weight: normal;
    color: var(--a13-red);
    text-shadow: 0 0 8px var(--a13-red-glow);
    font-size: 1.6rem;
}

.site-header .tagline {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--a13-text-dim);
}

.site-nav {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--a13-text);
    text-decoration: none;
    font-size: 0.92rem;
}

.site-nav a:hover {
    color: var(--a13-red-bright);
}

/* ---------------------------------------------------------------- */
/* Elementi comuni                                                    */
/* ---------------------------------------------------------------- */

.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--a13-text-muted);
    margin: 0 0 1rem;
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--a13-red-bright);
    box-shadow: 0 0 8px var(--a13-red-glow);
    flex: none;
}

.badge {
    display: inline-block;
    align-self: flex-start;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--a13-border-strong);
    color: var(--a13-red-bright);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 3rem 0 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-heading h2 {
    margin: 0;
}

.section-heading .subtitle {
    color: var(--a13-text-dim);
    font-size: 0.9rem;
}

/* ---------------------------------------------------------------- */
/* Immagini decorative "a bagliore" per gli articoli senza foto       */
/* ---------------------------------------------------------------- */

.media-glow {
    position: relative;
    width: 100%;
    height: 100%;
    background: #050505;
}

.media-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 45% 45%, var(--glow-color) 0%, transparent 68%);
    filter: blur(8px);
    opacity: 0.8;
}

.glow-1 { --glow-color: #2f6b52; }
.glow-2 { --glow-color: #b9432c; }
.glow-3 { --glow-color: #4a3d8f; }
.glow-4 { --glow-color: #2e6b6b; }
.glow-5 { --glow-color: #b9752c; }
.glow-6 { --glow-color: #3a3a5c; }

.media-glow .placeholder-label {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 1;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

/* ---------------------------------------------------------------- */
/* Storia in evidenza                                                 */
/* ---------------------------------------------------------------- */

.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--a13-bg-elevated);
    border: 1px solid var(--a13-border);
    border-radius: var(--a13-radius);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.hero-media {
    position: relative;
    min-height: 320px;
    overflow: hidden;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(10%) contrast(1.05);
}

.hero-content {
    padding: 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: 2.1rem;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.hero-content .excerpt {
    color: var(--a13-text);
    line-height: 1.65;
    margin: 0 0 1.4rem;
}

.hero-content .meta {
    color: var(--a13-text-dim);
    font-size: 0.88rem;
}

@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; }
    .hero-media { min-height: 220px; }
}

/* ---------------------------------------------------------------- */
/* Griglia di card                                                    */
/* ---------------------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--a13-bg-elevated);
    border: 1px solid var(--a13-border);
    border-radius: var(--a13-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
    border-color: var(--a13-border-strong);
    transform: translateY(-2px);
}

.card-media {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(10%) contrast(1.05);
}

.card-body {
    padding: 1.1rem 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-category {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--a13-text-dim);
    margin-bottom: 0.45rem;
}

.card-title {
    font-size: 1.2rem;
    margin: 0 0 0.6rem;
    line-height: 1.25;
}

.card-excerpt {
    color: var(--a13-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    flex: 1;
    margin: 0 0 1rem;
}

.card-meta {
    color: var(--a13-text-dim);
    font-size: 0.82rem;
}

/* ---------------------------------------------------------------- */
/* Esplora per categoria                                              */
/* ---------------------------------------------------------------- */

.category-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.category-tile {
    position: relative;
    height: 150px;
    overflow: hidden;
    border: 1px solid var(--a13-border);
    border-radius: var(--a13-radius);
    display: flex;
    align-items: flex-end;
    padding: 1rem 1.1rem;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-tile:hover {
    border-color: var(--a13-border-strong);
    transform: translateY(-2px);
}

.category-tile .media-glow {
    position: absolute;
    inset: 0;
}

.category-tile span {
    position: relative;
    z-index: 1;
    font-family: 'Rock Salt', cursive;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.25;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ---------------------------------------------------------------- */
/* Pagina articolo                                                    */
/* ---------------------------------------------------------------- */

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--a13-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--a13-red-bright);
}

article .meta {
    color: var(--a13-text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

article .article-header-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border: 1px solid var(--a13-border);
    margin-bottom: 1.5rem;
    filter: grayscale(10%) contrast(1.05);
}

article .article-body {
    line-height: 1.8;
}

article .article-body p {
    margin: 0 0 1rem;
}

.video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin: 1.5rem 0;
    border: 1px solid var(--a13-border);
    background: #000;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------------------------------------------------------------- */
/* Footer                                                             */
/* ---------------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--a13-border);
    margin-top: 2rem;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer .brand {
    font-family: 'Rock Salt', cursive;
    color: var(--a13-red);
    font-size: 1.1rem;
    text-decoration: none;
}

.site-footer .tagline {
    color: var(--a13-text-dim);
    font-size: 0.85rem;
}
