/* =========================================================
   ESTRALIA · MAIN CSS
   Estilos comunes de la nueva web estática.

   Refactor conservador basado en la web actual.

   Mantiene clases reales:
   - nav-principal
   - logo-menu
   - menu-icon
   - bar
   - contacto
   - contenedor-contacto
   - franja-superior
   - bloque
   - redes-sociales
   - footer-links
   - cta-cuadro
   - lang-switch

   No incluir aquí:
   - cookies
   - formulario de contacto
   - mapa Leaflet
   - slider de Home
   - proceso interactivo de Cómo trabajamos
   - estilos específicos de páginas
   ========================================================= */


/* =========================================================
   1. VARIABLES GLOBALES
   ========================================================= */

:root {
  --estralia-black: #111111;
  --estralia-dark: #1c1c1c;
  --estralia-text: #222222;
  --estralia-muted: #666666;
  --estralia-soft: #f7f7f7;
  --estralia-border: #e5e5e5;
  --estralia-white: #ffffff;

  --estralia-blue: rgb(15, 98, 254);
  --estralia-blue-hover: rgb(10, 78, 210);
  --estralia-blue-soft: rgba(15, 98, 254, 0.08);

  --font-main: 'Poppins', Arial, sans-serif;

  --nav-h: 70px;
  --nav-h-mobile: 110px;

  --container-sm: 900px;
  --container-md: 1100px;
  --container-lg: 1200px;

  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.12);

  --footer-legal-muted: #666666;
  --footer-legal-brand: #b5b5b5;
  --registered-mark-size: 1.55em;
}


/* =========================================================
   2. BASE TIPOGRÁFICA Y RESET SUAVE
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--estralia-text);
  background-color: var(--estralia-white);
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 0;
  color: inherit;
}

p {
  font-family: inherit;
  font-weight: 400;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--estralia-black);
  color: var(--estralia-white);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}


/* =========================================================
   3. HEADER / MENÚ PRINCIPAL
   ========================================================= */

.nav-principal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  height: var(--nav-h);
  padding: 12px 0;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1500;
}

.nav-principal ul {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-principal a {
  color: var(--estralia-white);
  font-size: 16px;
  text-decoration: none;
  font-weight: 600;
  transition:
    color 0.3s ease,
    opacity 0.3s ease,
    text-decoration-color 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.nav-principal a:hover {
  color: var(--estralia-white);
  opacity: 0.82;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav-principal a[aria-current="page"] {
  color: var(--estralia-white);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav-principal a[aria-current="page"]:hover {
  opacity: 1;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 10px;

  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;

  line-height: 1;
  opacity: 1;

  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    opacity 0.3s ease;
}

.nav-principal .lang-switch:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.7);
  opacity: 1;
  text-decoration: none;
}

.nav-principal .lang-switch,
.nav-principal .lang-switch:hover,
.nav-principal .lang-switch:focus,
.nav-principal .lang-switch:active,
.nav-principal .lang-switch[aria-current="page"] {
  text-decoration: none;
}

.logo-menu {
  position: fixed;
  top: 0;
  left: 80px;

  display: flex;
  align-items: center;

  z-index: 1600;
}

.logo-menu img {
  height: 80px;
  width: auto;
  display: block;
}

.menu-icon {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;

  z-index: 1700;

  width: 40px;
  height: 32px;
  padding: 0;

  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-icon:focus-visible {
  outline: 2px solid var(--estralia-white);
  border-radius: 4px;
}

.menu-icon .bar {
  display: block;
  width: 28px;
  height: 3px;
  margin: 5px auto;

  background-color: var(--estralia-white);
  transition: transform 0.4s ease, opacity 0.4s ease;
}


/* =========================================================
   4. ESTRUCTURA GENERAL
   ========================================================= */

.site-main {
  min-height: 60vh;
}

.zona-principal {
  padding-top: var(--nav-h);
  padding-bottom: 40px;
}

.contenedor {
  max-width: var(--container-md);
  margin: 0 auto;
  padding: 40px 20px;
}


/* =========================================================
   5. FOOTER SUPERIOR / FRANJA FINAL
   ========================================================= */

.contacto {
  width: 100%;
  padding: 12px 20px;

  color: var(--estralia-text);
  text-align: left;

  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.contenedor-contacto {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 6px 20px;
}

.franja-superior {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(210px, 260px) minmax(260px, 320px);
  column-gap: clamp(54px, 6vw, 96px);
  justify-content: center;
  align-items: center;

  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 16px 20px 18px;
}

.franja-superior .bloque {
  display: flex;
  flex-direction: column;
  gap: 8px;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.franja-superior .bloque.logo-frase {
  justify-self: center;
  align-items: center;
  gap: 0;
}

.franja-superior .bloque.enlaces {
  justify-self: center;
}

.franja-superior .bloque.contacto-redes {
  justify-self: center;
}

.bloque.logo-frase .logo {
  width: 140px;
  height: 140px;

  margin-top: 0;
  margin-bottom: 0;

  padding: 18px;
  border-radius: 50%;

  object-fit: contain;
  background-color: rgba(0, 0, 0, 0.3);
}

.bloque.logo-frase .frase {
  display: block;
  max-width: 250px;

  margin-top: 8px;

  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--estralia-text);
  text-align: center;
}

.bloque h3 {
  margin: 0 0 6px 0;

  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 700;
  color: var(--estralia-muted);
}

.bloque.enlaces ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bloque.enlaces li {
  margin-bottom: 6px;
}

.bloque.enlaces a {
  color: var(--estralia-text);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.3s ease;
}

.bloque.enlaces a:hover {
  color: var(--estralia-muted);
}

.bloque.enlaces a::before {
  content: '›';
  display: inline-block;
  margin-right: 6px;
  font-size: 0.9em;
}

.bloque.contacto-redes p {
  margin: 0;
  line-height: 1.42;
  color: var(--estralia-text);
  text-align: left;
}

.bloque.contacto-redes a {
  text-decoration: none;
}

.bloque.contacto-redes a:hover {
  color: var(--estralia-muted);
  text-decoration: underline;
}

.contacto-datos {
  margin-bottom: 6px !important;
}

.contacto-respuesta {
  margin-top: 8px !important;
  max-width: 320px;

  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--estralia-muted) !important;
}

.no-break {
  white-space: nowrap;
}

.redes-sociales {
  display: flex;
  align-items: center;
  gap: 26px;

  margin-top: 22px;
  text-align: left;
}

.redes-sociales a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-right: 0;
}

.redes-sociales img {
  display: block;
  width: 28px;
  height: 28px;

  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.redes-sociales img:hover {
  opacity: 1;
  transform: scale(1.1);
}


/* =========================================================
   6. FOOTER LEGAL
   ========================================================= */

.site-footer-legal {
  width: 100%;
  padding: 20px;

  background-color: var(--estralia-black);
  color: var(--footer-legal-muted);

  font-size: 12px;
  text-align: center;
}

.site-footer-legal span {
  display: block;
  margin-bottom: 4px;
  color: var(--footer-legal-muted);
}

.site-footer-legal strong {
  color: var(--footer-legal-brand);
  font-weight: 600;
}

.site-footer-legal__claim {
  color: var(--footer-legal-muted);
}

.registered-mark {
  display: inline-block;

  font-size: var(--registered-mark-size);
  line-height: 1;
  margin-left: -2px;

  font-weight: 700;
  color: var(--footer-legal-muted);

  vertical-align: baseline;
  position: relative;
  top: -0.36em;
}

.site-footer-legal strong .registered-mark {
  color: var(--footer-legal-muted) !important;
}

.footer-links {
  margin-top: 8px;
  color: var(--footer-legal-muted);
}

.footer-links a {
  color: var(--footer-legal-muted);
  text-decoration: none;
  margin: 0 5px;
  font-size: 13px;
  font-weight: 500;
}

.footer-links a:hover {
  color: #8a8a8a;
  text-decoration: underline;
}


/* =========================================================
   7. BOTONES / CTA COMUNES
   ========================================================= */

.cta-cuadro {
  display: inline-block;
  position: relative;

  margin-top: 16px;
  padding: 12px 34px 12px 18px;

  background: var(--estralia-blue);
  color: var(--estralia-white);

  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;

  font-weight: 600;
  letter-spacing: 0.3px;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.15s ease;
}

.cta-cuadro:hover {
  background: var(--estralia-blue-hover);
  border-color: rgba(255, 255, 255, 0.65);
  transform: translateY(-1px);
}

.cta-cuadro:active {
  transform: translateY(0);
}

.cta-cuadro:focus-visible {
  outline: 2px solid var(--estralia-blue);
  outline-offset: 3px;
}

.cta-cuadro::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;

  width: 18px;
  height: 18px;

  transform: translateY(-50%);

  background: currentColor;
  opacity: 0.95;

  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M8.12 4.71a1 1 0 0 0 0 1.41L13 11H4a1 1 0 0 0 0 2h9l-4.88 4.88a1 1 0 1 0 1.41 1.41l6.59-6.59a1 1 0 0 0 0-1.41L9.53 4.7a1 1 0 0 0-1.41.01Z"/></svg>') no-repeat center / contain;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M8.12 4.71a1 1 0 0 0 0 1.41L13 11H4a1 1 0 0 0 0 2h9l-4.88 4.88a1 1 0 1 0 1.41 1.41l6.59-6.59a1 1 0 0 0 0-1.41L9.53 4.7a1 1 0 0 0-1.41.01Z"/></svg>') no-repeat center / contain;

  transition: transform 0.25s ease, opacity 0.25s ease;
}

.cta-cuadro:hover::after {
  transform: translateY(-50%) translateX(4px);
  opacity: 1;
}

.cta-cuadro.secondary {
  background: transparent !important;
  color: var(--estralia-blue);
  border-color: rgba(16, 23, 114, 0.55);
  transform: none;
}

.cta-cuadro.secondary:hover {
  background: var(--estralia-blue-soft) !important;
  border-color: rgba(16, 23, 114, 0.75);
  transform: translateY(-1px);
}

.cta-row {
  text-align: center;
  margin-top: 16px;
}


/* =========================================================
   8. TARJETAS Y BLOQUES GENÉRICOS
   ========================================================= */

.bloque {
  background: var(--estralia-white);
  border: 1px solid var(--estralia-border);
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: var(--shadow-soft);
}

.bloque + .bloque {
  margin-top: 24px;
}

.tarjeta {
  background-color: var(--estralia-white);
  border: 1px solid #e0e0e0;
  padding: 20px 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-soft);
}

.tarjeta-info {
  max-width: 580px;
  margin: 30px auto 10px;
  padding: 28px 24px;

  background: rgba(255, 255, 255, 0.85);
  color: var(--estralia-text);

  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.tarjeta-info h2 {
  margin: 0 0 10px 0;
  color: var(--estralia-black);
}

.tarjeta-info p {
  margin: 0;
}


/* =========================================================
   9. ANIMACIONES COMUNES
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.is-fading-out {
  opacity: 0;
  transform: translateY(-20px);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =========================================================
   10. RESPONSIVE COMÚN
   ========================================================= */

@media (max-width: 980px) {
  :root {
    --nav-h: var(--nav-h-mobile);
  }

  .menu-icon {
    display: block;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2001;
  }

  .logo-menu {
    position: relative;
    top: 5px;
    left: 5%;
    transform: translateX(-5%);
    z-index: 2000;
  }

  .logo-menu img {
    height: 110px;
    width: auto;
  }

  .nav-principal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: var(--nav-h-mobile);
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1990;
  }

  .nav-principal ul {
    display: none;
    flex-direction: column;
    gap: 24px;

    list-style: none;
    padding: 0;
    margin: 0;

    position: fixed;
    top: var(--nav-h-mobile);
    left: 0;
    right: 0;

    height: calc(100vh - var(--nav-h-mobile));
    height: calc(100dvh - var(--nav-h-mobile));

    background: rgba(0, 0, 0, 0.95);

    justify-content: center;
    align-items: center;
  }

  .nav-principal.show ul {
    display: flex;
  }

  .nav-principal a {
    font-size: 18px;
  }

  .nav-principal .lang-switch {
    padding: 8px 12px;
  }

  .zona-principal {
    padding-top: var(--nav-h-mobile);
  }

  .contenedor {
    padding: 30px 20px;
  }

  .franja-superior {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;

    padding: 22px 20px;
  }

  .franja-superior .bloque.logo-frase,
  .franja-superior .bloque.enlaces,
  .franja-superior .bloque.contacto-redes {
    justify-self: auto;
    align-items: center;
    text-align: center;
  }

  .bloque.contacto-redes p,
  .contacto-datos,
  .contacto-respuesta {
    text-align: center;
  }

  .contacto-respuesta {
    max-width: 280px;
  }

  .redes-sociales {
    justify-content: center;
    gap: 26px;
    text-align: center;
  }

  .redes-sociales a {
    margin: 0;
  }

  .bloque.logo-frase .logo {
    width: clamp(180px, 62vw, 280px);
    height: clamp(180px, 62vw, 280px);
    border-radius: 50%;
    object-fit: contain;
  }

  .cta-cuadro {
    width: auto;
    padding: 12px 34px 12px 20px;
  }

  .tarjeta-info {
    margin: 30px 20px 20px;
  }
}


/* =========================================================
   11. ACCESIBILIDAD / REDUCCIÓN DE MOVIMIENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal,
  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   ESTRALIA · ESCALA FLUIDA DE ESCRITORIO · PRUEBA v1
   Ajuste mínimo y global: solo modifica el tamaño raíz en escritorio.
   Mantiene intacto el responsive existente <= 980px.
   ========================================================= */

@media (min-width: 981px) {
  html {
    font-size: clamp(
      14px,
      calc(8.36px + 0.741vh),
      16px
    );
  }
}

