/* ============================================
   OFFICINA GIOVANILE APS — Stile principale
   ============================================ */

:root {
  --navy: #1A3A6B;
  --navy-dark: #112850;
  --navy-light: #2a5298;
  --accent: #E8600A;        /* era oro, diventa arancio */
  --accent-light: #f07030;  /* era oro chiaro */
  --green: #3DAF4B;
  --bg: #F7F6F2;
  --white: #FFFFFF;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e1d8;
  --radius: 10px;
  --shadow: 0 2px 14px rgba(27,61,143,.10);
  --shadow-hover: 0 8px 28px rgba(27,61,143,.16);
}

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.12);
}

main { flex: 1; padding-bottom: 80px; }

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

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  background: var(--white);
  padding: 0 16px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  border-bottom: 1px solid var(--border);
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar__logo-badge {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  color: var(--navy-dark);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.navbar__logo-text {
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  font-family: Georgia, serif;
}

.navbar__hamburger {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--navy);
  font-size: 22px;
  padding: 4px 8px;
  line-height: 1;
}

/* Menu mobile */
.nav-menu {
  display: none;
  background: var(--white);
  border-bottom: none;
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  z-index: 200;
}

.nav-menu.is-open { display: block; }

.nav-menu a {
  display: block;
  padding: 14px 20px;
  color: var(--navy);
  font-size: 17px;
  font-family: Georgia, serif;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent);
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding-left: 17px;
}

/* ============================================
   BOTTOM NAV
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 6px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  z-index: 50;
}

.bottom-nav__item {
  text-align: center;
  cursor: pointer;
  padding: 2px 8px;
  text-decoration: none;
  color: var(--text-muted);
}

.bottom-nav__item.active { color: var(--navy); }

.bottom-nav__icon { font-size: 20px; line-height: 1; }

.bottom-nav__label {
  font-size: 10px;
  font-weight: 400;
  margin-top: 2px;
  display: block;
}

.bottom-nav__item.active .bottom-nav__label { font-weight: 700; }

.bottom-nav__dot {
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  margin: 2px auto 0;
  display: none;
}

.bottom-nav__item.active .bottom-nav__dot { display: block; }

/* ============================================
   HERO (homepage)
   ============================================ */
.hero {
  background: linear-gradient(155deg, var(--navy-dark) 0%, var(--navy-light) 100%);
  padding: 32px 20px 28px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 160px; height: 160px;
  border-radius: 50%;
  display: none;
}

.hero__label {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero h1 {
  color: var(--white);
  font-size: 26px;
  font-weight: 900;
  font-family: Georgia, serif;
  line-height: 1.25;
  margin-bottom: 12px;
}

.hero h1 span { color: var(--accent); }

.hero p {
  color: rgba(255,255,255,0.78);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--navy-dark);
  border: none;
  padding: 11px 22px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

.btn:hover { background: var(--accent-light); transform: translateY(-1px); }

/* ============================================
   SEZIONI GENERALI
   ============================================ */
.section { padding: 24px 16px 0; }
.section:last-child { padding-bottom: 24px; }

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  font-family: Georgia, serif;
}

.section__link {
  font-size: 12px;
  color: var(--navy-light);
  font-weight: 600;
  text-decoration: none;
}

/* ============================================
   TAG & CHIP
   ============================================ */
.tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1E6B2E;
  background: #D6F0DB;
  padding: 0;
  border-radius: 3px;
  display: inline-block;
}

/* ============================================
   NEWS CARD
   ============================================ */
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.news-card__image {
  background: var(--white);
  height: 160px;
  overflow: hidden;
}

.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.news-card__image--placeholder {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.news-card__body { padding: 12px 14px 14px; }

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.news-card__date {
  font-size: 11px;
  color: var(--text-muted);
}

.news-card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  font-family: Georgia, serif;
  line-height: 1.4;
  margin-bottom: 6px;
}

.news-card__excerpt {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

.news-card__readmore {
  margin-top: 10px;
  font-size: 13px;
  color: #3DAF4B;
  font-weight: 600;
}

/* ============================================
   GRIGLIA AREE (homepage)
   ============================================ */
.areas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.area-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: block;
  transition: transform 0.15s;
}

.area-card:hover { transform: translateY(-2px); }

.area-card__icon { font-size: 24px; margin-bottom: 6px; }

.area-card__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}

.area-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================
   PAGINE INTERNE
   ============================================ */
.page-header { padding: 24px 16px 0; }

.page-header__label {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 900;
  font-family: Georgia, serif;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 8px;
}

.page-content {
  padding: 16px 16px 24px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
}

.page-content p { margin-bottom: 16px; }
.page-content h2 { font-family: Georgia, serif; color: var(--navy); font-size: 18px; margin: 24px 0 12px; }

/* Box dati */
.data-box {
  background: var(--white);
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 16px;
}

.data-box__title {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

.data-box__row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.data-box__row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.data-box__key {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.data-box__val {
  font-size: 12px;
  color: var(--navy);
  font-weight: 600;
}

/* Quote */
.quote-box {
  background: var(--bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.quote-box p {
  font-size: 16px;
  font-style: italic;
  color: var(--navy);
  font-family: Georgia, serif;
  line-height: 1.5;
  margin: 0;
}

/* Card progetto */
.project-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow);
}

.project-card__icon { font-size: 32px; line-height: 1; flex-shrink: 0; }

.project-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  font-family: Georgia, serif;
}

.project-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Banner Erasmus */
.erasmus-banner {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 12px;
  padding: 20px 16px;
  margin-top: 8px;
}

.erasmus-banner__title {
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 8px;
}

.erasmus-banner__text {
  color: var(--navy);
  font-size: 15px;
  line-height: 1.6;
}

/* Contatti */
.contact-list {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
}

.contact-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-item:last-child { border-bottom: none; }

.contact-item__icon { font-size: 20px; }

.contact-item__label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-item__value {
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
}

.social-box {
  background: var(--white);
  border-radius: 12px;
  padding: 20px 16px;
}

.social-box__title {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
}

.social-box__links {
  display: flex;
  gap: 10px;
}

.social-link {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 0;
  text-align: center;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.social-link:hover { background: rgba(255,255,255,0.2); }

/* ============================================
   ARTICOLO SINGOLO
   ============================================ */
.article-hero {
  background: var(--white);
  padding: 24px 16px 20px;
}

.article-hero__back {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  display: inline-block;
  text-decoration: none;
}

.article-hero h1 {
  color: var(--navy);
  font-size: 21px;
  font-weight: 900;
  font-family: Georgia, serif;
  line-height: 1.3;
  margin: 12px 0 8px;
}

.article-hero__date {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
}

.article-body {
  padding: 20px 16px;
  font-size: 17px;
  color: var(--text);
  line-height: 1.75;
  font-family: Georgia, serif;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
}

.article-body p { margin-bottom: 16px; }

.share-box {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.share-box__label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: system-ui, sans-serif;
}

.share-box__links {
  display: flex;
  gap: 8px;
}

.share-link {
  font-size: 11px;
  color: var(--navy-light);
  font-weight: 600;
  padding: 6px 10px;
  background: var(--white);
  border-radius: 6px;
  border: 1px solid var(--border);
  text-decoration: none;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy-dark);
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 64px;
}

.site-footer p {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  line-height: 1.6;
}

.site-footer a { color: var(--accent); }

/* ============================================
   RESPONSIVE — già mobile-first, questo è
   solo per schermi molto grandi
   ============================================ */
@media (min-width: 480px) {
  body { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ============================================
   IMMAGINE ARTICOLO
   ============================================ */
.article-image {
  width: 100%;
  max-height: 260px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
