:root {
  --mat-green: #0a7067;
  --mat-green-dark: #075149;
  --mat-blue: #0b6f89;
  --mat-blue-deep: #063b50;
  --mat-sky: #62c7d4;
  --mat-gold: #e4b95f;
  --mat-orange: #cf7951;
  --mat-sand: #fbf5e8;
  --mat-cream: #fffdf8;
  --mat-white: #ffffff;
  --mat-ink: #183c3c;
  --mat-muted: #60736f;
  --mat-line: rgba(7, 81, 73, .15);
  --mat-shadow: 0 24px 62px rgba(4, 62, 76, .15);
}
/* Justifica apenas os parágrafos */
p {
  text-align: justify;
}

/* Os títulos permanecem com o alinhamento padrão ou o que você definir */
h1, h2, h3 {
  text-align: left; /* ou center, etc. */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.community-matarandiba {
  margin: 0;
  overflow-x: hidden;
  color: var(--mat-ink);
  background: var(--mat-white);
}
body.community-matarandiba img { display: block; max-width: 100%; }
body.community-matarandiba h1,
body.community-matarandiba h2,
body.community-matarandiba h3,
body.community-matarandiba p,
body.community-matarandiba figure,
body.community-matarandiba blockquote { margin-top: 0; }

.mat-kicker {
  display: inline-flex;
  color: var(--mat-green);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.mat-kicker--light { color: #91e1d6; }
.mat-kicker--gold { color: #f2cb78; }
.mat-lead {
  color: #3d5c58;
  font-size: clamp(1.04rem, 1.7vw, 1.27rem);
  line-height: 1.78;
}
.mat-lead--light { color: rgba(255,255,255,.84); }

.mat-section-heading { max-width: 900px; margin-bottom: 42px; }
.mat-section-heading--center { margin-inline: auto; text-align: center; }
.mat-section-heading h2 {
  margin: 10px 0 16px;
  color: var(--mat-blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: .98;
}
.mat-section-heading p {
  max-width: 790px;
  color: var(--mat-muted);
  font-size: 1.02rem;
  line-height: 1.8;
}
.mat-section-heading--center p { margin-inline: auto; }
.mat-section-heading--light h2,
.mat-section-heading--light p { color: #fff; }

.mat-button {
  display: inline-flex;
  min-height: 50px;
  padding: 13px 21px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  font-size: .87rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.mat-button:hover { transform: translateY(-2px); }
.mat-button--primary {
  color: #fff;
  background: linear-gradient(135deg, #20ada0, var(--mat-green));
  box-shadow: 0 15px 32px rgba(5, 81, 73, .28);
}
.mat-button--glass {
  border: 1px solid rgba(255,255,255,.38);
  color: #fff;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
}

/* HERO */
.mat-hero {
  position: relative;
  min-height: min(790px, calc(100vh - 78px));
  overflow: hidden;
  color: #fff;
  background: #043b4d;
}
.mat-hero__image,
.mat-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.mat-hero__image { object-fit: cover; object-position: center; }
.mat-hero__shade {
  background:
    linear-gradient(90deg, rgba(3,38,51,.9) 0%, rgba(4,66,70,.53) 49%, rgba(4,66,70,.12) 100%),
    linear-gradient(0deg, rgba(2,32,43,.56), transparent 55%);
}
.mat-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: min(710px, calc(100vh - 78px));
  padding-top: 118px;
  padding-bottom: 155px;
  justify-content: center;
  flex-direction: column;
}
.mat-breadcrumbs {
  display: flex;
  margin-bottom: 27px;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
}
.mat-breadcrumbs a { color: inherit; text-decoration: none; }
.mat-hero h1 {
  max-width: 980px;
  margin: 10px 0 22px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 10vw, 8.4rem);
  letter-spacing: -.06em;
  line-height: .86;
  text-shadow: 0 8px 28px rgba(0,30,40,.26);
}
.mat-hero__content > p {
  max-width: 720px;
  margin-bottom: 30px;
  color: rgba(255,255,255,.87);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.72;
}
.mat-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mat-hero__facts {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
  border: 1px solid rgba(255,255,255,.18);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(3,49,60,.76);
  backdrop-filter: blur(18px);
}
.mat-hero__facts article { padding: 22px 25px; }
.mat-hero__facts article + article { border-left: 1px solid rgba(255,255,255,.14); }
.mat-hero__facts strong,
.mat-hero__facts span { display: block; }
.mat-hero__facts strong {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.14rem;
}
.mat-hero__facts span {
  margin-top: 6px;
  color: rgba(255,255,255,.66);
  font-size: .78rem;
  line-height: 1.5;
}

/* NAVEGAÇÃO INTERNA */
.mat-story-nav-wrap {
  position: sticky;
  z-index: 80;
  top: 78px;
  border-bottom: 1px solid var(--mat-line);
  background: rgba(255,255,255,.95);
  box-shadow: 0 10px 25px rgba(5,62,70,.06);
  backdrop-filter: blur(14px);
}
.mat-story-nav { display: flex; overflow-x: auto; scrollbar-width: none; }
.mat-story-nav::-webkit-scrollbar { display: none; }
.mat-story-nav a {
  position: relative;
  display: inline-flex;
  min-height: 58px;
  padding: 15px 16px;
  align-items: center;
  color: #58716d;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.mat-story-nav a::after {
  position: absolute;
  right: 15px;
  bottom: 0;
  left: 15px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--mat-green);
  content: "";
  opacity: 0;
  transform: scaleX(.25);
  transition: opacity .2s ease, transform .2s ease;
}
.mat-story-nav a:hover,
.mat-story-nav a.is-active { color: var(--mat-green-dark); }
.mat-story-nav a.is-active::after { opacity: 1; transform: scaleX(1); }

/* INTRO */
.mat-intro {
  padding: 110px 0;
  background: radial-gradient(circle at 95% 0%, rgba(98,199,212,.11), transparent 28%), #fff;
}
.mat-intro__grid {
  display: grid;
  grid-template-columns: minmax(0,1.08fr) minmax(340px,.72fr);
  gap: 68px;
  align-items: center;
}
.mat-intro__copy h2 {
  max-width: 790px;
  margin: 11px 0 22px;
  color: var(--mat-blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: .99;
}
.mat-intro__copy > p:not(.mat-lead) { color: var(--mat-muted); line-height: 1.8; }
.mat-intro__points { display: grid; margin-top: 34px; gap: 11px; }
.mat-intro__points article {
  display: grid;
  padding: 17px 18px;
  border: 1px solid var(--mat-line);
  border-radius: 17px;
  grid-template-columns: 45px 1fr;
  gap: 15px;
  background: #f7fbfa;
}
.mat-intro__points article > span {
  color: var(--mat-green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 900;
}
.mat-intro__points strong,
.mat-intro__points small { display: block; }
.mat-intro__points small { margin-top: 4px; color: var(--mat-muted); line-height: 1.5; }
.mat-intro__photo { position: relative; margin: 0; }
.mat-intro__photo::before {
  position: absolute;
  z-index: -1;
  top: -22px;
  right: -22px;
  width: 70%;
  height: 64%;
  border-radius: 28px;
  background: linear-gradient(145deg, var(--mat-gold), #f0d99f);
  content: "";
}
.mat-intro__photo img {
  width: 100%;
  min-height: 500px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: var(--mat-shadow);
}
.mat-intro__photo figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  color: rgba(255,255,255,.77);
  background: rgba(3,46,55,.83);
  font-size: .78rem;
  line-height: 1.55;
  backdrop-filter: blur(10px);
}
.mat-intro__photo figcaption span { display: block; color: #fff; font-weight: 900; }

/* EXPERIENCE */
.mat-experience-strip {
  padding: 35px 0;
  border-top: 1px solid var(--mat-line);
  border-bottom: 1px solid var(--mat-line);
  background: var(--mat-sand);
}
.mat-experience-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.mat-experience-grid article {
  display: grid;
  padding: 18px 28px;
  grid-template-columns: 46px 1fr;
  column-gap: 16px;
}
.mat-experience-grid article + article { border-left: 1px solid rgba(7,81,73,.15); }
.mat-experience-grid b {
  display: grid;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  grid-row: 1 / 4;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--mat-blue), var(--mat-green));
  font-size: 1.2rem;
}
.mat-experience-grid span { color: var(--mat-green); font-size: .69rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.mat-experience-grid h3 { margin: 4px 0; color: var(--mat-blue-deep); font-size: 1rem; }
.mat-experience-grid p { margin-bottom: 0; color: var(--mat-muted); font-size: .82rem; line-height: 1.55; }

/* NAME */
.mat-name-section {
  padding: 110px 0;
  background: radial-gradient(circle at 5% 0%, rgba(228,185,95,.17), transparent 24%), linear-gradient(180deg,#fffdf8,#f8f3e8);
}
.mat-name-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.mat-name-card {
  padding: 37px;
  border: 1px solid #e7d8b8;
  border-radius: 26px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 18px 44px rgba(91,64,22,.08);
}
.mat-name-card--main {
  color: #fff;
  background: radial-gradient(circle at 100% 0%, rgba(228,185,95,.2), transparent 30%), linear-gradient(145deg,#06495a,#0a7067);
}
.mat-name-card__label {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  color: #755015;
  background: #f6dfac;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mat-name-card--main .mat-name-card__label { color: #4d3a0e; background: #f4cd78; }
.mat-name-card h3 {
  margin: 20px 0 17px;
  color: var(--mat-blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem,4vw,3.7rem);
  line-height: 1;
}
.mat-name-card--main h3 { color: #fff; }
.mat-name-card p { color: #66736e; line-height: 1.8; }
.mat-name-card--main p { color: rgba(255,255,255,.79); }
.mat-word-path {
  display: flex;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.08);
}
.mat-word-path span,
.mat-word-path strong { padding: 8px 11px; border-radius: 10px; }
.mat-word-path span { color: rgba(255,255,255,.8); background: rgba(255,255,255,.08); }
.mat-word-path b { color: var(--mat-gold); }
.mat-word-path strong { color: var(--mat-blue-deep); background: var(--mat-gold); }
.mat-source-note {
  display: grid;
  margin-top: 21px;
  padding: 25px 28px;
  border-radius: 19px;
  grid-template-columns: auto 1fr;
  gap: 18px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(83,66,30,.07);
}
.mat-source-note strong { color: var(--mat-green-dark); }
.mat-source-note p { margin: 0; color: var(--mat-muted); line-height: 1.7; }

/* HISTORY */
.mat-history-section {
  padding: 110px 0;
  color: #fff;
  background: radial-gradient(circle at 100% 20%, rgba(98,199,212,.18), transparent 27%), linear-gradient(145deg,#052f4f,#064f58 58%,#075643);
}
.mat-history-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: start; }
.mat-history-copy h2 {
  margin: 10px 0 22px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.55rem,5vw,4.85rem);
  line-height: .98;
}
.mat-history-copy > p:not(.mat-lead) { color: rgba(255,255,255,.72); line-height: 1.8; }
.mat-timeline { display: grid; gap: 12px; }
.mat-timeline article {
  display: grid;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  grid-template-columns: 145px 1fr;
  gap: 20px;
  background: rgba(255,255,255,.07);
}
.mat-timeline article > span { color: var(--mat-gold); font-family: Georgia,"Times New Roman",serif; font-size: 1.03rem; font-weight: 900; }
.mat-timeline strong { color: #fff; }
.mat-timeline p { margin: 5px 0 0; color: rgba(255,255,255,.66); font-size: .84rem; line-height: 1.55; }

/* TIDE */
.mat-tide-section { padding: 110px 0; background: #fff; }
.mat-tide-feature { display: grid; grid-template-columns: .78fr 1.22fr; gap: 55px; align-items: center; }
.mat-tide-photo { margin: 0; }
.mat-tide-photo button,
.mat-collapse-photo button,
.mat-photo {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: #073f4b;
  cursor: zoom-in;
}
.mat-tide-photo img { width: 100%; min-height: 590px; object-fit: cover; }
.mat-tide-photo span,
.mat-collapse-photo span,
.mat-photo span {
  position: absolute;
  right: 15px;
  bottom: 15px;
  left: 15px;
  padding: 13px 15px;
  border-radius: 13px;
  color: #fff;
  background: rgba(3,45,56,.76);
  font-size: .77rem;
  font-weight: 800;
  text-align: left;
  backdrop-filter: blur(10px);
}
.mat-chapter-number {
  display: block;
  color: rgba(10,112,103,.11);
  font-family: Georgia,"Times New Roman",serif;
  font-size: 6rem;
  font-weight: 900;
  line-height: .8;
}
.mat-chapter-number--light { color: rgba(255,255,255,.1); }
.mat-tide-copy h3,
.mat-territory-copy h3 {
  margin: 7px 0 18px;
  color: var(--mat-blue-deep);
  font-family: Georgia,"Times New Roman",serif;
  font-size: clamp(2.15rem,4vw,3.8rem);
  line-height: 1;
}
.mat-tide-copy > p { color: var(--mat-muted); line-height: 1.8; }
.mat-tide-facts { display: grid; margin-top: 24px; grid-template-columns: repeat(2,1fr); gap: 11px; }
.mat-tide-facts article {
  padding: 17px;
  border: 1px solid var(--mat-line);
  border-radius: 15px;
  background: #f6faf8;
}
.mat-tide-facts strong,
.mat-tide-facts span { display: block; }
.mat-tide-facts strong { color: var(--mat-green-dark); }
.mat-tide-facts span { margin-top: 5px; color: var(--mat-muted); font-size: .8rem; line-height: 1.5; }
.mat-work-grid { display: grid; margin-top: 58px; grid-template-columns: repeat(3,1fr); gap: 15px; }
.mat-work-card {
  position: relative;
  min-height: 300px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--mat-line);
  border-radius: 23px;
  background: var(--mat-cream);
}
.mat-work-card--featured { color: #fff; background: linear-gradient(145deg,#075e65,#075149); }
.mat-work-card > span {
  position: absolute;
  top: -14px;
  right: 10px;
  color: rgba(7,81,73,.07);
  font-family: Georgia,"Times New Roman",serif;
  font-size: 6.4rem;
  font-weight: 900;
}
.mat-work-card--featured > span { color: rgba(255,255,255,.08); }
.mat-work-card h3 { position: relative; margin: 52px 0 15px; color: var(--mat-blue-deep); font-family: Georgia,"Times New Roman",serif; font-size: 1.65rem; }
.mat-work-card--featured h3 { color: #fff; }
.mat-work-card p { position: relative; color: var(--mat-muted); line-height: 1.7; }
.mat-work-card--featured p { color: rgba(255,255,255,.74); }

/* CULTURE */
.mat-culture-section {
  padding: 110px 0;
  color: #fff;
  background: radial-gradient(circle at 0% 0%, rgba(228,185,95,.15), transparent 25%), linear-gradient(140deg,#052f55,#075d6b 57%,#076b5a);
}
.mat-culture-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.mat-culture-card {
  position: relative;
  min-height: 310px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 23px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.mat-culture-card--featured { background: radial-gradient(circle at 100% 0%, rgba(228,185,95,.2), transparent 28%), rgba(2,41,55,.5); }
.mat-culture-card small { color: #f2ca73; font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.mat-culture-card h3 { margin: 15px 0 17px; color: #fff; font-family: Georgia,"Times New Roman",serif; font-size: 1.75rem; line-height: 1.05; }
.mat-culture-card p { color: rgba(255,255,255,.72); line-height: 1.7; }
.mat-community-memory {
  display: grid;
  margin-top: 32px;
  padding: 31px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 24px;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  background: rgba(255,255,255,.09);
}
.mat-community-memory h3 { margin: 10px 0 13px; color: #fff; font-family: Georgia,"Times New Roman",serif; font-size: 2rem; }
.mat-community-memory p { margin: 0; color: rgba(255,255,255,.72); line-height: 1.75; }
.mat-community-memory a { display: inline-flex; min-height: 48px; padding: 12px 18px; border-radius: 13px; align-items: center; color: var(--mat-blue-deep); background: var(--mat-gold); font-weight: 900; text-decoration: none; }

/* LEGENDS */
.mat-legends-section {
  padding: 110px 0;
  background: radial-gradient(circle at 100% 0%, rgba(207,121,81,.1), transparent 25%), #fffdf8;
}
.mat-legends-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 17px; }
.mat-legend-card {
  position: relative;
  min-height: 440px;
  padding: 30px;
  overflow: hidden;
  border-radius: 25px;
  box-shadow: 0 18px 46px rgba(51,41,22,.1);
}
.mat-legend-card--gold { color: #fff; background: linear-gradient(150deg,#84571b,#cf8d2e); }
.mat-legend-card--forest { color: #fff; background: linear-gradient(150deg,#0b5b47,#183f35); }
.mat-legend-card--fire { color: #fff; background: linear-gradient(150deg,#7a2930,#d36f3e); }
.mat-legend-card__number {
  position: absolute;
  top: -17px;
  right: 10px;
  color: rgba(255,255,255,.12);
  font-family: Georgia,"Times New Roman",serif;
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
}
.mat-legend-card small { position: relative; display: block; margin-top: 45px; color: rgba(255,255,255,.72); font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.mat-legend-card h3 { position: relative; margin: 14px 0 18px; color: #fff; font-family: Georgia,"Times New Roman",serif; font-size: 2rem; line-height: 1; }
.mat-legend-card p { position: relative; color: rgba(255,255,255,.8); line-height: 1.75; }
.mat-legend-card strong { position: relative; display: block; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.2); color: #fff; font-size: .84rem; line-height: 1.55; }
.mat-legend-note { margin-top: 25px; padding: 23px 25px; border-left: 4px solid var(--mat-gold); border-radius: 0 17px 17px 0; background: #fff5dc; }
.mat-legend-note strong { color: #6b4a15; }
.mat-legend-note p { margin: 7px 0 0; color: #716750; line-height: 1.7; }

/* TERRITORY */
.mat-territory-section {
  padding: 110px 0;
  color: #fff;
  background: radial-gradient(circle at 100% 0%, rgba(228,185,95,.14), transparent 24%), linear-gradient(145deg,#342f3d,#0a4f57 52%,#075149);
}
.mat-territory-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 55px; align-items: center; }
.mat-collapse-photo { margin: 0; }
.mat-collapse-photo img { width: 100%; min-height: 560px; object-fit: cover; }
.mat-territory-copy h3 { color: #fff; }
.mat-territory-copy > p { color: rgba(255,255,255,.74); line-height: 1.8; }
.mat-territory-facts { display: grid; margin-top: 24px; grid-template-columns: repeat(2,1fr); gap: 11px; }
.mat-territory-facts article { padding: 17px; border: 1px solid rgba(255,255,255,.14); border-radius: 15px; background: rgba(255,255,255,.08); }
.mat-territory-facts strong,
.mat-territory-facts span { display: block; }
.mat-territory-facts strong { color: #f2cb78; }
.mat-territory-facts span { margin-top: 5px; color: rgba(255,255,255,.68); font-size: .8rem; line-height: 1.5; }
.mat-caution { margin-top: 28px; padding: 23px 25px; border: 1px solid rgba(255,255,255,.15); border-radius: 18px; background: rgba(255,255,255,.08); }
.mat-caution strong { color: #f2cb78; }
.mat-caution p { margin: 7px 0 0; color: rgba(255,255,255,.72); line-height: 1.68; }

/* MEDIA */
.mat-media-section { padding: 110px 0; background: #fff; }
.mat-media-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 25px; align-items: stretch; }
.mat-video-card { display: grid; padding: 22px; border: 1px solid var(--mat-line); border-radius: 28px; gap: 22px; background: var(--mat-sand); }
.mat-video-card video { width: 100%; max-height: 640px; border-radius: 20px; background: #062f3e; object-fit: contain; }
.mat-video-card h3 { margin: 11px 0 10px; color: var(--mat-blue-deep); font-family: Georgia,"Times New Roman",serif; font-size: 2rem; }
.mat-video-card p { color: var(--mat-muted); line-height: 1.7; }
.mat-photo-mosaic { display: grid; grid-template-columns: repeat(2,1fr); grid-template-rows: repeat(2, minmax(260px,1fr)); gap: 15px; }
.mat-photo { height: 100%; border-radius: 24px; }
.mat-photo--tall { grid-row: 1 / 3; }
.mat-photo img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }

/* FACTS */
.mat-facts-section {
  padding: 110px 0;
  background: radial-gradient(circle at 5% 0%, rgba(98,199,212,.1), transparent 24%), var(--mat-sand);
}
.mat-facts-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.mat-fact-card {
  position: relative;
  min-height: 270px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid #e3d8c4;
  border-radius: 22px;
  background: rgba(255,255,255,.8);
}
.mat-fact-card > span { position: absolute; top: -13px; right: 9px; color: rgba(7,81,73,.07); font-family: Georgia,"Times New Roman",serif; font-size: 6.3rem; font-weight: 900; line-height: 1; }
.mat-fact-card h3 { position: relative; margin: 54px 0 14px; color: var(--mat-blue-deep); font-family: Georgia,"Times New Roman",serif; font-size: 1.45rem; line-height: 1.05; }
.mat-fact-card p { position: relative; margin-bottom: 0; color: var(--mat-muted); line-height: 1.65; }
.mat-fact-card--wide { display: grid; min-height: auto; grid-column: 1 / -1; grid-template-columns: 90px 1fr; gap: 20px; color: #fff; background: linear-gradient(145deg,#06495a,#0a7067); }
.mat-fact-card--wide > span { position: static; color: var(--mat-gold); font-size: 4.8rem; }
.mat-fact-card--wide h3 { margin: 0 0 10px; color: #fff; }
.mat-fact-card--wide p { color: rgba(255,255,255,.72); }

/* RESPONSIBLE */
.mat-responsible-section {
  padding: 100px 0;
  color: #fff;
  background: linear-gradient(90deg,rgba(3,47,62,.96),rgba(4,83,72,.92)), url("../../img/matarandiba/hero-matarandiba.webp") center/cover fixed;
}
.mat-responsible-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; }
.mat-responsible-copy h2 { margin: 10px 0 20px; color: #fff; font-family: Georgia,"Times New Roman",serif; font-size: clamp(2.3rem,5vw,4.3rem); line-height: .98; }
.mat-responsible-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.mat-responsible-list article { padding: 21px; border: 1px solid rgba(255,255,255,.17); border-radius: 18px; background: rgba(255,255,255,.09); backdrop-filter: blur(10px); }
.mat-responsible-list strong,
.mat-responsible-list span { display: block; }
.mat-responsible-list strong { color: #fff; }
.mat-responsible-list span { margin-top: 7px; color: rgba(255,255,255,.68); font-size: .82rem; line-height: 1.55; }

/* MURAL */
.mat-memory-section { padding: 110px 0; background: radial-gradient(circle at 8% 15%, rgba(98,199,212,.1), transparent 22%), #f6faf8; }
.mat-mural { overflow: hidden; border: 1px solid var(--mat-line); border-radius: 30px; background: #fff; box-shadow: var(--mat-shadow); }
.mat-mural__header { display: grid; padding: 40px; grid-template-columns: 62px 1fr; gap: 20px; color: #fff; background: radial-gradient(circle at 100% 0%, rgba(228,185,95,.18), transparent 30%), linear-gradient(145deg,#063e5d,#0a7067); }
.mat-mural__icon { display: grid; width: 62px; height: 62px; border-radius: 19px; place-items: center; color: var(--mat-blue-deep); background: var(--mat-gold); font-size: 1.4rem; }
.mat-mural__label { color: #f2cf7c; font-size: .7rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.mat-mural__header h2 { margin: 8px 0 10px; color: #fff; font-family: Georgia,"Times New Roman",serif; font-size: clamp(2.1rem,4vw,3.7rem); line-height: 1; }
.mat-mural__header p { max-width: 740px; margin-bottom: 0; color: rgba(255,255,255,.74); line-height: 1.7; }
.mat-mural__content { display: grid; grid-template-columns: .85fr 1.15fr; }
.mat-mural__form-card,
.mat-mural__feed-card { padding: 36px; }
.mat-mural__form-card { border-right: 1px solid var(--mat-line); background: #fbfdfc; }
.mat-mural__form-card h3,
.mat-mural__feed-card h3 { margin: 0 0 8px; color: var(--mat-blue-deep); font-family: Georgia,"Times New Roman",serif; font-size: 1.8rem; }
.mat-mural__form-card > p { color: var(--mat-muted); font-size: .87rem; line-height: 1.65; }
.mat-field { margin-top: 20px; }
.mat-field label { display: block; margin-bottom: 8px; color: var(--mat-ink); font-size: .8rem; font-weight: 900; }
.mat-field label span { color: var(--mat-muted); font-weight: 600; }
.mat-field input,
.mat-field textarea { width: 100%; padding: 14px 15px; border: 1px solid #ccddd7; border-radius: 13px; outline: none; color: var(--mat-ink); background: #fff; font: inherit; transition: border-color .2s ease, box-shadow .2s ease; }
.mat-field textarea { resize: vertical; }
.mat-field input:focus,
.mat-field textarea:focus { border-color: var(--mat-green); box-shadow: 0 0 0 4px rgba(10,112,103,.1); }
.mat-field__footer { display: flex; margin-top: 7px; justify-content: space-between; gap: 15px; color: var(--mat-muted); font-size: .72rem; }
.mat-field__warning { color: #aa4f34; }
.mat-mural__submit { display: inline-flex; width: 100%; min-height: 50px; margin-top: 20px; border: 0; border-radius: 13px; align-items: center; justify-content: center; gap: 8px; color: #fff; background: linear-gradient(135deg,var(--mat-green),var(--mat-green-dark)); box-shadow: 0 12px 25px rgba(7,86,79,.2); font-weight: 900; cursor: pointer; }
.mat-mural__submit:disabled { box-shadow: none; cursor: not-allowed; opacity: .46; }
.mat-mural__privacy,
.mat-mural__status { color: var(--mat-muted); font-size: .73rem; line-height: 1.5; }
.mat-mural__privacy { margin: 12px 0 0; }
.mat-mural__status { min-height: 22px; margin-top: 10px; font-weight: 800; }
.mat-mural__feed-header { display: flex; margin-bottom: 20px; justify-content: space-between; align-items: flex-start; gap: 15px; }
.mat-mural__feed-header span { color: var(--mat-green); font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.mat-mural__feed-header strong { padding: 7px 10px; border-radius: 999px; color: var(--mat-green-dark); background: #deefe8; font-size: .72rem; }
.mat-mural__list { display: grid; max-height: 620px; overflow-y: auto; gap: 12px; }
.mat-memory-item { padding: 19px; border: 1px solid var(--mat-line); border-radius: 17px; background: #fff; }
.mat-memory-item__top { display: flex; justify-content: space-between; gap: 15px; }
.mat-memory-item strong { color: var(--mat-green-dark); }
.mat-memory-item time { color: var(--mat-muted); font-size: .7rem; }
.mat-memory-item p { margin: 11px 0 0; color: #526661; line-height: 1.65; }
.mat-memory-empty { padding: 30px; border: 1px dashed #bdd5cc; border-radius: 18px; color: var(--mat-muted); background: #f8fbfa; text-align: center; }

/* SOURCES */
.mat-sources-section { padding: 100px 0; background: var(--mat-sand); }
.mat-sources-grid { display: grid; grid-template-columns: .65fr 1.35fr; gap: 70px; }
.mat-sources-grid h2 { margin: 10px 0; color: var(--mat-blue-deep); font-family: Georgia,"Times New Roman",serif; font-size: clamp(2.2rem,4vw,3.8rem); }
.mat-sources-grid > div:first-child p { color: var(--mat-muted); line-height: 1.7; }
.mat-sources-list { display: grid; gap: 11px; }
.mat-sources-list article,
.mat-sources-list aside { padding: 19px 21px; border: 1px solid #e7d8bb; border-radius: 17px; background: rgba(255,255,255,.77); }
.mat-sources-list strong { color: var(--mat-green-dark); }
.mat-sources-list p { margin: 6px 0 0; color: var(--mat-muted); font-size: .85rem; line-height: 1.65; }
.mat-sources-list a { display: inline-flex; margin-top: 9px; color: var(--mat-green-dark); font-size: .8rem; font-weight: 900; text-decoration: none; }
.mat-sources-list aside { border-color: #ddb95e; background: #fff5d9; }

/* LIGHTBOX */
.mat-lightbox { width: min(1080px,calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 0; overflow: hidden; border: 0; border-radius: 24px; background: #041f29; box-shadow: 0 35px 100px rgba(0,0,0,.42); }
.mat-lightbox::backdrop { background: rgba(1,18,25,.82); backdrop-filter: blur(7px); }
.mat-lightbox img { width: 100%; max-height: calc(100vh - 150px); object-fit: contain; }
.mat-lightbox p { margin: 0; padding: 16px 22px 20px; color: rgba(255,255,255,.78); font-size: .82rem; }
.mat-lightbox__close { position: absolute; z-index: 3; top: 13px; right: 13px; display: grid; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; place-items: center; color: #fff; background: rgba(1,31,42,.72); font-size: 1.6rem; cursor: pointer; }

/* ANIMATION */
.mat-reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.mat-reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1120px) {
  .mat-story-nav-wrap { top: 72px; }
  .mat-intro__grid,
  .mat-history-grid,
  .mat-tide-feature,
  .mat-territory-grid,
  .mat-media-grid,
  .mat-responsible-grid { grid-template-columns: 1fr; }
  .mat-name-grid { grid-template-columns: 1fr; }
  .mat-culture-grid,
  .mat-legends-grid { grid-template-columns: repeat(2,1fr); }
  .mat-facts-grid { grid-template-columns: repeat(2,1fr); }
  .mat-intro__photo { max-width: 680px; }
  .mat-mural__content { grid-template-columns: 1fr; }
  .mat-mural__form-card { border-right: 0; border-bottom: 1px solid var(--mat-line); }
}

@media (max-width: 760px) {
  .mat-hero { min-height: 730px; }
  .mat-hero__content { min-height: 625px; padding-top: 95px; padding-bottom: 190px; }
  .mat-hero h1 { font-size: clamp(3.35rem,16vw,5.5rem); }
  .mat-hero__actions { align-items: stretch; flex-direction: column; }
  .mat-hero__facts { grid-template-columns: 1fr; }
  .mat-hero__facts article { padding: 14px 18px; }
  .mat-hero__facts article + article { border-top: 1px solid rgba(255,255,255,.14); border-left: 0; }
  .mat-hero__facts span { display: none; }
  .mat-intro,
  .mat-name-section,
  .mat-history-section,
  .mat-tide-section,
  .mat-culture-section,
  .mat-legends-section,
  .mat-territory-section,
  .mat-media-section,
  .mat-facts-section,
  .mat-memory-section,
  .mat-sources-section { padding: 75px 0; }
  .mat-experience-grid { grid-template-columns: 1fr; }
  .mat-experience-grid article + article { border-top: 1px solid rgba(7,81,73,.15); border-left: 0; }
  .mat-source-note,
  .mat-community-memory { grid-template-columns: 1fr; }
  .mat-timeline article { grid-template-columns: 1fr; gap: 8px; }
  .mat-tide-facts,
  .mat-work-grid,
  .mat-culture-grid,
  .mat-legends-grid,
  .mat-territory-facts,
  .mat-photo-mosaic,
  .mat-facts-grid,
  .mat-responsible-list { grid-template-columns: 1fr; }
  .mat-photo--tall { grid-row: auto; }
  .mat-tide-photo img,
  .mat-collapse-photo img { min-height: 390px; }
  .mat-fact-card--wide { grid-template-columns: 1fr; }
  .mat-mural__header { padding: 29px 24px; grid-template-columns: 1fr; }
  .mat-mural__form-card,
  .mat-mural__feed-card { padding: 25px; }
  .mat-mural__feed-header { flex-direction: column; }
  .mat-sources-grid { grid-template-columns: 1fr; gap: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mat-reveal { opacity: 1; transform: none; transition: none; }
}
