/* Giocoscuola - homepage ricostruita secondo il modello grafico approvato */
:root {
  --gs-blue: #0756a1;
  --gs-blue-dark: #063d7b;
  --gs-orange: #ff8b00;
  --gs-ink: #142f4c;
  --gs-bg: #eaf5fc;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--gs-ink);
  font-family: "Open Sans", "Trebuchet MS", Arial, sans-serif;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(255,255,255,.96), transparent 55%),
    linear-gradient(180deg, #cfe8fa 0%, #f5fbff 47%, #d9edfb 100%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.header {
  background:
    radial-gradient(ellipse at 12% 0%, rgba(255,255,255,.92), transparent 48%),
    linear-gradient(110deg, #c4e2f7 0%, #f5fbff 48%, #c6e4f8 100%);
  border-bottom: 4px solid var(--gs-orange);
  box-shadow: 0 4px 14px rgba(0,55,105,.15);
}
.brand-row {
  width: min(1450px, 96%);
  min-height: 112px;
  margin: 0 auto;
  padding: 8px 28px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: radial-gradient(ellipse at 50% 120%, rgba(255,255,255,.72), transparent 62%);
}
.brand { display: block; width: min(590px, 55%); }
.brand img { width: 100%; height: auto; }
.slogan {
  padding: 7px 22px;
  color: var(--gs-blue);
  text-align: center;
  font-family: "Comic Sans MS", "Trebuchet MS", cursive;
  font-size: clamp(22px, 2.8vw, 39px);
  font-weight: bold;
  font-style: italic;
  line-height: 1.12;
  transform: rotate(-3deg);
  text-shadow: 1px 2px 1px rgba(255,255,255,.9);
}
.slogan::after {
  content: "";
  display: block;
  width: 88%;
  height: 8px;
  margin: 7px auto 0;
  border-bottom: 5px solid var(--gs-orange);
  border-radius: 50%;
  transform: rotate(-2deg);
}
.navigation {
  border-top: 1px solid rgba(255,255,255,.9);
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.12));
}
.menu-links {
  width: min(1450px, 96%);
  min-height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.menu-links > a, .dropdown-button {
  padding: 10px 17px;
  border: 0;
  background: transparent;
  color: var(--gs-blue-dark);
  font-family: "Comic Sans MS", "Trebuchet MS", sans-serif;
  font-size: clamp(15px, 1.65vw, 23px);
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
}
.menu-links > a:not(:first-child), .menu-dropdown { border-left: 2px solid var(--gs-orange); }
.menu-links > a:hover, .dropdown-button:hover {
  color: var(--gs-orange);
  text-decoration: underline;
  text-underline-offset: 7px;
}
.menu-dropdown { position: relative; }
.dropdown-button span { font-size: .8em; }
.dropdown-content {
  display: none;
  position: absolute;
  z-index: 50;
  top: 100%;
  left: 0;
  min-width: 265px;
  padding: 8px;
  background: #fff;
  border-top: 4px solid var(--gs-orange);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 20px rgba(20,55,85,.2);
}
.menu-dropdown.open .dropdown-content { display: grid; }
.dropdown-content a { padding: 8px 10px; color: var(--gs-blue-dark); font-size: 14px; }
.dropdown-content a:hover { background: #eaf5ff; color: var(--gs-orange); }
.menu-button { display: none; }
.page { width: min(1450px, 96%); margin: 22px auto 24px; }
.welcome {
  min-height: 235px;
  display: grid;
  grid-template-columns: 25% 50% 25%;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 24px;
  background: linear-gradient(105deg, #d2e9f9 0%, #fff 49%, #d3e9f8 100%);
  box-shadow: 0 7px 22px rgba(28,83,128,.13);
}
.welcome-image { height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.welcome-image img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.welcome-left img { object-position: center center; }
.welcome-right img { object-position: center center; }
.welcome-text { position: relative; z-index: 2; padding: 20px 0; text-align: center; }
.welcome h1 {
  margin: 0;
  color: var(--gs-blue);
  font-family: "Comic Sans MS", "Trebuchet MS", sans-serif;
  font-size: clamp(29px, 4vw, 55px);
  font-weight: bold;
  font-style: italic;
  line-height: 1.08;
}
.orange-underline {
  width: 65%;
  height: 10px;
  margin: 8px auto 14px;
  border-bottom: 7px solid var(--gs-orange);
  border-radius: 50%;
  transform: rotate(-1deg);
}
.welcome p { margin: 0; color: #172e48; font-size: clamp(16px, 1.9vw, 25px); line-height: 1.25; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin: 27px 0 38px; }
.card {
  --edge: #1688dc;
  min-width: 0;
  min-height: 270px;
  padding: 10px 12px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  background: #fff;
  border: 2px solid var(--edge);
  border-radius: 20px;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--edge) 85%, #777), 0 12px 22px rgba(25,64,100,.12);
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; height: 140px; margin: 0 auto 2px; object-fit: contain; }
.card h2 {
  margin: 0;
  color: var(--gs-blue-dark);
  font-family: "Comic Sans MS", "Trebuchet MS", sans-serif;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.1;
}
.card p { margin: 7px 0 0; color: #172e48; font-size: clamp(14px, 1.5vw, 20px); line-height: 1.25; }
.card-games { --edge: #1688dc; }
.card-lessons { --edge: #ff8a00; }
.card-journal { --edge: #48a52d; }
.card-community { --edge: #9a63df; }
.competences {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  padding: 15px 28px;
  background: linear-gradient(105deg, #d9efff, #f7fcff 50%, #d9efff);
  border: 1px solid #fff;
  border-radius: 23px;
  box-shadow: 0 6px 18px rgba(28,83,128,.1);
}
.competences > img { width: 220px; max-height: 155px; object-fit: contain; }
.competences-text { text-align: center; }
.competences h2 {
  margin: 0 0 6px;
  color: var(--gs-blue-dark);
  font-family: "Comic Sans MS", "Trebuchet MS", sans-serif;
  font-size: clamp(25px, 3.2vw, 42px);
}
.competences p { margin: 0; color: #183451; font-size: clamp(15px, 1.8vw, 23px); line-height: 1.3; }
.footer {
  padding: 15px 15px 12px;
  color: #fff;
  text-align: center;
  background: linear-gradient(90deg, #07529a, #0873bd, #07529a);
  box-shadow: 0 -5px 15px rgba(0,57,110,.12);
}
.footer p { margin: 0; font-size: clamp(13px, 1.5vw, 19px); }
.footer p span { padding: 0 18px; color: #ffb35b; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 8px; font-size: 13px; }
.footer-links a { color: white; text-decoration: underline; }
@media (max-width: 900px) {
  .brand-row { min-height: 90px; }
  .menu-links > a, .dropdown-button { padding: 10px 9px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome { grid-template-columns: 22% 56% 22%; min-height: 210px; }
}
@media (max-width: 640px) {
  .brand-row { min-height: 82px; padding: 8px 12px; gap: 8px; }
  .brand { width: 63%; }
  .slogan { padding: 4px; font-size: 17px; }
  .menu-button {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; padding: 10px; border: 0; color: var(--gs-blue);
    background: rgba(255,255,255,.35); font-weight: bold;
  }
  .menu-button span { display: none; }
  .menu-links { display: none; width: 100%; padding: 5px 16px 12px; flex-direction: column; align-items: stretch; }
  .menu-links.open { display: flex; }
  .menu-links > a, .dropdown-button { width: 100%; text-align: left; padding: 10px 7px; font-size: 17px; border: 0 !important; border-bottom: 1px solid #d9e9f6 !important; }
  .menu-dropdown { border: 0; }
  .dropdown-content { position: static; min-width: 0; box-shadow: none; }
  .page { width: calc(100% - 22px); margin-top: 13px; }
  .welcome { grid-template-columns: 1fr; min-height: 0; }
  .welcome-text { grid-row: 1; padding: 26px 12px 14px; }
  .welcome-left { grid-row: 2; height: 85px; }
  .welcome-left img { height: 125px; object-position: left 48%; }
  .welcome-right { display: none; }
  .welcome h1 { font-size: 32px; }
  .welcome p { font-size: 16px; }
  .desktop { display: none; }
  .cards { gap: 14px; margin: 18px 0 25px; }
  .card { min-height: 220px; padding: 8px 7px 12px; border-radius: 15px; }
  .card img { height: 105px; }
  .card h2 { font-size: 21px; }
  .card p { font-size: 14px; }
  .competences { gap: 8px; padding: 12px 10px; min-height: 125px; }
  .competences > img { width: 105px; max-height: 105px; }
  .competences h2 { font-size: 21px; }
  .competences p { font-size: 13px; }
  .footer p span { display: none; }
  .footer-links { gap: 13px; }
}
@media (max-width: 390px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 205px; }
  .card img { height: 112px; }
}

/* CARD LATERALI DEL WELCOME: aspetto originale, immagine centrata */
.welcome {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  overflow: visible;
  align-items: stretch;
}
.welcome-left,
.welcome-right {
  width: 100%;
  min-width: 0;
  min-height: 270px;
  height: 100%;
  padding: 10px 12px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}
.welcome-left img,
.welcome-right img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 140px;
  margin: 0 auto 2px;
  object-fit: contain;
  object-position: center center;
  align-self: center;
}
.welcome-left h2,
.welcome-right h2 {
  margin: 0;
  color: var(--gs-blue-dark);
  font-family: "Comic Sans MS", "Trebuchet MS", sans-serif;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.1;
}
.welcome-left p,
.welcome-right p {
  margin: 7px 0 0;
  color: #172e48;
  font-size: clamp(14px, 1.5vw, 20px);
  line-height: 1.25;
}
.welcome-text { min-width: 0; }

/* A zoom elevato e su smartphone: testo sopra, poi le due card laterali.
   Le card laterali e le quattro inferiori hanno misure identiche. */
@media (max-width: 800px) {
  .welcome {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
    min-height: 0;
  }
  .welcome-text {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    padding: 20px 8px;
  }
  .welcome-left {
    grid-column: 1;
    grid-row: 2;
  }
  .welcome-right {
    grid-column: 2;
    grid-row: 2;
    display: flex !important;
  }
  .welcome-left,
  .welcome-right,
  .cards .card {
    width: 100%;
    min-width: 0;
    min-height: 220px;
    height: 220px;
    padding: 8px 7px 12px;
    border-radius: 15px;
  }
  .welcome-left img,
  .welcome-right img,
  .cards .card img {
    width: 100%;
    height: 105px;
    margin: 0 auto 2px;
    object-fit: contain;
    object-position: center center;
  }
  .welcome-left h2,
  .welcome-right h2,
  .cards .card h2 {
    font-size: 21px;
  }
  .welcome-left p,
  .welcome-right p,
  .cards .card p {
    font-size: 14px;
    line-height: 1.25;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 25px;
  }
}

/* Schermi molto stretti: si mantiene una griglia a due colonne,
   con contenuti e immagini ridotti ma sei card della stessa misura. */
@media (max-width: 390px) {
  .welcome { gap: 10px; padding: 10px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .welcome-left,
  .welcome-right,
  .cards .card {
    min-height: 190px;
    height: 190px;
    padding: 7px 5px 9px;
  }
  .welcome-left img,
  .welcome-right img,
  .cards .card img { height: 82px; }
  .welcome-left h2,
  .welcome-right h2,
  .cards .card h2 { font-size: 17px; }
  .welcome-left p,
  .welcome-right p,
  .cards .card p { font-size: 12px; }
}


/* =====================================================
   STILI SPECIFICI PAGINA INFO
   ===================================================== */

/* Stili specifici della pagina Info: la struttura generale resta in homepage.css */
.info-page {
    max-width: 1120px;
    margin: 22px auto 24px;
}
.info-panel {
  padding: clamp(22px, 4vw, 52px);
  background: rgba(255,255,255,.94);
  border: 1px solid #fff;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(28,83,128,.13);
}
.info-heading { max-width: 850px; margin: 0 auto 28px; text-align: center; }
.info-heading .eyebrow {
  margin: 0 0 5px;
  color: var(--gs-orange);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
  font-weight: 800;
}
.info-heading h1 {
  margin: 0;
  color: var(--gs-blue);
  font-family: "Comic Sans MS","Trebuchet MS",sans-serif;
  font-size: clamp(36px,5vw,58px);
}
.info-heading .orange-underline { margin-bottom: 14px; }
.info-intro { margin: 0; color: var(--gs-blue-dark); font-size: clamp(17px,2vw,22px); }
.info-copy { max-width: 960px; margin: 0 auto; color: #243d56; font-size: 17px; line-height: 1.75; }
.info-copy > p { margin: 0 0 19px; }
.info-copy h2 {
  margin: 34px 0 8px;
  color: var(--gs-blue);
  font-family: "Comic Sans MS","Trebuchet MS",sans-serif;
  font-size: clamp(25px,3vw,36px);
  line-height: 1.2;
  text-align: center;
}
.competences-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 24px 0 28px; }
.competence-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e9f6;
  border-left: 7px solid var(--gs-blue);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(20,55,85,.09);
}
.competence-card h3 {
  margin: 0;
  padding: 13px 17px;
  color: #fff;
  background: var(--gs-blue);
  font-size: 20px;
  line-height: 1.3;
}
.competence-card h3 span { display: block; margin-top: 2px; font-size: 15px; font-weight: 400; }
.competence-card p { margin: 0; padding: 16px 18px 18px; font-size: 16px; line-height: 1.55; }
.footer-note { max-width: 1000px; margin: 12px auto 0 !important; font-size: 12px !important; line-height: 1.5; }
.footer-note a { color: #fff; text-decoration: underline; }
@media(max-width:650px) {
  .info-panel { padding: 22px 16px; border-radius: 15px; }
  .info-copy { font-size: 15px; line-height: 1.65; }
  .competences-grid { grid-template-columns: 1fr; gap: 13px; }
  .competence-card h3 { font-size: 18px; }
  .competence-card p { font-size: 15px; }
}


/* =====================================================
   STILI SPECIFICI PAGINA CHI SIAMO
   ===================================================== */

/* Grafica specifica della pagina Chi siamo */
.chisiamo-panel {
  padding: clamp(22px, 4vw, 48px);
  background: rgba(255,255,255,.94);
  border: 1px solid #fff;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(28,83,128,.13);
}
.section-heading { max-width: 850px; margin: 0 auto 28px; text-align: center; }
.section-heading .eyebrow {
  margin: 0 0 5px; color: var(--gs-orange); text-transform: uppercase;
  letter-spacing: .12em; font-size: 13px; font-weight: 800;
}
.section-heading h1 {
  margin: 0; color: var(--gs-blue);
  font-family: "Comic Sans MS","Trebuchet MS",sans-serif;
  font-size: clamp(34px,4.5vw,52px);
}
.section-heading .orange-underline { margin-bottom: 14px; }
.chisiamo-content { max-width: 1050px; margin: 0 auto; color: #243d56; font-size: 16px; line-height: 1.75; }
.chisiamo-content > p { margin: 0 0 20px; }
.chisiamo-content h2 {
  margin: 34px 0 15px; color: var(--gs-blue);
  font-family: "Comic Sans MS","Trebuchet MS",sans-serif;
  font-size: clamp(25px,3vw,34px);
}
.works-list { margin: 0 0 25px; padding-left: 24px; }
.works-list li { margin: 0 0 16px; padding-left: 5px; }
.works-list a { color: var(--gs-blue-dark); text-decoration: underline; text-decoration-color: var(--gs-orange); text-underline-offset: 3px; font-weight: 600; }
.works-list a:hover { color: var(--gs-orange); }
.old-school-images { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin: 18px 0 22px; }
.old-school-images a { display: inline-flex; align-items: center; justify-content: center; padding: 8px; background: #f1f8fd; border: 1px solid #d8e9f6; border-radius: 10px; }
.old-school-images img { max-width: 100%; height: auto; object-fit: contain; }
.contact-link { display: flex; align-items: center; gap: 9px; margin-top: 28px !important; font-weight: 700; }
.contact-link img { width: 22px; height: auto; }
.contact-link a { color: var(--gs-blue); text-decoration: underline; }
.footer-credits { max-width: 1050px; margin: 10px auto 0 !important; font-size: 12px !important; line-height: 1.5; }
.footer-credits a { color: #fff; text-decoration: underline; }
@media(max-width:640px) {
  .chisiamo-panel { padding: 22px 16px; border-radius: 15px; }
  .chisiamo-content { font-size: 15px; line-height: 1.65; }
  .chisiamo-content h2 { margin-top: 27px; }
  .old-school-images { justify-content: center; }
}

/* Cookie policy - pagina informativa */
.cookie-policy {
  width: min(1180px, 94%);
  margin: 34px auto 58px;
  padding: clamp(22px, 4vw, 48px);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(7,86,161,.12);
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(0,55,105,.09);
}
.cookie-content {
  max-width: 1000px;
  margin: 0 auto;
  color: var(--gs-ink);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.cookie-content h1 {
  margin: 0 0 26px;
  color: var(--gs-blue-dark);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
}
.cookie-content h2 {
  margin: 30px 0 16px;
  color: var(--gs-blue-dark);
  font-size: clamp(21px, 2.2vw, 28px);
}
.cookie-content h3 {
  margin: 28px 0 12px;
  color: var(--gs-blue);
  font-size: 21px;
}
.cookie-content h4 {
  margin: 12px 0 7px;
  color: var(--gs-ink);
  font-size: 16px;
  font-weight: 600;
}
.cookie-content p { margin: 0 0 16px; }
.cookie-content a {
  color: var(--gs-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-content a:hover { color: var(--gs-orange); }
@media (max-width: 640px) {
  .cookie-policy { width: 94%; margin: 22px auto 36px; padding: 20px 17px; }
  .cookie-content { font-size: 15px; line-height: 1.65; }
}

/* =========================================================
   PAGINA: LEZIONI DI STORIA - CLASSE PRIMA
   Stili specifici dei contenuti didattici.
   Header, menu, card laterali e footer restano gestiti
   dalle regole generali di Giocoscuola.
   ========================================================= */

/* Contenitore principale dei materiali */
.contenuto_pagina > .container > .contenuto_container {
    width: 100%;
    margin: 0 auto;
    padding: 28px 34px 45px;
    background-image: url("../imgs/sfondo.png");
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,.09);
}

/* Titolo principale della pagina */
.contenuto_container > h2:first-child {
    margin: 0 0 4px;
    padding: 0;
    text-align: center;
    color: #0667b1;
    font-size: 40px;
    line-height: 1.2;
    font-weight: 700;
}

.contenuto_container > h2:first-child:after {
    content: "";
    display: block;
    width: 90px;
    height: 4px;
    margin: 12px auto 14px;
    background: #f58220;
    border-radius: 4px;
}

.contenuto_container > h2:first-child + p {
    margin: 0 0 18px;
    text-align: center;
    color: #666;
    font-size: 18px;
}

/* Navigazione tra le unità didattiche */
.subNav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 26px;
    padding: 12px;
    background: #f4f8fb;
    border-radius: 9px;
}

.subNav .button1 {
    margin: 0;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
}

/* Pulsanti di navigazione tra le unità di Storia */
.subNav a.button1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    min-height: 42px;
    border: 2px solid #0667b1;
    border-radius: 8px;
    background: #0667b1;
    color: #fff !important;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .14);
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.subNav a.button1:hover,
.subNav a.button1:focus-visible {
    background: #f58220;
    border-color: #f58220;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
}

.subNav a.button1:focus-visible {
    outline: 3px solid rgba(245, 130, 32, .35);
    outline-offset: 3px;
}

.subNav > img {
    width: auto;
    height: auto;
    flex: 0 0 auto;
}

/* Titoli delle unità didattiche */
.contenuto_container > h2:not(:first-child) {
    clear: both;
    margin: 38px 0 20px;
    padding: 13px 18px;
    border-left: 7px solid #f58220;
    border-radius: 7px;
    background: #f3f7fa;
    color: #0667b1;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
}

.unita-didattica {
    margin: 0 0 38px;
    padding: 0 0 8px;
}

/* Riquadri delle singole risorse */
.sezione-risorsa {
    margin: 18px 0 22px;
    padding: 18px 20px;
    border: 1px solid #e2e8ed;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 9px rgba(0,0,0,.055);
    text-align: center;
}

.sezione-risorsa h2,
.sezione-risorsa h3,
.sezione-risorsa p {
    text-align: center;
}

.sezione-risorsa h3 {
    margin: 0 0 13px;
    padding-top: 8px;
    border-top: 2px solid #e8edf1;
    color: #0667b1;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.sezione-risorsa h3:before {
    margin-right: 8px;
}

.sezione-videoclip h3:before { content: "▶"; color: #f58220; }
.sezione-presentazione h3:before { content: "▣"; color: #0667b1; }
.sezione-audio h3:before { content: "♫"; color: #0667b1; }
.sezione-materiali h3:before { content: "◆"; color: #f58220; }
.sezione-verifica h3:before { content: "✓"; color: #f58220; }

.sezione-risorsa p {
    margin: 8px 0;
    line-height: 1.55;
}

.sezione-risorsa a {
    font-weight: 600;
}

/* Icone delle risorse: immagine e collegamento centrati e vicini */
.sezione-risorsa p:has(> img[alt="videoclip"]),
.sezione-risorsa p:has(> img[alt="cruciverba"]),
.sezione-risorsa p:has(> img[alt="testo di word"]),
.sezione-risorsa p:has(> img[alt="testo in pdf"]),
.sezione-risorsa p:has(> img[alt="testo audio"]),
.sezione-risorsa p:has(> img[alt="powerpoint"]),
.sezione-risorsa p:has(> img[alt="immagine"]),
.sezione-risorsa p:has(> img[alt="gioco in rete"]) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.sezione-risorsa p:has(> img[alt="videoclip"]) img,
.sezione-risorsa p:has(> img[alt="cruciverba"]) img,
.sezione-risorsa p:has(> img[alt="testo di word"])img,
.sezione-risorsa p:has(> img[alt="testo in pdf"])img,
.sezione-risorsa p:has(> img[alt="testo audio"])img,
.sezione-risorsa p:has(> img[alt="powerpoint"])img,
.sezione-risorsa p:has(> img[alt="immagine"])img,
.sezione-risorsa p:has(> img[alt="gioco in rete"]) img {
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: middle;
}

.sezione-risorsa p:has(> img[alt="videoclip"]) a,
.sezione-risorsa p:has(> img[alt="cruciverba"]) a,
.sezione-risorsa p:has(> img[alt="testo in pdf"])a,
.sezione-risorsa p:has(> img[alt="testo audio"])a,
.sezione-risorsa p:has(> img[alt="powerpoint"])a,
.sezione-risorsa p:has(> img[alt="immagine"])a,
.sezione-risorsa p:has(> img[alt="testo di word"]) a,
.sezione-risorsa p:has(> img[alt="gioco in rete"]) a {
    flex: 0 0 auto;
}

/* Collegamenti agli audio MP3: icona e testo sulla stessa riga */
.sezione-risorsa .mp3-links {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding: 0 0 5px;
	
}

.sezione-risorsa .mp3-links img {
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: middle;

}

.sezione-risorsa .mp3-links a {
    flex: 0 0 auto;
}



/* Presentazioni incorporate: dimensioni e spaziatura del visualizzatore */
.visualizzatore-frame,
.sezione-risorsa .visualizzatore-frame {
    display: block;
    width: 100%;
    max-width: 620px;
    height: 500px !important;
    min-height: 500px !important;
    max-height: 500px !important;
    margin: 0 auto !important;
    border: 0;
}

p:has(> .visualizzatore-frame) {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

/* Adattamento dei contenuti didattici su tablet e smartphone */
@media (max-width: 720px) {
    .contenuto_pagina > .container > .contenuto_container {
        padding: 22px 14px 32px;
        border-radius: 10px;
    }

    .contenuto_container > h2:first-child {
        font-size: 32px;
    }

    .contenuto_container > h2:not(:first-child) {
        font-size: 23px;
        margin-top: 30px;
    }

    .sezione-risorsa {
        padding: 15px;
    }

    .sezione-risorsa h3 {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .subNav {
        gap: 7px;
    }

    .subNav a.button1 {
        padding: 9px 12px;
        font-size: 14px;
    }
}


/* =====================================================
   CARD RIDOTTE - sezione "Le principali sezioni" della homepage
   Non modifica le card laterali della sezione welcome.
   ===================================================== */
.cards > .card-lessons,
.cards > .card-journal,
.cards > .card-games {
    min-height: 220px;
    padding: 8px 10px 12px;
}

.cards > .card-lessons img,
.cards > .card-journal img,
.cards > .card-games img {
    height: 105px;
    margin-bottom: 2px;
}

.cards > .card-lessons h2,
.cards > .card-journal h2,
.cards > .card-games h2 {
    font-size: clamp(19px, 2vw, 27px);
}

.cards > .card-lessons p,
.cards > .card-journal p,
.cards > .card-games p {
    font-size: clamp(13px, 1.25vw, 17px);
}

@media (max-width: 800px) {
    .cards > .card-lessons,
    .cards > .card-journal,
    .cards > .card-games {
        height: 200px;
        min-height: 200px;
    }

    .cards > .card-lessons img,
    .cards > .card-journal img,
    .cards > .card-games img {
        height: 88px;
    }
}

@media (max-width: 390px) {
    .cards > .card-lessons,
    .cards > .card-journal,
    .cards > .card-games {
        height: 180px;
        min-height: 180px;
    }

    .cards > .card-lessons img,
    .cards > .card-journal img,
    .cards > .card-games img {
        height: 75px;
    }
}

/* Riga delle risorse: icone e collegamento centrati */
.sezione-risorsa .link-risorsa {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px;
    width: 100%;
    margin: 12px auto;
    padding: 0;
    text-align: center;
	 
}

.sezione-risorsa .link-risorsa img {
    display: inline-block !important;
    float: none !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    margin: 0 !important;
    vertical-align: middle;
}

.sezione-risorsa .link-risorsa a {
    display: inline-block !important;
    float: none !important;
    margin: 0 !important;
    text-align: center;
}
.immagine-centrata {
    text-align: center;
}

.immagine-centrata img {
    display: inline-block;
    margin: 0 auto;
	text-align: center;
	
}

/* =========================================================
   HOMEPAGE DEI GIOCHI -
   Stili specifici DELL'INDEX.PHP..
   Header, menu, card laterali e footer restano gestiti
   dalle regole generali di Giocoscuola.
   ========================================================= */
   
.container .price-grids .contenuto{
    width:100%;
    height:auto;
}

/* contiene una coppia di giochi */

 .box {
    max-width: 96%;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,.12);
}

.container .price-grids .contenuto .contenitoreCoppia{

    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:20px;
    width:100%;
    margin:20px 0;
    padding:0;
}

/* singolo gioco */

.container .price-grids .contenuto .contenitoreCoppia .giochiGiocoscuola{
    flex:1 1 450px;
    max-width:45%;
	max-height:500px;
    text-align:center;
    padding:10px;
    margin: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,.12);
}
	
	
}

/* titolo */

.container .price-grids .contenuto .contenitoreCoppia .giochiGiocoscuola h2{
    margin-bottom:15px;
}

/* link */

.container .price-grids .contenuto .giochiGiocoscuola a{
    display:block;
}

/* immagine */

.container .price-grids .contenuto .giochiGiocoscuola img{
    width:100%;
    height:auto;
    border-radius:8px;
}

.Stile1 {font-size: 36px}

.contenuto { padding-top:10px; padding-bottom:25px; }

.contenuto .box {
    max-width:1100px;
    margin:0 auto;
    padding:34px 38px 40px;
    background:#fff;
    border-radius:14px;
    box-shadow:0 4px 18px rgba(0,0,0,.10);
}

.contenuto .box > h2.Stile1 {
    margin:0 0 14px;
    padding-bottom:14px;
    text-align:center;
    color:#0667b1;
    font-size:42px;
    line-height:1.15;
    font-weight:700;
}

.contenuto .box > h2.Stile1:after {
    content:"";
    display:block;
    width:90px;
    height:4px;
    margin:12px auto 0;
    background:#f58220;
    border-radius:4px;
}

.contenuto .box > h2:not(.Stile1) {
    margin:0 0 16px;
    text-align:center;
    color:#444;
    font-size:23px;
    line-height:1.4;
    font-weight:600;
}

.contenuto .box > p:nth-of-type(1) {
    margin:12px auto 8px;
    text-align:center;
}

.contenuto .box > p:nth-of-type(1) a {
    display:inline-block;
    padding:10px 20px;
    border-radius:7px;
    background:#f58220;
    color:#fff;
    text-decoration:none;
    line-height:1.35;
}

.contenuto .box > p[style*="text-align:center"] {
    margin:10px 0 22px !important;
}

.contenuto .box > p[style*="text-align:center"] a {
    display:inline-block;
    padding:7px 14px;
    border:1px solid #d8e3ec;
    border-radius:6px;
    background:#f7fafc;
}

.contenitoreCoppia {
    align-items:stretch;
    margin:24px 0 !important;
}

.giochiGiocoscuola {
    display:flex;
    flex-direction:column;
    flex:1 1 430px !important;
    max-width:48% !important;
    min-height:390px;
    padding:0 0 18px !important;
    overflow:hidden;
    border:1px solid #e3e8ed;
    border-top:5px solid #0667b1;
    border-radius:12px !important;
    background:#fff;
    box-shadow:0 4px 14px rgba(0,0,0,.10) !important;
    transition:transform .2s ease,box-shadow .2s ease;
}

.giochiGiocoscuola:hover {
    transform:translateY(-3px);
    box-shadow:0 7px 20px rgba(0,0,0,.15) !important;
}

.giochiGiocoscuola h2 {
    margin:0 !important;
    padding:15px 12px 12px;
    color:#0667b1;
    font-size:26px;
    line-height:1.2;
    font-weight:700;
}

.giochiGiocoscuola a {
    display:block;
    margin:0 16px;
    overflow:hidden;
    border-radius:8px;
}

.giochiGiocoscuola img {
    display:block;
    width:100%;
    height:auto;
    border-radius:8px;
    transition:transform .25s ease;
}

.giochiGiocoscuola a:hover img { transform:scale(1.02); }

.giochiGiocoscuola > p {
    margin:12px 18px 0;
    color:#555;
    font-size:16px;
    line-height:1.5;
}

@media (max-width:700px) {
    .contenuto .box {
        max-width:100%;
        padding:24px 14px 30px;
        border-radius:10px;
    }
    .contenuto .box > h2.Stile1 { font-size:32px; }
    .contenuto .box > h2:not(.Stile1) { font-size:19px; }
    .giochiGiocoscuola {
        max-width:100% !important;
        flex-basis:100% !important;
        min-height:0;
    }
    .giochiGiocoscuola h2 { font-size:23px; }
}

/* ===== FINE AREA GIOCHI - RESTYLING ===== */

/* CORREZIONE FOOTER COMUNITY*/
/* =========================================
   FOOTER SEMPRE IN FONDO ALLA PAGINA
   ========================================= */

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0 !important;

    display: flex;
    flex-direction: column;
}

.page {
    flex: 1 0 auto;
    width: min(1450px, 96%);
    margin: 22px auto 24px;
}

.footer {
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
}