/* RESET BÀSIC */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Mukta Mahee", sans-serif;
  line-height: 1.5;
  color: #222;
  background-color: #f5f5f5;
}

/* VARIABLES */
:root {
  --color-diba: #b41c2a;
  --color-text: #222;
  --color-hero-bg: #76c557;
  --card-yellow: #e6d279;
  --card-blue: #76b6d9;
  --card-pink: #f5b1b1;
  --card-green: #a9cd7e;
  --max-width: 2100px;
}

/* CAPÇALERA SUPERIOR */
.top-bar {
  background-color: #ffffff;
  border-bottom: 1px solid #e3e3e3;
}

.top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-bar-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto;
  text-align: center;
}

.top-bar-text {
  font-size: 0.85rem;
  color: #555;
}

.top-bar-logo {
  width: 86px;
  height: 36px;
  object-fit: contain;
}

.top-bar-brand {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-diba);
  line-height: 1.1;
}

/* CANVI D’IDIOMA */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.lang-link {
  text-decoration: none;
  color: #555;
  font-weight: 500;
}

.lang-link.active {
  color: var(--color-diba);
}

.lang-link:hover {
  text-decoration: underline;
}

.lang-sep {
  color: #999;
}

/* HERO A TOT L’AMPLE */
.hero {
  position: relative;
  width: 100%;
  min-height: 820px;
  background-color: var(--color-hero-bg);
  background-image: url("https://brandedcontentgrupogodo.github.io/edicionsclariana/20251212-dipu-brl/assets/img/hero-edat.jpg"); /* ruta relativa a assets/style.css */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4rem;
}

/* Contenidor intern del hero per central el text */
.hero-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 1rem;
  display: flex;
  justify-content: center;
}

/* Banda fosca amb text */
.hero-text-band {
  width: 100%;
  max-width: 100%;
  background-color: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  text-align: center;
  padding: 2.25rem 2rem;
  backdrop-filter: blur(2px);
  border-radius: 4px;
}

.hero-text-band h1 {
  font-size: clamp(3.4rem, 3.2vw, 3.5rem);
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-text-band p {
  font-size: clamp(1.45rem, 1.1vw, 1.55rem);
  max-width: 900px;
  margin: 0 auto;
}

/* ============ SECCIÓ EDATISME (TEXT + IMATGES LATERALS) ============ */
.section-edatisme {
  background-color: #fdf7ef;
}

.section-edatisme .section-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4.5rem;
}

/* Files principals */
.edat-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
  gap: 3rem;
  align-items: center;
}

.edat-row + .edat-row {
  margin-top: 3.5rem;
}

/* Segona fila: text més ample, imatge una mica més estreta */
.edat-row--bottom {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  align-items: center;
}

/* Imatges */
.edat-media img {
  display: block;
  width: 100%;
  height: auto;
}

/* La segona imatge no ocupa tant, queda més com a “bloc lateral” */
.edat-row--bottom .edat-media img {
  max-width: 430px;
  margin-left: auto;
}

/* Textos */
.edat-text h2 {
  font-size: 1.7rem;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.edat-text h2::after {
  content: "";
  display: block;
  width: 65px;
  height: 5px;
  background-color: #6bb7d6;
  margin-top: 6px;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.edat-text p {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 0.85rem;
}

/* Qualsevol element amb data-animate */
[data-animate] {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Direccions d’entrada */
[data-animate="slide-in-left"] {
  transform: translateX(-60px);
}

[data-animate="slide-in-right"] {
  transform: translateX(60px);
}

/* Estat quan entra en pantalla */
.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* ============ SECCIÓ ACTITUDS INTERACTIVA (RETÍCULA INTERCALADA) ============ */
.section-attituds {
  background-color: #fdf7ef;
}

.section-attituds .section-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4.5rem;
}

/* GRID GENERAL: 3 COLUMNES */
.attituds-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

/* BLOC TÍTOL – fila 1, col 1 */
.attituds-title-block {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
}

.attituds-title-block .attituds-title {
  font-size: 2.8rem;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.1;
  padding-top: 2.4rem;
}

/* BLOC TEXT INTRODUCTORI – fila 3, col 1 */
.attituds-text-block {
  grid-column: 1;
  grid-row: 3;
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 500;
}

/* POSICIÓ DE CADA TARGETA A LA GRAELLA (4 files × 3 columnes) */
.card-1 {
  grid-column: 2;
  grid-row: 1;
}
.card-2 {
  grid-column: 3;
  grid-row: 1;
}

.card-3 {
  grid-column: 1;
  grid-row: 2;
}
.card-4 {
  grid-column: 2;
  grid-row: 2;
}
.card-5 {
  grid-column: 3;
  grid-row: 2;
}

.card-6 {
  grid-column: 2;
  grid-row: 3;
}
.card-7 {
  grid-column: 3;
  grid-row: 3;
}

.card-8 {
  grid-column: 1;
  grid-row: 4;
}
.card-9 {
  grid-column: 2;
  grid-row: 4;
}
.card-10 {
  grid-column: 3;
  grid-row: 4;
}

/* Targeta bàsica (la resta igual que tenies) */
.attitude-card {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  text-align: center;
  font: inherit;
}

.attitude-card:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}

.card-inner {
  position: relative;
  min-height: 230px;
  overflow: hidden;
}

.card-face {
  position: absolute;
  inset: 0;
  padding: 0.4rem 0.4rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.attitude-card--yellow .card-front {
  background-color: var(--card-yellow);
}
.attitude-card--blue .card-front {
  background-color: var(--card-blue);
}
.attitude-card--pink .card-front {
  background-color: var(--card-pink);
}
.attitude-card--green .card-front {
  background-color: var(--card-green);
}

.attitude-card--yellow .card-back {
  background-color: #f3ecbe;
}
.attitude-card--blue .card-back {
  background-color: #c4e1f2;
}
.attitude-card--pink .card-back {
  background-color: #f9d2d2;
}
.attitude-card--green .card-back {
  background-color: #cbe5a8;
}

.card-front {
  opacity: 1;
  transform: translateY(0);
}
.card-back {
  opacity: 0;
  transform: translateY(8px);
  padding: 1.4rem 1.4rem 2rem;
}

.attitude-card:hover .card-front,
.attitude-card:focus-within .card-front {
  opacity: 0;
  transform: translateY(-8px);
}

.attitude-card:hover .card-back,
.attitude-card:focus-within .card-back {
  opacity: 1;
  transform: translateY(0);
}

.card-number {
  font-size: 4.2rem;
  font-weight: 800;
  margin-bottom: -23px;
}

.card-arrow {
  position: relative;
  width: 80px;
  height: 2px;
  background-color: #ffffff;
  margin-bottom: 1.1rem;
}
.card-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #ffffff;
}

.card-front p,
.card-back p {
  font-size: 0.98rem;
  line-height: 1.6;
}
.card-back strong {
  font-weight: 800;
}

.thumb-icon {
  width: 37px;
  height: 42px;
  margin-top: 1.5rem;
  display: block;
}

/* Responsive: desfem el posicionament manual a mòbil */
@media (max-width: 900px) {
  .attituds-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .edat-row {
    grid-template-columns: initial;
  }
  .card-number {
    font-size: 3.2rem;
    font-weight: 800;
  }

  .attituds-grid > * {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

/* ============ SECCIÓ MOSTRA QUE TRENCA ESTEREOTIPS ============ */
.section-mostra {
  background-color: #fdf7ef;
}

.section-mostra .section-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 1.5rem 4.5rem; /* continuació del mateix fons */
}

.mostra-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 3rem;
  align-items: center;
}

.mostra-media img {
  display: block;
  width: 100%;
  height: auto;
}

/* Títol amb barra com a les altres seccions */
.mostra-text h2 {
  font-size: 1.7rem;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.mostra-text h2::after {
  content: "";
  display: block;
  width: 65px;
  height: 5px;
  background-color: #f5aca6;
  margin-top: 6px;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.mostra-text p {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .mostra-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ============ SECCIÓ FINAL ODS ============ */
.section-ods {
  background-color: #fdf7ef;
  padding: 3rem 0 5rem;
}

.section-ods .section-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.ods-box {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.75;
  color: #333;
  padding: 2.2rem 1rem;
  border-top: 2px solid #333;
  border-bottom: 2px solid #333;
  font-style: italic;
}

.reading__disclaimer-text {
  font-size: 1.25rem;
  color: #666;
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}

/* ============ FOOTER CRÈDITS ============ */
.footer-credits {
  background-color: #f2f2f2; /* lleuger gris com la maqueta */
  padding: 3rem 1rem;
  text-align: center;
  color: #555;
  font-size: 0.9rem;
}

.footer-credits h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #444;
}

.footer-credits p {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.6;
}
