/* ==========================================================
   MEXUN · PALETA AZUL SOLAR (PROPUESTA)
   Azul corporativo + azul tecnológico + amarillo solar.
   Se conserva el nombre --verde porque el CSS original lo
   utiliza en numerosos selectores; ahora representa azul.
   Guarda una copia del CSS anterior antes de reemplazarlo.
   ========================================================== */

/* ==========================================================
   01. VARIABLES Y BASE
   CSS con anidación nativa: no requiere compilar LESS.
   Edita aquí la paleta y las dimensiones compartidas.
   ========================================================== */
:root {
  --azul: #103b68;
  --azul-profundo: #082744;
  --verde: #236ca8;
  /* azul secundario; nombre conservado por compatibilidad */
  --verde-natural: #26856a;
  /* verde solo para detalles sostenibles */
  --verde-claro: #e9f3fc;
  --dorado: #ffc84c;
  --papel: #f8fbff;
  --blanco: #fff;
  --texto: #173954;
  --secundario: #5d7185;
  --linea: #dbe6f0;
  --radio: 16px;
  --sombra: 0 18px 50px #08274412;
  --ancho: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 115px;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at 0% 25%, #d6eafb8c, transparent 42%), radial-gradient(ellipse at 100% 60%, #ffde8840, transparent 40%), var(--papel);
  color: var(--texto);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -.045em;
}

h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.8rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 600;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -.025em;
}

p {
  color: var(--secundario);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s, background .2s, transform .2s, box-shadow .2s;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  transition: color .2s, background .2s, transform .2s;
}

img,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid #986000;
  outline-offset: 5px;
}

::selection {
  color: var(--azul);
  background: var(--dorado);
}

em {
  font-style: normal;
  color: var(--dorado);
}

/* ==========================================================
   02. CLASES GLOBALES REUTILIZABLES
   ========================================================== */
.contenedor {
  width: min(var(--ancho), calc(100% - 64px));
  margin-inline: auto;
}

.seccion {
  padding-block: 96px;
}

.antetitulo {
  display: block;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .15em;
  line-height: 1.6;
  color: var(--verde);
  margin-bottom: 20px;
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 50px;
  border: 1px solid transparent;
  padding: 13px 23px;
  border-radius: 8px;
  background: var(--dorado);
  color: var(--azul-profundo);
  font-size: .9rem;
  font-weight: 700;
  text-align: center;

  &:hover {
    background: #ffdc82;
    transform: translateY(-2px);
    box-shadow: var(--sombra);
  }

  &.boton-pequeno {
    min-height: 44px;
    padding: 10px 16px;
    font-size: .78rem;
    gap: 12px;
  }
}

.enlace {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-size: .85rem;
  font-weight: 700;
  padding-block: 8px;
  border-bottom: 1px solid currentColor;

  &:hover {
    color: var(--verde);
    transform: translateX(3px);
  }

  &.enlace-claro {
    color: #e9f2fb;

    &:hover {
      color: var(--dorado);
    }
  }
}

.texto-pequeno {
  font-size: .78rem;
  line-height: 1.65;
}

.etiqueta {
  font-size: .65rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  font-weight: 700;
}

.titulo-seccion {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 34px;

  & p {
    max-width: 355px;
    font-size: .95rem;
  }
}

.saltar {
  position: fixed;
  left: 15px;
  top: -100px;
  z-index: 100;
  background: var(--dorado);
  padding: 12px;
  border-radius: 8px;

  &:focus {
    top: 15px;
  }
}

/* ==========================================================
   03. ENCABEZADO Y MENÚ CON TRANSPARENCIA
   ========================================================== */
.encabezado {
  position: sticky;
  top: 12px;
  z-index: 40;
  width: min(1320px, calc(100% - 32px));
  margin: 12px auto -102px;
  border-radius: 18px;
  color: var(--dorado);
  /* background: #f5faffeb; */
  border: 1px solid #ffffffc9;
  box-shadow: 0 10px 35px #081f3918, inset 0 1px #fff;
  backdrop-filter: blur(70px);
  -webkit-backdrop-filter: blur(24px);
}

.barra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  min-height: 78px;
  width: calc(100% - 40px);
}

.marca {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1;
  white-space: nowrap;
  padding-bottom: 13px;
}

.simbolo {
  font-size: 2.5rem;
  color: #bb8623;
  font-weight: 400;
}

.marca-detalle {
  position: absolute;
  left: 49px;
  bottom: 4px;
  font-size: .48rem;
  letter-spacing: .17em;
  font-weight: 600;
}

.menu {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: .8rem;
  font-weight: 600;

  & a:not(.boton):hover,
  & a[aria-current="page"]:not(.boton) {
    color: var(--verde);
    text-decoration: underline;
    text-underline-offset: 8px;
  }
}

.alternar-menu {
  margin: auto;
  background: transparent;
  border: 1px solid var(--linea);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--dorado);
}

/* ==========================================================
   04. PORTADA Y CARRUSEL
   ========================================================== */
.portada {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-image: url("imagenes/fondo2.avif");
  /* background: radial-gradient(ellipse at 80% 25%, #2063a6 0%, transparent 55%), linear-gradient(120deg, #082b52, #134b83 70%, #2868a0); */
  color: var(--blanco);
  padding: 175px 0 42px;

  &::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .12;
    background-image: linear-gradient(#aed1f244 1px, transparent 1px), linear-gradient(90deg, #aed1f244 1px, transparent 1px);
    background-size: 66px 66px;
    mask-image: linear-gradient(transparent, #000, transparent);
  }
}

.portada-rejilla {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 70px;
  align-items: center;
}

.portada-texto {
  & .antetitulo {
    color: #d1e4f5;
    font-size: .63rem;
    letter-spacing: .12em;
  }

  & h1 {
    font-size: clamp(3.3rem, 6.8vw, 6rem);
    line-height: .99;
    letter-spacing: -.065em;
  }

  &>p {
    color: #d7e7f6;
    font-size: 1rem;
    max-width: 420px;
    margin-top: 28px;
  }
}

.punto {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dorado);
  margin-right: 5px;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  margin-block: 32px 38px;
}

.sello {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #ffffff24;
  padding-top: 22px;
  max-width: 390px;

  &>span {
    font-size: 2rem;
    color: var(--dorado);
  }

  & p {
    color: #bbd3ea;
    font-size: .59rem;
    letter-spacing: .08em;
  }

  & strong {
    display: block;
    color: #f0f6fc;
    font-size: .8rem;
    letter-spacing: 0;
    font-weight: 400;
    margin-top: 2px;
  }
}

.carrusel {
  min-width: 0;
  position: relative;
  border-radius: 24px;
  padding: 10px;
  border: 1px solid #ffffff5c;
  overflow: hidden;
  background: #ffffff16;
  backdrop-filter: blur(18px);
  box-shadow: 0 35px 70px #071e3b45, inset 0 1px #ffffff52;
  transform: rotate(2deg);

  & .diapositivas {
    position: relative;
    height: 410px;
    border-radius: 17px;
    overflow: hidden;
  }

  & .diapositiva {
    height: 100%;
    position: relative;
    animation: aparecer .65s ease both;

    &::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(transparent 38%, #081f3ce8);
      pointer-events: none;
    }

    & img,
    & video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    & video {
      object-fit: contain;
      background: #10395e;
    }

    & figcaption {
      position: absolute;
      z-index: 1;
      bottom: 30px;
      left: 26px;
      right: 26px;

      & .etiqueta {
        color: var(--dorado);
      }

      & h2 {
        font-size: 1.7rem;
        max-width: 340px;
        margin-top: 10px;
      }
    }
  }

  & .controles {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 14px;
  }

  & .contador {
    font-size: .7rem;
    color: #d4e5f5;
    margin-right: auto;
    white-space: nowrap;
  }

  & .credito {
    font-size: .58rem;
    color: #cbdfee;
    padding: 0 14px 7px;
  }
}

.indicadores {
  display: flex;
  gap: 3px;

  & button {
    width: 24px;
    height: 32px;
    border: 0;
    padding: 8px 4px;
    background: transparent;

    &::after {
      content: "";
      display: block;
      width: 100%;
      height: 3px;
      border-radius: 2px;
      background: #a5bfd5;
    }

    &[aria-pressed="true"]::after {
      background: var(--dorado);
    }
  }
}

.control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  background: transparent;
  border: 1px solid #ffffff50;
  border-radius: 50%;
  color: white;
  font-size: 1rem;

  &:hover {
    background: #ffffff20;
  }

  &.control-video {
    border-radius: 6px;
    font-size: .75rem;
    padding: 4px 12px;
    margin-top: 12px;
  }
}

.franja {
  background: var(--verde-claro);
  border-bottom: 1px solid var(--linea);

  & .contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-block: 24px;
  }

  & span {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--verde);
  }

  & p {
    color: var(--texto);
    font-size: .8rem;
  }
}

/* ==========================================================
   05. SERVICIOS, PROCESO Y GALERÍA
   ========================================================== */
.rejilla-servicios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tarjeta-servicio {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border-radius: 22px;
  border: 1px solid #ffffffed;
  background: linear-gradient(135deg, #ffffffd9, #ffffff70);
  box-shadow: 0 15px 40px #145c9c10, inset 0 1px #fff;
  backdrop-filter: blur(18px);
  transition: transform .3s, box-shadow .3s, border-color .3s;

  &:hover {
    transform: translateY(-7px);
    box-shadow: 0 25px 45px #145c9c24;
    border-color: #9ac4e8;
  }

  & .icono {
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: 12px;
    background: #dfeefc;
    color: var(--verde);
    margin-bottom: 32px;
  }

  & .numero {
    position: absolute;
    right: 25px;
    top: 26px;
    color: #5a88ab;
    font-size: .8rem;
  }

  & h3 {
    margin-bottom: 15px;
  }

  & p {
    font-size: .85rem;
    margin-bottom: 22px;
  }

  & .enlace {
    align-self: start;
    margin-top: auto;
    font-size: .77rem;
  }

  &:nth-child(2) {
    background: linear-gradient(135deg, #fff7d9e6, #ffffff80);
  }

  &:nth-child(3) {
    background: linear-gradient(135deg, #e1f0f6e6, #ffffff80);
  }
}

.proceso {
  position: relative;
  background: linear-gradient(125deg, #dcebfaa6, #eef6ffa6);
  border-block: 1px solid #fff;

  &::before {
    content: "";
    position: absolute;
    width: 230px;
    height: 230px;
    border: 1px solid #6b9fca30;
    border-radius: 50%;
    top: 40px;
    right: 7%;
    pointer-events: none;
  }
}

.proceso-rejilla {
  display: grid;
  grid-template-columns: 1fr;
  gap: 35px;

  &>div:first-child {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 20px;

    & .antetitulo {
      width: 100%;
      margin: 0;
    }

    & h2 {
      margin-right: auto;
    }
  }
}

.pasos {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;

  & li {
    display: block;
    padding: 28px;
    border: 1px solid #ffffffdb;
    border-radius: 18px;
    background: #ffffff78;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 25px #164e8a10;

    &>span {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: var(--verde);
      color: #fff;
      font-size: .75rem;
      margin-bottom: 25px;
    }

    & h3 {
      font-size: 1.1rem;
      margin-bottom: 10px;
    }

    & p {
      font-size: .87rem;
    }
  }
}

.rejilla-galeria {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 22px;
  margin-top: 30px;
}

.proyecto {
  min-width: 0;

  & .abrir-imagen {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--azul);
  }

  & img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: contain;
    transition: transform .5s;
  }

  & a:hover img {
    transform: scale(1.025);
  }

  & .ampliar {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid #ffffff65;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    background: #ffffff15;
    backdrop-filter: blur(10px);
  }

  & figcaption {
    padding: 18px 0 0;
  }

  & .etiqueta {
    color: var(--verde);
    font-size: .6rem;
  }

  & h3 {
    font-size: 1.08rem;
    margin-top: 7px;
  }
}

.barra-filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;

  & p {
    margin-left: auto;
    font-size: .85rem;
  }
}

.filtro {
  padding: 11px 24px;
  border: 1px solid var(--linea);
  border-radius: 50px;
  background: transparent;
  color: var(--texto);
  font-size: .85rem;

  &:hover {
    background: var(--verde-claro);
  }

  &[aria-pressed="true"] {
    background: var(--verde);
    color: white;
    border-color: var(--verde);
  }
}

/* ==========================================================
   06. CONTACTO Y FORMULARIO
   ========================================================== */
.contacto {
  position: relative;
  background: radial-gradient(ellipse at 90% 0, #337fba4f, transparent 65%), radial-gradient(ellipse at 5% 95%, #f4b42b25, transparent 60%), var(--azul);
  color: white;

  & .antetitulo {
    color: var(--dorado);
  }

  & h2 {
    margin-bottom: 24px;
  }

  & .rejilla-contacto>div>p {
    max-width: 400px;
    margin-bottom: 25px;
    color: #d1e1f0;
  }

  & .enlace {
    color: var(--dorado);
    overflow-wrap: anywhere;
  }
}

.rejilla-contacto {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 80px;
  align-items: center;
}

.nota-contacto {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 48px;

  &>span {
    font-size: 2rem;
    color: var(--dorado);
  }

  & p {
    font-size: .8rem;
    color: #d1e1f0;
  }

  & strong {
    color: white;
    font-weight: 400;
  }
}

.formulario {
  min-width: 0;
  padding: 34px;
  background: linear-gradient(135deg, #ffffff21, #ffffff08);
  border: 1px solid #ffffff40;
  border-radius: 24px;
  box-shadow: 0 25px 65px #00142d45, inset 0 1px #ffffff33;
  backdrop-filter: blur(20px);

  & h3 {
    margin-bottom: 25px;
    font-size: 1.4rem;
  }

  & .texto-pequeno {
    color: #d9e8f6;
    margin-block: 16px;
  }

  & .boton {
    width: 100%;
  }
}

.campos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 6px;

  & label {
    font-size: .75rem;
  }

  & input,
  & textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #ffffff45;
    border-radius: 6px;
    background: #08274466;
    color: white;
    padding: 12px;
    font-size: .9rem;

    &::placeholder {
      color: #aabed1;
    }

    &:focus {
      border-color: var(--dorado);
    }
  }

  & textarea {
    resize: vertical;
    min-height: 110px;
  }

  &.campo-completo {
    grid-column: 1/-1;
  }
}

.estado {
  font-size: .85rem;
  color: #ffe49b;
  margin-top: 15px;

  &:empty {
    display: none;
  }
}

/* ==========================================================
   07. PÁGINAS INTERIORES
   ========================================================== */
.cabecera-interior {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 80% 20%, #246fa9, transparent 60%), linear-gradient(125deg, #103b68, #144b7c);
  color: white;
  padding: 155px 0 70px;

  & .miga {
    display: block;
    width: fit-content;
    color: #d0e0ee;
    font-size: .8rem;
    margin-bottom: 32px;

    &:hover {
      color: var(--dorado);
    }
  }

  & .antetitulo {
    color: var(--dorado);
  }

  & p {
    color: #d1e1f0;
    max-width: 620px;
    margin-top: 25px;
  }
}

.accesos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;

  & a {
    padding: 10px 15px;
    border: 1px solid #ffffff40;
    border-radius: 6px;
    font-size: .8rem;

    &:hover {
      background: #ffffff16;
    }
  }
}

.detalle-servicio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 65px;
  align-items: center;
  padding-block: 80px;
  border-bottom: 1px solid var(--linea);

  &:nth-child(even) .detalle-visual {
    order: 2;
  }

  & h2 {
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    margin-bottom: 20px;
  }

  & .antetitulo {
    font-size: .65rem;
  }

  & .enlace {
    margin-top: 16px;
  }
}

.detalle-visual {
  position: relative;

  & img {
    border-radius: var(--radio);
    width: 100%;
  }

  & .numero-grande {
    position: absolute;
    bottom: 10px;
    left: 25px;
    color: var(--dorado);
    font-size: 4rem;
    line-height: 1;
    letter-spacing: -.08em;
    font-weight: 700;
  }
}

.lista {
  padding-left: 22px;
  color: var(--secundario);
  font-size: .9rem;

  & li {
    padding-block: 5px;

    &::marker {
      color: var(--verde);
    }
  }
}

.entregable {
  padding: 15px 18px;
  background: var(--verde-claro);
  border-left: 3px solid var(--verde);
  font-size: .85rem;
  margin-block: 18px;
}

.preguntas {
  background: var(--verde-claro);

  & h2 {
    margin-bottom: 35px;
  }

  & details {
    border-bottom: 1px solid #c7ddec;
    padding: 20px 0;
  }

  & summary {
    font-weight: 600;
    cursor: pointer;
  }

  & details p {
    margin: 15px 0 0;
    max-width: 800px;
  }
}

.llamada {
  padding: 60px 0;
  background: var(--verde-claro);

  & .contenedor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
  }

  & h2 {
    font-size: 2rem;
    max-width: 620px;
  }
}

/* ==========================================================
   08. PIE, WHATSAPP Y VISORES
   ========================================================== */
.pie {
  background: var(--azul-profundo);
  color: #f4f8ff;
  padding-top: 55px;

  & h2 {
    font-size: .85rem;
    letter-spacing: 0;
    margin-bottom: 20px;
  }

  & p {
    color: #bdd0e0;
    font-size: .85rem;
  }

  & .pie-superior>div>a:not(.marca) {
    display: block;
    font-size: .8rem;
    margin-bottom: 10px;
    overflow-wrap: anywhere;

    &:hover {
      color: var(--dorado);
    }
  }
}

.pie-superior {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 45px;
}

.pie-inferior {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #ffffff24;
  padding-block: 20px 95px;
  color: #bdd0e0;
  font-size: .65rem;
}

.redes {
  display: flex;
  gap: 10px;
  margin-top: 18px;

  & a {
    display: grid;
    place-items: center;
    border: 1px solid #ffffff35;
    width: 40px;
    height: 40px;
    border-radius: 50%;

    &:hover {
      background: #ffffff24;
    }
  }

  & svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
  }
}

.whatsapp {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 19px;
  border-radius: 50px;
  background: #236ca8;
  color: white;
  box-shadow: 0 5px 25px #0003;
  border: 1px solid #ffffff80;
  font-size: .8rem;
  font-weight: 600;

  & svg {
    width: 25px;
    height: 25px;
  }

  &:hover {
    background: #176399;
    transform: translateY(-3px);
  }
}

.visor {
  position: fixed;
  border: 0;
  width: min(560px, calc(100% - 32px));
  max-height: 90dvh;
  padding: 45px 28px 28px;
  border-radius: var(--radio);
  background: var(--papel);
  color: var(--texto);
  box-shadow: var(--sombra);

  &::backdrop {
    background: #071d3cd9;
    backdrop-filter: blur(7px);
  }

  & h2 {
    font-size: 1.5rem;
    margin: 18px 0 10px;
  }

  & .cerrar {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: var(--azul);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
  }

  &.visor-imagen {
    width: min(960px, calc(100% - 32px));

    & img {
      width: 100%;
      max-height: 65dvh;
      object-fit: contain;
    }
  }
}

body.visor-abierto {
  overflow: hidden;
}

@keyframes aparecer {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ==========================================================
   09. TABLETAS Y TELÉFONOS
   Cuadrículas: una, dos y tres/cuatro columnas según espacio.
   ========================================================== */
@media (max-width: 1100px) {
  .menu {
    gap: 18px;

    & .boton {
      display: none;
    }
  }

  .portada-rejilla {
    gap: 30px;
  }

  .acciones {
    gap: 15px;
  }

  .rejilla-servicios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rejilla-contacto {
    gap: 40px;
  }

  .franja .contenedor {
    flex-wrap: wrap;
    justify-content: center;

    &>span:first-child {
      width: 100%;
      text-align: center;
    }
  }
}

@media (max-width: 800px) {
  .contenedor {
    width: calc(100% - 40px);
  }

  .seccion {
    padding-block: 65px;
  }

  .barra {
    flex-wrap: wrap;
    padding-block: 12px;
    min-height: 68px;
  }

  .alternar-menu:not([hidden]) {
    display: block;
  }

  .menu {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;

    & a {
      padding: 12px;
      text-align: center;
    }
  }

  .portada-rejilla,
  .proceso-rejilla,
  .rejilla-contacto,
  .detalle-servicio {
    grid-template-columns: 1fr;
  }

  .portada {
    padding-top: 150px;
  }

  .portada-texto {
    & h1 {
      font-size: clamp(3rem, 8vw, 4.5rem);
    }

    &>p {
      max-width: 540px;
    }
  }

  .carrusel .diapositivas {
    height: 400px;
  }

  .titulo-seccion {
    align-items: start;
    flex-direction: column;
    gap: 20px;

    & p {
      max-width: 550px;
    }
  }

  .rejilla-galeria {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detalle-servicio {
    gap: 30px;
    padding-block: 55px;

    &:nth-child(even) .detalle-visual {
      order: 0;
    }
  }

  .proceso-rejilla {
    gap: 40px;
  }

  .pie-superior {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    &>div:first-child {
      grid-column: 1/-1;
    }
  }

  .llamada .contenedor {
    align-items: start;
    flex-direction: column;
  }
}

@media (min-width: 801px) {
  .alternar-menu {
    display: none;
  }
}

@media (max-width: 520px) {
  .contenedor {
    width: calc(100% - 32px);
  }

  .portada-texto h1 {
    font-size: clamp(2.65rem, 10vw, 3.5rem);
  }

  .rejilla-servicios,
  .rejilla-galeria,
  .campos,
  .pie-superior {
    grid-template-columns: 1fr;
  }

  .tarjeta-servicio {
    padding: 25px;

    & .icono {
      margin-bottom: 22px;
    }
  }

  .carrusel {
    & .diapositivas {
      height: 380px;
    }

    & .diapositiva figcaption {
      left: 20px;
      right: 20px;

      & h2 {
        font-size: 1.45rem;
      }
    }

    & .controles {
      padding-inline: 15px;
      gap: 8px;
    }
  }

  .franja .contenedor {
    gap: 14px;

    &>span:not(:first-child) {
      display: none;
    }

    & p {
      font-size: .72rem;
    }
  }

  .formulario {
    padding: 24px 18px;
  }

  .pie-inferior {
    flex-direction: column;
    gap: 10px;
  }

  .whatsapp {
    right: 15px;
    bottom: 15px;
    padding: 13px;

    & span {
      display: none;
    }
  }

  .barra-filtros {
    & p {
      width: 100%;
      margin-left: 0;
    }

    & button {
      padding: 10px 16px;
    }
  }
}

/* Respeto a la preferencia de movimiento reducido del dispositivo. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================
   10. BLOG PÚBLICO, LECTURA Y ADMINISTRACIÓN
   ========================================================== */
.rejilla-blog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.tarjeta-blog {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  overflow: hidden;
  background: white;

  & .cubierta-blog {
    min-height: 145px;
    background: radial-gradient(circle at 80% 20%, #ffc84c33, transparent 45%), var(--azul);
    color: var(--dorado);
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 24px;
    gap: 15px;

    &>span:first-child {
      font-size: 3.6rem;
      line-height: 1;
    }
  }

  & .cuerpo-blog {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 25px;
  }

  & h3 {
    font-size: 1.4rem;
    overflow-wrap: anywhere;

    & a:hover {
      color: var(--verde);
    }
  }

  & .enlace {
    align-self: start;
    margin-top: auto;
  }
}

.paginacion,
.acciones-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
}

.contenedor-lectura {
  max-width: 840px;
}

.cabecera-articulo {
  margin-top: 45px;

  & h1 {
    font-size: clamp(2.1rem, 5vw, 3.5rem);
    overflow-wrap: anywhere;
  }

  & p {
    margin-top: 22px;
  }
}

.entradilla {
  font-size: 1.25rem;
}

.contenido-articulo {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.9;
  margin-block: 38px;
}

.reacciones {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  border-block: 1px solid var(--linea);
  padding-block: 25px;
}

.boton-secundario {
  background: transparent;
  color: var(--verde);
  border-color: #a4bdd2;

  &:hover {
    background: var(--verde-claro);
  }

  &[aria-pressed="true"] {
    color: white;
    background: var(--verde);
  }
}

.boton:disabled {
  cursor: wait;
  opacity: .6;
  transform: none;
}

.conversacion {
  margin-top: 65px;

  & h2 {
    margin-bottom: 15px;
  }
}

.formulario-claro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  margin-block: 28px;
  background: white;
  border: 1px solid var(--linea);
  border-radius: var(--radio);

  & .campo input,
  & .campo textarea {
    background: var(--papel);
    color: var(--texto);
    border-color: #9bb6cb;

    &::placeholder {
      color: var(--secundario);
    }
  }

  & .boton {
    align-self: start;
  }

  & .acciones {
    margin: 0;
  }
}

.comentario,
.entrada-admin {
  border-bottom: 1px solid var(--linea);
  padding: 25px 0;

  & h3 {
    margin-block: 10px;
    overflow-wrap: anywhere;
  }

  & .etiqueta {
    color: var(--verde);
  }
}

.texto-comentario {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 12px;
}

.aviso-blog {
  color: var(--verde);
  padding-block: 15px;

  &:empty {
    display: none;
  }
}

.acceso-admin {
  max-width: 480px;
  margin-inline: auto;
}

.cabecera-admin h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.rejilla-admin {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: start;

  &>section {
    min-width: 0;
  }
}

.casilla {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: .9rem;

  & input {
    width: 20px;
    height: 20px;
    accent-color: var(--verde);
  }
}

.moderacion {
  margin-top: 55px;

  & h2 {
    margin-bottom: 15px;
  }
}

.acciones-editor .boton {
  min-height: 38px;
  padding: 7px 12px;
  font-size: .75rem;
}

@media (max-width: 1000px) {
  .rejilla-blog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .rejilla-admin {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 520px) {
  .rejilla-blog {
    grid-template-columns: 1fr;
  }

  .formulario-claro {
    padding: 22px 17px;
  }
}

/* ==========================================================
   11. COMPOSICIÓN DE CRISTAL, HORARIOS Y EFECTOS VISUALES
   Los fondos translúcidos tienen una base legible sin blur.
   ========================================================== */
.aurora {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(65px);
}

.aurora-uno {
  width: 420px;
  height: 420px;
  top: 150px;
  right: 8%;
  background: #8ec4f040;
}

.aurora-dos {
  width: 250px;
  height: 250px;
  bottom: 30px;
  left: -80px;
  background: #ffc84c38;
}

.orbita-solar {
  position: absolute;
  z-index: -1;
  width: 650px;
  height: 650px;
  border: 1px solid #ffd57826;
  border-radius: 50%;
  top: 80px;
  right: -60px;
  box-shadow: 0 0 0 65px #ffffff03, 0 0 0 130px #ffffff03;
  pointer-events: none;
}

.escena-portada {
  position: relative;
  min-width: 0;
  padding: 24px 0 40px;
}

.insignia-flotante,
.tarjeta-flotante {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #ffffff65;
  border-radius: 15px;
  padding: 16px 20px;
  background: #eaf4ffeb;
  color: var(--azul);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px #0a2c5033;

  & small {
    display: block;
    font-size: .55rem;
    letter-spacing: .13em;
  }

  & strong {
    display: block;
    font-size: .8rem;
    font-weight: 650;
    margin-top: 2px;
  }
}

.insignia-flotante {
  left: -22px;
  top: 0;
  transform: rotate(-3deg);
}

.destello {
  font-size: 2rem;
  line-height: 1;
  color: #9b741a;
}

.tarjeta-flotante {
  bottom: 8px;
  right: -14px;
  background: #123e68e8;
  color: white;

  & small {
    color: #cadff0;
  }
}

.senal {
  width: 10px;
  height: 10px;
  background: var(--dorado);
  border-radius: 50%;
  box-shadow: 0 0 0 6px #ffc84c1a;
}

.accesos-portada {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 48px;
  border: 1px solid #ffffff32;
  background: linear-gradient(120deg, #ffffff13, #ffffff06);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px #ffffff17;

  & a {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    border-right: 1px solid #ffffff28;

    &:last-child {
      border: 0;
    }

    &:hover {
      background: #ffffff12;
    }

    &>span {
      font-size: .7rem;
      color: var(--dorado);
    }

    & small {
      display: block;
      font-size: .6rem;
      color: #c5d9e9;
      letter-spacing: .13em;
    }

    & strong {
      display: block;
      font-size: .9rem;
      font-weight: 500;
    }

    & b {
      margin-left: auto;
      font-weight: 400;
      color: var(--dorado);
    }
  }
}

.distribucion-servicios {
  display: grid;
  grid-template-columns: .8fr 1.5fr;
  align-items: start;
  gap: 60px;

  & .titulo-seccion {
    display: block;
    position: sticky;
    top: 135px;

    & h2 {
      font-size: clamp(2rem, 3vw, 3rem);
    }

    & em {
      display: inline-block;
      margin-top: 15px;
      color: var(--verde);
    }

    & p {
      margin-top: 24px;
    }
  }
}

.galeria-destacada {
  & .rejilla-galeria {
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: repeat(2, 260px);
  }

  & .proyecto {
    position: relative;
    overflow: hidden;
    border-radius: 20px;

    &:first-child {
      grid-row: span 2;
    }

    & .abrir-imagen {
      height: 100%;
      border-radius: 20px;
    }

    & img {
      height: 100%;
      object-fit: cover;
    }

    & figcaption {
      position: absolute;
      pointer-events: none;
      left: 16px;
      right: 65px;
      bottom: 16px;
      padding: 18px;
      border: 1px solid #ffffff60;
      border-radius: 12px;
      color: white;
      background: #103b68d9;
      backdrop-filter: blur(15px);

      & .etiqueta {
        color: #ffe08c;
      }
    }

    & .ampliar {
      bottom: 31px;
      z-index: 2;
    }
  }
}

.horario {
  position: relative;
  background: radial-gradient(ellipse at 100% 70%, #c5dff66b, transparent 60%), #eaf4fd;
  border-top: 1px solid #fff;

  & h2 em {
    color: var(--verde);
  }
}

/* Distribución y tarjeta de atención · nueva paleta azul solar */
.distribucion-horario {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 25px;
  align-items: stretch;

  .panel-horario {
    min-width: 0;
    padding: 32px;
    border: 1px solid #ffffffed;
    border-top: 4px solid var(--dorado);
    border-radius: 22px;
    background: linear-gradient(135deg, #fff, #f9fcff);
    box-shadow: var(--sombra);
  }

  .encabezado-horario {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 13px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--linea);

    .icono-reloj {
      width: 48px;
      height: 48px;
      padding: 10px;
      flex-shrink: 0;
      color: var(--verde);
      background: var(--verde-claro);
      border-radius: 12px;
    }

    >div {
      flex: 1 1 155px;
      min-width: 0;

      h3 {
        margin-bottom: 4px;
        font-size: 1.2rem;
        color: var(--azul);
      }

      .texto-pequeno {
        color: var(--secundario);
      }
    }

    .etiqueta-horario {
      padding: 6px 10px;
      border-radius: 30px;
      background: #fff1c7;
      color: #805f19;
      font-size: .6rem;
      font-weight: 700;
      letter-spacing: .04em;
    }
  }

  .lista-horario {
    display: grid;
    gap: 9px;
    margin: 22px 0;
    padding: 0;

    >div {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      background: var(--papel);
      border: 1px solid var(--linea);
      border-radius: 10px;
      transition: background .2s ease;

      &:hover {
        background: var(--verde-claro);
      }

      dt {
        display: flex;
        align-items: center;
        gap: 9px;
        font-size: .85rem;
        font-weight: 600;

        .punto-dia {
          display: inline-block;
          width: 8px;
          height: 8px;
          flex-shrink: 0;
          background: var(--verde-natural);
          border-radius: 50%;

          &.punto-descanso {
            background: #bb7e7e;
          }
        }
      }

      dd {
        margin: 0;
        color: var(--azul);
        font-size: .95rem;
        font-weight: 700;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;

        span {
          color: var(--secundario);
        }

        &.descanso {
          color: #a46e6e;
          font-size: .85rem;
        }
      }
    }
  }

  .aviso-horario {
    margin: 0;
    padding: 12px 15px;
    background: var(--verde-claro);
    border-left: 3px solid var(--dorado);
    border-radius: 0 8px 8px 0;
    color: var(--secundario);
    font-size: .75rem;
    line-height: 1.6;
  }
}

.cita-horario {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 19px;
  padding: 36px;
  border-radius: 25px;
  border: 1px solid #e0efff69;
  background: radial-gradient(circle at 100% 0%, #73ade54a, transparent 65%), linear-gradient(135deg, #13548a, #103b68);
  color: white;
  box-shadow: 0 20px 50px #103c6826;

  & .antetitulo {
    color: #ffda73;
    margin: 0;
    padding-right: 55px;
    font-size: .6rem;
  }

  & h3 {
    font-size: 2.5rem;
  }

  & p {
    color: #d5e6f4;
    font-size: .85rem;
  }

  & .texto-pequeno {
    font-size: .68rem;
  }

  & .boton {
    margin-top: auto;
  }
}

.circulo-contacto {
  position: absolute;
  top: 24px;
  right: 24px;
  border: 1px solid #ffffff50;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.avance-lectura {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--dorado);
  transform: scaleX(var(--avance, 0));
  transform-origin: left;
  pointer-events: none;
}

/* El contenido permanece visible sin JavaScript o sin observador. */
@media (prefers-reduced-motion: no-preference) {
  .preparada {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
  }

  .preparada.visible,
  .preparada:focus-within {
    opacity: 1;
    transform: translateY(0);
  }

  .insignia-flotante {
    animation: levitar 5s ease-in-out 2;
  }

  @keyframes levitar {

    0%,
    100% {
      transform: translateY(0) rotate(-3deg);
    }

    50% {
      transform: translateY(-9px) rotate(-2deg);
    }
  }
}

@media (max-width: 1200px) {
  .menu .boton {
    display: none;
  }

  .portada-rejilla {
    gap: 40px;
  }

  .distribucion-servicios {
    gap: 30px;
  }
}

@media (max-width: 1000px) {
  .distribucion-servicios {
    grid-template-columns: 1fr;

    & .titulo-seccion {
      position: static;

      & p {
        max-width: 620px;
      }
    }
  }

  .pasos {
    gap: 12px;

    & li {
      padding: 24px 20px;
    }
  }

  .accesos-portada a {
    padding: 20px 16px;
    gap: 12px;
  }
}

@media (max-width: 800px) {
  .encabezado {
    margin-bottom: -90px;
  }

  .portada-rejilla {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .escena-portada {
    margin-inline: 15px;
  }

  .portada-texto h1 {
    font-size: clamp(3.4rem, 10vw, 5rem);
  }

  .accesos-portada {
    margin-top: 35px;

    & a {
      flex-wrap: wrap;
    }

    & a strong {
      font-size: .8rem;
    }
  }

  .distribucion-horario {
    grid-template-columns: 1fr;
  }

  .cita-horario {
    gap: 20px;
  }

  .galeria-destacada .rejilla-galeria {
    grid-template-rows: repeat(2, 230px);
  }

  .galeria-destacada .proyecto figcaption {
    padding: 13px;
    right: 16px;
    bottom: 60px;

    & h3 {
      font-size: .95rem;
    }
  }

  .pasos {
    grid-template-columns: 1fr;

    & li {
      display: flex;
      align-items: start;
      gap: 20px;

      &>span {
        flex-shrink: 0;
        margin: 0;
      }
    }
  }

  .cabecera-interior {
    padding-top: 140px;
  }

  body[data-pagina="articulo"] main,
  body[data-pagina="admin"] main>.seccion:first-child {
    padding-top: 100px;
  }
}

@media (max-width: 520px) {
  .encabezado {
    top: 8px;
    width: calc(100% - 20px);
    border-radius: 13px;
  }

  .barra {
    width: calc(100% - 26px);
  }

  .portada {
    padding-top: 145px;
  }

  .escena-portada {
    margin-inline: 8px;
    padding-top: 42px;
  }

  .insignia-flotante {
    left: 0;
    padding: 12px;

    & strong {
      font-size: .7rem;
    }
  }

  .tarjeta-flotante {
    right: 0;
    padding: 14px;

    & strong {
      font-size: .68rem;
    }
  }

  .carrusel {
    transform: rotate(0);
    border-radius: 18px;

    & .diapositivas {
      height: 340px;
    }

    & .controles {
      padding-inline: 5px;
      gap: 6px;
    }
  }

  .accesos-portada {
    grid-template-columns: 1fr;

    & a {
      padding: 18px 22px;
      flex-wrap: nowrap;
      border: 0;
      border-bottom: 1px solid #ffffff28;

      & strong {
        font-size: .9rem;
      }
    }
  }

  .galeria-destacada .rejilla-galeria {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .galeria-destacada .proyecto {
    height: 300px;

    &:first-child {
      grid-row: auto;
    }

    & figcaption {
      right: 60px;
      bottom: 16px;
    }
  }

  .distribucion-horario {
    .panel-horario {
      padding: 23px 18px;
    }

    .lista-horario>div {
      padding: 12px;
      gap: 8px;

      dt,
      dd {
        font-size: .8rem;
      }

      dd span {
        margin-inline: 1px;
      }
    }
  }

  .cita-horario {
    padding: 25px 20px;
  }

  .orbita-solar {
    width: 400px;
    height: 400px;
    right: -220px;
  }
}

/* Evita que la navegación flotante tape artículos interiores. */
body[data-pagina="articulo"] main {
  padding-top: 110px;
}