/* ============================================================
   MESE.CSS - Stili per pagina elenco articoli mensile
   MokaByte Template 2020
   ============================================================ */

/* Reset e base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

:root {
    --accent-green: #32903F;
    --accent-green-dark: #287a33;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
    width: auto;
}

.tagline {
    font-size: 0.85rem;
    color: #666;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    margin: 5px 0;
}

.main-nav .menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    font-size: 0.95rem;
    color: #333;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #2d6a4f;
}

.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    min-width: 200px;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.has-submenu:hover > .submenu {
    display: block;
}

.submenu li {
    padding: 0;
}

.submenu a {
    display: block;
    padding: 0.5rem 1rem;
}

.submenu a:hover {
    background: #f5f5f5;
}

.submenu .submenu {
    left: 100%;
    top: 0;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    min-height: 520px;
    max-height: 680px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hero-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Tag categoria sopra il box */
.hero-content .category {
    display: inline-block;
    background: rgba(255,255,255,0.95);
    color: #2d6a4f;
    padding: 0.35rem 0.85rem;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    text-decoration: none;
}

.hero-content .category:hover {
    background: #fff;
}

/* Box verde con titolo e sottotitolo */
.hero-title-box {
    background: var(--accent-green);
    padding: 0.55rem 1.5rem;
    margin-bottom: 0;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.hero-title-box h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
}

@media (min-width: 768px) {
    .hero-title-box h1 {
        font-size: 2.75rem;
    }
}

.hero-title-box .subtitle {
    color: #fff;
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.95;
}

@media (min-width: 768px) {
    .hero-title-box .subtitle {
        font-size: 1.25rem;
    }
}

/* Box indice articoli nella hero */
.hero-index-box {
    background: #fff;
    border: 3px solid var(--accent-green);
    padding: 1.25rem 1.5rem;
    position: absolute;
    top: 2rem;
    right: 10%;
    width: min(36vw, 420px);
    z-index: 2;
}

.hero-index-box h2 {
    display: inline-flex;
    width: fit-content;
    background: var(--accent-green);
    color: #fff;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.8rem 0;
    opacity: 1;
}

.hero-index-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-index-box li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-index-box li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-index-box a {
    color: #111;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.hero-item-subtitle {
    margin: 0.2rem 0 0;
    color: #4b5563;
    font-size: 0.78rem;
    line-height: 1.3;
}

.hero-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.hero-item-tag {
    display: inline-block;
    background: #eef5ef;
    color: #2f6f2f;
    font-size: 0.66rem;
    line-height: 1;
    padding: 0.18rem 0.4rem;
    border-radius: 2px;
    text-transform: lowercase;
}

.hero-index-box a:hover {
    color: #fff;
    background: var(--accent-green);
    opacity: 1;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ============================================================
   LISTA ARTICOLI
   ============================================================ */
.articles-list {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d6a4f;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #d8f3dc;
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ============================================================
   ARTICLE CARD
   ============================================================ */
.article-card {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: #fff;
}

.article-card-image {
    flex-shrink: 0;
    width: 280px;
    height: 180px;
    border-radius: 0;
    overflow: hidden;
}

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

.article-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-content .category {
    display: inline-flex;
    width: fit-content;
    color: #fff;
    background: var(--accent-green);
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.article-card-content .category:hover {
    color: #fff;
    background: var(--accent-green-dark);
}

.article-card-tags .tag {
    display: inline-flex;
    width: fit-content;
    background: var(--accent-green);
    color: #fff;
    padding: 0.2rem 0.5rem;
    margin: 0 0.4rem 0.4rem 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card-title {
    display: inline-flex;
    width: fit-content;
    background: var(--accent-green);
    color: #fff;
    padding: 0.3rem 0.6rem;
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.article-card-title a {
    color: #fff;
    transition: color 0.2s;
}

.article-card-title a:hover {
    color: #fff;
}

.article-card-subtitle {
    display: inline-flex;
    width: fit-content;
    background: var(--accent-green);
    color: #fff;
    padding: 0.25rem 0.55rem;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.article-card-abstract {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
    flex: 1;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.article-card-footer .author {
    font-size: 0.9rem;
    color: #888;
}

.read-more {
    font-size: 0.9rem;
    color: #2d6a4f;
    font-weight: 600;
    transition: color 0.2s;
}

.read-more:hover {
    color: #1b4332;
}

/* ============================================================
   NAVIGAZIONE NUMERI
   ============================================================ */
.numeri-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
}

.nav-link {
    font-size: 0.95rem;
    color: #2d6a4f;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: 1px solid #2d6a4f;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #2d6a4f;
    color: #fff;
}

.nav-link.archive {
    background: #f5f5f5;
    border-color: #ddd;
    color: #666;
}

.nav-link.archive:hover {
    background: #e8e8e8;
    color: #333;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-brand img {
    height: 35px;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    color: #777;
    font-size: 0.85rem;
}

.footer-links h4,
.footer-social h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
}

.footer-links ul,
.footer-social ul {
    list-style: none;
    padding: 0;
}

.footer-links li,
.footer-social li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-social a {
    color: #555;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover,
.footer-social a:hover {
    color: #2d6a4f;
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding: 1.5rem 2rem;
    text-align: center;
    background: #f9f9f9;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: #777;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .article-card {
        flex-direction: column;
    }

    .article-card-image {
        width: 100%;
        height: 200px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav .menu {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .main-nav .menu li {
        border-bottom: 1px solid #f0f0f0;
    }

    .main-nav .menu a {
        display: block;
        padding: 0.75rem 0;
    }

    .tagline {
        display: none;
    }

    .hero-content {
        align-items: stretch;
    }

    .hero-index-box {
        position: static;
        width: 100%;
    }

}

@media (max-width: 480px) {
    .header-inner {
        padding: 1rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .article-card {
        padding: 1rem;
    }

    .article-card-title {
        font-size: 1.2rem;
    }
}
