/* assets/css/nav.css */

/* ── HEADER / NAV ── */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--teal);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    height: 68px;
    gap: 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo { height: 44px; width: auto; }

.site-title-block { display: flex; flex-direction: column; }

.brand-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--teal);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.68rem;
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: auto;
}

.nav-link {
    padding: 0.45rem 0.85rem;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.18s;
    white-space: nowrap;
}

.nav-link:hover { background: var(--teal-light); color: var(--teal-dark); }
.nav-link.active { background: var(--teal); color: var(--white); }

/* hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-900);
    border-radius: 2px;
    transition: all 0.2s;
}

/* ── PAGE HERO (generico) ── */
.page-hero {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: var(--white);
    padding: 3rem 2rem 2.5rem;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.6rem;
}

.page-hero p {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

/* ── FOOTER ── */
.site-footer {
    background: var(--gray-900);
    color: rgba(255,255,255,0.55);
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo { height: 40px; opacity: 0.8; }

.footer-brand strong { color: var(--white); font-size: 1rem; display: block; }
.footer-brand p { font-size: 0.8rem; margin-top: 0.15rem; }

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-nav a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav a:hover { color: var(--teal); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom a { color: rgba(255,255,255,0.4); text-decoration: none; }

/* ── LAYOUT COMUNE PAGINE ── */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.page-content-narrow {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

/* ── CARDS generiche ── */
.content-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1.5px solid var(--gray-100);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.card-title-link {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
    line-height: 1.35;
    display: block;
    margin-bottom: 0.5rem;
}

.card-title-link:hover { color: var(--teal); }

.card-excerpt {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ── GRID 3 COLONNE ── */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

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

/* ── TAG/BADGE ── */
.tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tag-teal { background: var(--teal-light); color: var(--teal-dark); }
.tag-green { background: #e8f5ee; color: #1a7a4a; }
.tag-red { background: #fdf0ee; color: var(--red); }
.tag-gray { background: var(--gray-100); color: var(--gray-600); }

/* ── PULSANTI PUBBLICI ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.3rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: var(--font-main);
}

.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); }
.btn-outline { background: transparent; color: var(--teal); border: 2px solid var(--teal); }
.btn-outline:hover { background: var(--teal); color: var(--white); }

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-600);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { font-size: 1rem; }

/* ── RICH TEXT ── */
.rich-text h2 { font-size: 1.3rem; font-weight: 700; margin: 1.8rem 0 0.7rem; color: var(--teal-dark); }
.rich-text h3 { font-size: 1.1rem; font-weight: 700; margin: 1.4rem 0 0.5rem; }
.rich-text p { margin-bottom: 1rem; line-height: 1.75; color: var(--gray-600); }
.rich-text ul, .rich-text ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.rich-text li { margin-bottom: 0.4rem; line-height: 1.6; color: var(--gray-600); }
.rich-text strong { color: var(--gray-900); }

/* ── MOBILE ── */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        border-bottom: 3px solid var(--teal);
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        gap: 0.3rem;
        align-items: stretch;
    }

    .main-nav.open { display: flex; }
    .nav-link { padding: 0.65rem 1rem; }

    .header-inner { gap: 1rem; }
    .brand-sub { display: none; }

    .page-content, .page-content-narrow { padding: 2rem 1rem 3rem; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
