/* =========================================================
   LEGAL BLOG — UI PREMIUM
   Archivo: public/css/style.css
   ========================================================= */

:root {
  --ink: #17211e;
  --muted: #64706b;
  --paper: #fbfaf7;
  --soft: #f2f3ef;
  --green: #123d34;
  --green-2: #1f584a;
  --gold: #a87540;
  --line: #d8dcd7;
  --white: #ffffff;
  --header-h: 76px;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(18, 61, 52, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 22px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

main section[id] {
  scroll-margin-top: calc(var(--header-h) + 22px);
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.narrow {
  width: min(820px, 100%);
}

.section {
  padding: 88px 0;
}

.section-soft {
  background: var(--soft);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0.16em 0;
  color: var(--ink);
  font-family: "Playfair Display", serif;
  font-size: clamp(2.15rem, 4vw, 3.8rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

/* ========================= HEADER ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.94);
  border-bottom: 1px solid rgba(23, 33, 30, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green);
  border: 1px solid rgba(18, 61, 52, 0.55);
  border-radius: 50%;
  font-family: "Playfair Display", serif;
}

.brand-accent {
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  position: relative;
  color: #52605b;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a::after {
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--green);
  content: "";
  transition: width 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--green);
  transition: 0.25s;
}

/* ========================= HERO / BANNER =========================
   Sin overlay. La fotografía conserva sus colores originales.
   La caja de texto usa fondo sólido local para asegurar legibilidad
   sin teñir toda la imagen.
   ================================================================ */

.hero {
  position: relative;
  height: clamp(430px, 48vw, 560px);
  min-height: 430px;
  overflow: hidden;
  background: var(--green);
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* El HTML puede conservar este div, pero ya no altera la fotografía. */
.hero-overlay {
  display: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 640px) 1fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  width: min(100%, 640px);
  padding: 28px 30px;
  border-radius: 18px;
  background: rgba(11, 41, 34, 0.93);
}

.hero .eyebrow {
  margin-bottom: 12px;
  color: #e4bc8d;
}

.hero h1 {
  margin: 0;
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.65rem, 4.8vw, 4.7rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-accent {
  color: #e2bb8e;
  font-style: normal;
}

.hero-copy {
  max-width: 590px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-note {
  align-self: end;
  justify-self: end;
  width: min(100%, 330px);
  margin-bottom: 38px;
  padding: 20px 22px;
  border-radius: 15px;
  background: rgba(11, 41, 34, 0.93);
}

.note-number {
  display: block;
  margin-bottom: 8px;
  color: #e2bb8e;
  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
  line-height: 1;
}

.hero-note p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  line-height: 1.65;
}

/* ========================= AUTOR ========================= */

.author-strip {
  position: relative;
  z-index: 4;
  padding-bottom: 10px;
  background: var(--paper);
}

.author-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: center;
  margin-top: -32px;
  padding: 18px 22px;
  border: 1px solid rgba(23, 33, 30, 0.08);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.author-photo-wrap {
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #dfe8e3;
  box-shadow: 0 0 0 1px rgba(18, 61, 52, 0.12);
}

.author-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
}

.author-copy h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
  line-height: 1.1;
}

.author-copy p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ========================= INTRO ========================= */

.intro p:not(.section-kicker) {
  color: #4f5b56;
  font-size: 1.06rem;
}

/* ========================= ENCABEZADOS ========================= */

.section-heading {
  display: grid;
  grid-template-columns: 1.25fr 0.55fr;
  gap: 70px;
  align-items: end;
  margin-bottom: 38px;
}

.heading-copy {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

/* ========================= IMÁGENES HORIZONTALES =========================
   Más bajas, tipo editorial. Sin overlays, filtros ni opacidad.
   ======================================================================== */

.section-visual,
.rights-visual {
  width: 100%;
  height: clamp(220px, 24vw, 310px);
  margin: 0 0 34px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #dfe8e3;
}

.section-visual img,
.rights-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
  opacity: 1;
}

/* ========================= MODALIDADES ========================= */

.mode-card {
  display: grid;
  grid-template-columns: 70px 0.85fr 1.35fr;
  gap: 34px;
  margin-bottom: 16px;
  padding: 36px;
  border: 1px solid rgba(23, 33, 30, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.mode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(18, 61, 52, 0.07);
}

.mode-index {
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  color: var(--green);
  border-radius: 999px;
  background: #dfe9e4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-main h3 {
  margin: 15px 0;
  color: var(--green);
  font-family: "Playfair Display", serif;
  font-size: 1.9rem;
  line-height: 1.1;
}

.lead {
  color: #52605b;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 28px;
}

.facts h4 {
  margin: 0 0 5px;
  font-size: 0.88rem;
}

.facts p {
  margin: 0;
  color: #5d6964;
  font-size: 0.88rem;
}

.facts .warning {
  grid-column: 1 / -1;
  padding: 15px 17px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: #f7f1e9;
}

/* ========================= DERECHOS ========================= */

.rights-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rights-grid article {
  padding: 28px 20px;
  border-right: 1px solid var(--line);
}

.rights-grid article:last-child {
  border-right: 0;
}

.rights-grid span,
.advice-grid span {
  color: var(--gold);
  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
}

.rights-grid h3,
.advice-grid h3 {
  margin: 14px 0 9px;
  font-size: 1rem;
}

.rights-grid p {
  margin: 0;
  color: #5d6864;
  font-size: 0.86rem;
}

/* ========================= CONSEJOS ========================= */

.advice {
  background: #103b32;
  color: #fff;
}

.advice .section-kicker {
  color: #e4bc8d;
}

.advice h2 {
  max-width: 820px;
  color: #fff;
}

.advice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 42px;
}

.advice-grid article {
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.055);
}

.advice-grid h3 {
  color: #fff;
}

.advice-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

/* ========================= REFLEXIÓN / BANNER =========================
   Imagen original, sin overlay. El contenido va en tarjeta independiente.
   ===================================================================== */

.reflection-section {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0b2922;
}

.reflection-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: none;
  opacity: 1;
}

.reflection-overlay {
  display: none;
}

.reflection {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 58px;
  margin-top: 58px;
  margin-bottom: 58px;
  padding: 38px 42px;
  border: 0;
  border-radius: 20px;
  background: rgba(11, 41, 34, 0.94);
  color: #fff;
  backdrop-filter: none;
}

.reflection .section-kicker {
  color: #e4bc8d;
}

.reflection h2 {
  color: #fff;
  font-size: clamp(2rem, 3.6vw, 3.45rem);
}

.reflection-copy {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
}

.reflection-copy p:first-child {
  margin-top: 0;
}

.reflection-final {
  padding-left: 18px;
  border-left: 3px solid #dfbd95;
  color: #fff !important;
  font-family: "Playfair Display", serif;
  font-size: 1.25rem !important;
}

/* ========================= FUENTES ========================= */

.sources > p {
  max-width: 780px;
  color: var(--muted);
}

.source-list {
  margin-top: 35px;
  border-top: 1px solid var(--line);
}

.source-list a {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 35px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding 0.2s ease, color 0.2s ease;
}

.source-list a:hover {
  padding-left: 10px;
  color: var(--green);
}

.source-list span {
  color: #707b77;
  font-size: 0.82rem;
}

.source-list strong {
  font-size: 0.9rem;
  text-align: right;
}

/* ========================= FOOTER ========================= */

footer {
  padding: 34px 0;
  background: #0b1915;
  color: #d9dfdc;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-inner p {
  margin: 3px 0;
  color: #91a099;
  font-size: 0.83rem;
}

/* ========================= TABLET ========================= */

@media (max-width: 1000px) {
  .hero {
    height: 520px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 600px) 1fr;
    gap: 24px;
  }

  .hero-content {
    padding: 26px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.2rem);
  }

  .hero-note {
    width: 260px;
  }

  .mode-card {
    grid-template-columns: 60px 1fr;
  }

  .facts {
    grid-column: 2;
  }

  .rights-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rights-grid article {
    border-bottom: 1px solid var(--line);
  }

  .rights-grid article:nth-child(2n) {
    border-right: 0;
  }

  .reflection {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ========================= MÓVIL ========================= */

@media (max-width: 760px) {
  :root {
    --header-h: 68px;
  }

  .container {
    width: min(100% - 32px, 1180px);
  }

  .section {
    padding: 68px 0;
  }

  .nav {
    height: var(--header-h);
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    right: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(251, 250, 247, 0.99);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.2s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links a {
    padding: 13px 12px;
  }

  .nav-links a::after {
    display: none;
  }

  .menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    height: auto;
    min-height: 500px;
  }

  .hero-bg {
    object-position: 62% center;
  }

  .hero-grid {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 80px;
    padding-bottom: 22px;
  }

  .hero-content {
    width: 100%;
    padding: 22px;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.6rem);
  }

  .hero-copy {
    margin-top: 16px;
    font-size: 0.92rem;
  }

  .hero-note {
    align-self: stretch;
    justify-self: auto;
    width: 100%;
    margin: 0;
    padding: 15px 18px;
  }

  .note-number {
    font-size: 1.25rem;
  }

  .hero-note p {
    font-size: 0.8rem;
  }

  .author-card {
    grid-template-columns: 82px 1fr;
    gap: 18px;
    margin-top: -22px;
    padding: 15px;
  }

  .author-photo-wrap {
    width: 82px;
    height: 82px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .section-visual,
  .rights-visual {
    height: 230px;
    border-radius: 16px;
  }

  .mode-card {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .mode-index {
    display: none;
  }

  .facts {
    grid-column: auto;
  }

  .advice-grid {
    grid-template-columns: 1fr;
  }

  .reflection-section {
    min-height: auto;
    padding: 42px 0;
  }

  .reflection {
    margin: 0 auto;
    padding: 28px;
    border-radius: 17px;
  }

  .source-list a {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .source-list strong {
    text-align: left;
  }

  .footer-inner {
    display: block;
  }

  .footer-inner > p {
    margin-top: 16px;
  }
}

/* ========================= MÓVIL PEQUEÑO ========================= */

@media (max-width: 520px) {
  .container {
    width: min(100% - 26px, 1180px);
  }

  .hero {
    min-height: 470px;
  }

  .hero-grid {
    min-height: 470px;
  }

  .hero-content {
    padding: 19px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 10.5vw, 3rem);
  }

  .hero .eyebrow {
    font-size: 0.62rem;
  }

  .hero-copy {
    line-height: 1.55;
  }

  .author-card {
    grid-template-columns: 68px 1fr;
    margin-top: -18px;
    padding: 13px;
  }

  .author-photo-wrap {
    width: 68px;
    height: 68px;
  }

  .author-copy h2 {
    font-size: 1.25rem;
  }

  .author-copy p:last-child {
    display: none;
  }

  .section-visual,
  .rights-visual {
    height: 190px;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .facts .warning {
    grid-column: auto;
  }

  .rights-grid {
    grid-template-columns: 1fr;
  }

  .rights-grid article {
    border-right: 0;
  }

  .reflection {
    padding: 23px 20px;
  }

  .reflection h2 {
    font-size: 2rem;
  }
}