/* ============================================================
   GMSI – Global stylesheet
   Colors:
     --red:    #b41f14
     --navy:   #15213f
     --bg:     #fbfcfe
     --text:   #38383c
     --white:  #ffffff
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:   #b41f14;
  --navy:  #15213f;
  --bg:    #fbfcfe;
  --text:  #38383c;
  --white: #ffffff;
  --radius: 12px;
  --max-w: 1200px;
  --font: 'Plus Jakarta Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.85; }
img { display: block; max-width: 100%; height: auto; }

/* ── NAVBAR ────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 6px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.navbar-links a {
  color: var(--white);
  font-size: .95rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background .15s;
  white-space: nowrap;
}

.navbar-links a:hover,
.navbar-links a.active {
  background: rgba(255,255,255,.15);
}

.navbar-links a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.navbar-blog-btn {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: .95rem;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}

.navbar-blog-btn:hover,
.navbar-blog-btn.active {
  background: #1e2f5a;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: .3s;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--red);
    flex-direction: column;
    padding: 16px 24px;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    transform: none;
  }
  .navbar-links.open { display: flex; }
  .navbar-links a { font-size: 1rem; padding: 10px 14px; }
  .navbar-blog-btn { display: none; }
}

/* ── HELPERS ───────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

.red-bg  { background: var(--red);  color: var(--white); }
.navy-bg { background: var(--navy); color: var(--white); }
.white-bg { background: var(--white); }
.light-bg { background: var(--bg); }

.red-bg h1, .red-bg h2, .red-bg h3,
.red-bg h4 { color: var(--white); }

.navy-bg h1, .navy-bg h2, .navy-bg h3 { color: var(--white); }

h1, h2, h3, h4 { line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin-bottom: .9em; }
p:last-child { margin-bottom: 0; }

.red-heading { color: var(--red); }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-red   { background: var(--red);  color: var(--white); }
.btn-navy  { background: var(--navy); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ── HERO (homepage) ───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.9);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.68);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 80px 32px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--red);
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--red);
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}

/* ── PAGE HERO (inner pages) ───────────────────────────────── */
.page-hero {
  padding: 64px 0 56px;
}

.page-hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.page-hero-split img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .page-hero-split { grid-template-columns: 1fr; }
}

/* ── PHOTO STRIP ───────────────────────────────────────────── */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 48px 0;
}

.photo-strip img {
  border-radius: var(--radius);
  width: 100%;
  height: 260px;
  object-fit: cover;
}

@media (max-width: 640px) {
  .photo-strip { grid-template-columns: 1fr; }
}

/* ── FEATURED CARD (In evidenza) ───────────────────────────── */
.featured-section {
  padding: 80px 0;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.featured-card img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.featured-section-heading {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
}

.featured-label {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  opacity: .75;
  margin-bottom: 12px;
}

.featured-title {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .featured-card { grid-template-columns: 1fr; }
}

/* ── ACTIVITIES GRID ───────────────────────────────────────── */
.activities-section { padding: 80px 0; }

.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0 32px;
}

.activity-card img {
  border-radius: var(--radius);
  width: 100%;
  height: 280px;
  object-fit: cover;
  margin-bottom: 16px;
}

.activity-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.activity-card p { font-size: .95rem; }

@media (max-width: 768px) {
  .activities-grid { grid-template-columns: 1fr; }
}

/* ── OBIETTIVI PAGE ────────────────────────────────────────── */
.obiettivi-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 48px;
}

.obiettivo-card {
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: var(--radius);
  padding: 24px;
  font-size: .95rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .obiettivi-cards { grid-template-columns: 1fr; }
}

.obiettivo-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 64px 0;
}

.obiettivo-detail img {
  border-radius: var(--radius);
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.obiettivo-detail .sub-activities {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sub-activity h4 {
  color: var(--red);
  margin-bottom: 4px;
}

/* When on navy bg */
.navy-bg .sub-activity h4 { color: #6aa3ff; }
.red-bg .sub-activity h4 { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 768px) {
  .obiettivo-detail { grid-template-columns: 1fr; }
}

/* ── FAQ ACCORDION ─────────────────────────────────────────── */
.faq-section { padding: 64px 0; }
.faq-list { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  border: 1.5px solid #e0e0e4;
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 24px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  flex-shrink: 0;
  transition: transform .2s;
}

.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  padding: 0 24px;
  font-size: .95rem;
  color: var(--text);
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 24px 20px;
}

/* ── PROGETTI PAGE ─────────────────────────────────────────── */
.project-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0;
}

.project-block img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}

.project-block .status {
  font-style: italic;
  font-size: .9rem;
  opacity: .85;
  margin-bottom: 12px;
}

.project-block h2 { margin-bottom: 12px; }

@media (max-width: 768px) {
  .project-block { grid-template-columns: 1fr; }
}

/* ── EVENTI PAGE ───────────────────────────────────────────── */
.eventi-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
}

.channel-card {
  text-align: center;
  padding: 16px 24px 32px;
}

.channel-card h3 { margin-bottom: 8px; color: var(--text); font-size: 1.15rem; }
.channel-card p { font-size: .95rem; margin-bottom: 20px; color: #555; }
.channel-card .channel-icon {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.channel-card .channel-icon svg {
  width: 100px;
  height: 100px;
  stroke: var(--text);
  stroke-width: 1.2;
}

@media (max-width: 640px) {
  .eventi-channels { grid-template-columns: 1fr; }
}

/* ── BLOG PAGE ─────────────────────────────────────────────── */
.blog-article {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 48px;
  align-items: start;
  padding: 64px 0;
  border-bottom: 1px solid rgba(255,255,255,.2);
}

.blog-article:last-child { border-bottom: none; }

.blog-article img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}

.blog-article h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  margin-bottom: 12px;
  color: var(--red);
}

.blog-article .author {
  font-size: .85rem;
  opacity: .75;
  margin-top: 12px;
  font-weight: 600;
}

.blog-articles-section { padding: 0 0 80px; }

@media (max-width: 640px) {
  .blog-article { grid-template-columns: 1fr; }
}

/* ── CONTATTI PAGE ─────────────────────────────────────────── */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
}

.contact-item a { color: var(--red); font-weight: 600; text-decoration: underline; }
.contact-item a:hover { opacity: .8; }

/* ── SANGIORGIO PAGE ───────────────────────────────────────── */
.event-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 32px;
}

.info-box {
  background: var(--white);
  border: 1.5px solid #e2e4ea;
  border-radius: var(--radius);
  padding: 28px;
}

.info-box h3 { color: var(--red); margin-bottom: 12px; }

.info-box ul {
  list-style: disc;
  padding-left: 20px;
  font-size: .95rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-box p { font-size: .95rem; }
.info-box strong { font-weight: 700; }

.tech-info {
  background: var(--navy);
  color: var(--white);
  border: none;
}

.tech-info h3 { color: #8ab4f8; }

@media (max-width: 640px) {
  .event-info-grid { grid-template-columns: 1fr; }
}

/* ── LINK INLINE ───────────────────────────────────────────── */
a.inline-link {
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.navy-bg a.inline-link,
.red-bg a.inline-link { color: #aad0ff; }

/* ── DIVIDER ───────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: #e2e4ea;
  margin: 0;
}

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.75);
  padding: 40px 32px;
  text-align: center;
  font-size: .875rem;
}

.footer a { color: rgba(255,255,255,.85); text-decoration: underline; }
