/*
Theme Name: FAND Lombardia
Theme URI: https://fand-lombardia.org
Author: FAND Lombardia
Description: Tema ufficiale per FAND Lombardia – Federazione tra le Associazioni Nazionali delle persone con Disabilità
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: fand-lombardia
Tags: custom-menu, featured-images, responsive-layout
*/

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

:root {
  --blue: #1a2f7a;
  --blue-dark: #0f1e52;
  --blue-light: #2a4099;
  --gold: #f5a623;
  --gold-light: #ffc107;
  --white: #ffffff;
  --gray-light: #f4f6f9;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --text: #2c2c2c;
  --border: #dee2e6;
  --font: 'Segoe UI', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--gold); }

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

ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================
   HEADER / NAVBAR
   ============================ */
#site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  gap: 20px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-branding img {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

.site-titles .site-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
}

.site-titles .site-tagline {
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.3;
}

/* NAVIGATION */
#primary-nav {
  margin-left: auto;
}

#primary-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}

#primary-nav ul li a {
  display: block;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-dark);
  transition: all 0.2s;
}

#primary-nav ul li a:hover,
#primary-nav ul li.current-menu-item > a,
#primary-nav ul li.current_page_item > a {
  background: var(--blue);
  color: var(--white);
}

/* HAMBURGER */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--blue);
  transition: all 0.3s;
}

/* ============================
   HERO SECTION (homepage)
   ============================ */
.hero-section {
  background: var(--blue);
  padding: 60px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 900px;
}

.hero-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-text .hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-text .hero-title .accent {
  color: var(--gold);
}

.hero-text .hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
}

/* BUILDING IMAGE */
.building-image-wrap {
  width: 100%;
  max-height: 380px;
  overflow: hidden;
}
.building-image-wrap img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  object-position: center;
}

/* ============================
   SECTIONS GENERAL
   ============================ */
.section {
  padding: 64px 20px;
}

.section-alt {
  background: var(--gray-light);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--gray);
  margin-bottom: 36px;
  font-size: 1rem;
}

.section-header {
  margin-bottom: 40px;
}

/* ============================
   PARTNERS SECTION (homepage)
   ============================ */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.partner-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.partner-card:hover {
  box-shadow: 0 6px 20px rgba(26,47,122,0.12);
  transform: translateY(-2px);
}

.partner-abbr {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.partner-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}

.partner-card p {
  font-size: 0.88rem;
  color: var(--gray);
}

/* ============================
   ABOUT EXCERPT (homepage)
   ============================ */
.about-excerpt {
  background: var(--blue-dark);
  color: var(--white);
  padding: 56px 20px;
}

.about-excerpt .container {
  display: flex;
  gap: 48px;
  align-items: center;
}

.about-excerpt-text {
  flex: 1;
}

.about-excerpt-text h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}

.about-excerpt-text p {
  color: rgba(255,255,255,0.88);
  margin-bottom: 12px;
  line-height: 1.7;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-gold {
  background: var(--gold);
  color: var(--blue-dark);
  border: 2px solid var(--gold);
}
.btn-gold:hover {
  background: transparent;
  color: var(--gold);
}

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

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

/* ============================
   NEWS SECTION
   ============================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.news-card:hover {
  box-shadow: 0 6px 20px rgba(26,47,122,0.12);
  transform: translateY(-2px);
}

.news-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-img img {
  width: 80px;
  opacity: 0.6;
  filter: invert(1);
}

.news-card-body {
  padding: 20px;
}

.news-date {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 8px;
}

.news-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card-body p {
  font-size: 0.88rem;
  color: var(--gray);
  margin-bottom: 14px;
}

.news-card-body a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
}
.news-card-body a:hover { color: var(--gold); }

.section-cta {
  text-align: center;
  margin-top: 36px;
}

/* ============================
   ACTIVITIES (homepage)
   ============================ */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.activity-card {
  background: var(--white);
  border-radius: 10px;
  padding: 28px;
  border-left: 4px solid var(--gold);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.activity-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
}

.activity-card p {
  font-size: 0.88rem;
  color: var(--gray);
  margin-bottom: 14px;
}

.activity-card a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
}

/* ============================
   PAGE HERO (inner pages)
   ============================ */
.page-hero {
  background: var(--blue);
  padding: 50px 20px;
  text-align: center;
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.page-hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
}

/* ============================
   CHI SIAMO PAGE
   ============================ */
.chi-siamo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.chi-siamo-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
}

.chi-siamo-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}

.chi-siamo-card p {
  color: var(--gray-dark);
  line-height: 1.7;
}

/* ============================
   NEWS ARCHIVE PAGE
   ============================ */
.news-list { display: flex; flex-direction: column; gap: 24px; }

.news-item {
  display: flex;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.news-item:hover { box-shadow: 0 4px 16px rgba(26,47,122,0.10); }

.news-item-img {
  width: 140px;
  min-height: 120px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.news-item-img img {
  width: 60px;
  opacity: 0.5;
  filter: invert(1);
}

.news-item-body { padding: 20px; }

.news-item-body .date {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 6px;
}

.news-item-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
}

.news-item-body p {
  font-size: 0.9rem;
  color: var(--gray-dark);
  margin-bottom: 12px;
}

.news-item-body a.read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
}

/* ============================
   PARTNER PAGE
   ============================ */
.partner-full-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.partner-badge {
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 16px 20px;
  border-radius: 8px;
  min-width: 80px;
  text-align: center;
  flex-shrink: 0;
}

.partner-full-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 4px;
}

.partner-full-card .partner-type {
  font-size: 0.88rem;
  color: var(--gray);
  margin-bottom: 12px;
}

.partner-full-card p {
  color: var(--gray-dark);
  line-height: 1.7;
}

/* ============================
   CONTACT PAGE
   ============================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-icon {
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 2px;
}

.contact-item-text span {
  color: var(--gray-dark);
  font-weight: 500;
}

.hours-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.hours-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.hours-table td:first-child { color: var(--gray); }

/* CONTACT FORM */
.contact-form-wrap h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 24px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color 0.2s;
  color: var(--text);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,47,122,0.1);
}

.form-group textarea { resize: vertical; min-height: 130px; }

/* ============================
   INFO SECTION (homepage)
   ============================ */
.info-section {
  background: var(--gray-light);
  padding: 56px 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--white);
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  border-top: 4px solid var(--blue);
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
}

.info-card p {
  font-size: 0.88rem;
  color: var(--gray);
}

/* ============================
   FOOTER
   ============================ */
#site-footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.75);
  padding: 48px 20px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand { }

.footer-brand .footer-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 14px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* ============================
   SINGLE POST
   ============================ */
.single-post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
}

.post-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.post-date {
  font-size: 0.85rem;
  color: var(--gray);
}

.post-cat {
  background: var(--blue);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.single-post-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 24px;
  line-height: 1.3;
}

.single-post-content .entry-content {
  color: var(--gray-dark);
  line-height: 1.8;
}

.single-post-content .entry-content p { margin-bottom: 16px; }
.single-post-content .entry-content h2 { color: var(--blue); margin: 24px 0 12px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 24px;
}
.back-link:hover { color: var(--gold); }

/* ============================
   GENERIC PAGE CONTENT
   ============================ */
.page-content {
  padding: 56px 20px;
}

.page-content .entry-content {
  max-width: 800px;
  color: var(--gray-dark);
  line-height: 1.8;
}

.page-content h2 {
  color: var(--blue);
  font-size: 1.4rem;
  margin: 28px 0 12px;
}

.page-content p { margin-bottom: 14px; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-excerpt .container { flex-direction: column; gap: 24px; }
  .partner-full-card { flex-direction: column; gap: 16px; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  
  #primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  }
  
  #primary-nav.open { display: block; }
  
  #primary-nav ul { flex-direction: column; gap: 4px; }
  #primary-nav ul li a { padding: 10px 14px; }
  
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-logo { width: 110px; height: 110px; }
  .hero-text .hero-title { font-size: 1.6rem; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .news-item { flex-direction: column; }
  .news-item-img { width: 100%; min-height: 100px; }
}

@media (max-width: 480px) {
  .section { padding: 40px 16px; }
  .page-hero h1 { font-size: 1.5rem; }
}
