/*
 * FOUCHAT - hoja de estilos única.
 * Paleta y tipografía tomadas de la configuración del tema Astra del sitio original
 * (astra-color-palettes "palette_2", Source Sans Pro / Montserrat).
 */

/* ---------- Fuentes locales (SIL Open Font License, ver docs/CREDITOS.md) ---------- */
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-pro-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-pro-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-pro-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/source-sans-pro-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }

:root {
  --c0: #22b5ed;   /* primario / botones */
  --c1: #56dfee;
  --c2: #51b4f1;   /* títulos */
  --c3: #4b4f58;   /* texto */
  --c4: #f5f5f5;
  --c5: #ffffff;
  --c6: #f2f5f7;
  --c7: #424242;
  --c8: #000000;
  --exito: #d8eacc;
  --error: #ffd3d3;
  --ancho: 1200px;
  --ancho-estrecho: 520px;
  --cabecera-alto: 110px;
  --radio-boton: 50px;
  --fuente-texto: "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fuente-titulos: "Montserrat", "Source Sans Pro", system-ui, sans-serif;
  --degradado-portada: linear-gradient(135deg, rgb(0 118 243 / 0.5) 0%, rgb(94 163 182 / 0.5) 51%, rgb(0 251 251 / 0.5) 100%);
  --degradado-contenido: radial-gradient(rgb(9 177 230) 0%, rgb(91 230 235) 53%, rgb(0 64 241) 100%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--fuente-texto);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c3);
  background: var(--c5);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c0); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--c1); }
:focus-visible { outline: 3px solid var(--c8); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--fuente-titulos); font-weight: 600; line-height: 1.25; color: var(--c2); margin: 0 0 .6em; }
h1 { font-size: 48px; }
h2 { font-size: 40px; }
h3 { font-size: 32px; }
p { margin: 0 0 1em; }
@media (max-width: 921px) { h1 { font-size: 36px; } h2 { font-size: 30px; } h3 { font-size: 25px; } }
@media (max-width: 544px) { h1 { font-size: 32px; } h2 { font-size: 26px; } h3 { font-size: 22px; } }

.visualmente-oculto {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saltar { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--c8); color: var(--c5); }
.saltar:focus { top: 12px; color: var(--c5); }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 40px; }
.contenedor--estrecho { max-width: calc(var(--ancho-estrecho) + 80px); }
@media (max-width: 544px) { .contenedor { padding: 0 20px; } .contenedor--estrecho { max-width: calc(var(--ancho-estrecho) + 40px); } }

.columnas { display: grid; gap: 40px; }
@media (min-width: 782px) {
  .columnas--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columnas--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.boton {
  display: inline-block;
  padding: 20px 40px;
  border: 0;
  border-radius: var(--radio-boton);
  background: var(--c0);
  color: var(--c5);
  font: 600 20px/1 var(--fuente-texto);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease;
}
.boton:hover, .boton:focus-visible { background: var(--c8); color: var(--c5); }
.boton:disabled { opacity: .7; cursor: progress; }
@media (max-width: 921px) { .boton { padding: 18px 32px; } }
@media (max-width: 544px) { .boton { padding: 15px 28px; } }

/* ---------- Cabecera (transparente sobre la portada) ---------- */
.cabecera { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.cabecera__fila { display: flex; align-items: center; justify-content: space-between; min-height: var(--cabecera-alto); gap: 24px; }
.cabecera__logo img { width: 150px; height: auto; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.menu a {
  display: inline-block; padding: 8px 0;
  color: rgb(242 245 247 / 0.9); font-weight: 600; text-decoration: none;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
  transition: transform .2s ease, color .2s ease;
}
.menu a:hover, .menu a:focus-visible { color: var(--c5); transform: scale(1.06); }

.menu-boton { display: none; }
@media (max-width: 921px) {
  :root { --cabecera-alto: 100px; }
  .cabecera__logo img { width: 120px; }
  .js .menu-boton {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 44px; border: 2px solid var(--c5); border-radius: 4px;
    background: transparent; color: var(--c5); cursor: pointer;
  }
  .menu-boton__icono, .menu-boton__icono::before, .menu-boton__icono::after {
    display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
  }
  .menu-boton__icono::before, .menu-boton__icono::after { content: ""; position: absolute; left: 0; }
  .menu-boton__icono::before { top: -7px; }
  .menu-boton__icono::after { top: 7px; }
  .menu-boton[aria-expanded="true"] .menu-boton__icono { background: transparent; }
  .menu-boton[aria-expanded="true"] .menu-boton__icono::before { top: 0; transform: rotate(45deg); }
  .menu-boton[aria-expanded="true"] .menu-boton__icono::after { top: 0; transform: rotate(-45deg); }

  .cabecera__fila { flex-wrap: wrap; }
  .js .menu { display: none; width: 100%; }
  .js .menu.is-open { display: block; }
  .menu ul { flex-direction: column; gap: 0; background: var(--c5); border-radius: 6px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); overflow: hidden; }
  .menu li + li { border-top: 1px solid #eaeaea; }
  .menu a { display: block; padding: 12px 18px; color: var(--c3); text-shadow: none; }
  .menu a:hover, .menu a:focus-visible { color: var(--c0); transform: none; }
}
@media (max-width: 544px) { :root { --cabecera-alto: 80px; } .cabecera__logo img { width: 100px; } }

/* ---------- Portada ---------- */
.portada {
  position: relative;
  min-height: 695px;
  display: flex; align-items: center;
  padding: calc(var(--cabecera-alto) + 40px) 0 60px;
  background-color: rgb(0 118 243);
  background-image: var(--degradado-portada), url("../img/portada-fondo.jpg");
  background-size: cover;
  background-position: center;
  color: var(--c5);
}
.contenedor--ancho { max-width: 1400px; }
.portada__columnas { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .portada__columnas { grid-template-columns: 40% minmax(0, 1fr); } }
.portada h1 { color: var(--c5); text-shadow: 0 2px 8px rgb(0 0 0 / 0.25); }
.portada p { font-size: 19px; text-shadow: 0 1px 4px rgb(0 0 0 / 0.3); }

/* ---------- Carrusel ---------- */
.carrusel { position: relative; }
.carrusel__pista {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 5px;
  border-radius: 6px; scrollbar-width: thin;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
}
.js .carrusel__pista { scrollbar-width: none; }
.js .carrusel__pista::-webkit-scrollbar { display: none; }
.carrusel__item { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 2 / 1; background: rgb(0 0 0 / 0.15); }
.carrusel__item img { width: 100%; height: 100%; object-fit: cover; }
.carrusel__controles { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.carrusel__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / 0.9); color: var(--c8); cursor: pointer;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.2);
}
.carrusel__btn:hover { background: var(--c5); }
.carrusel__btn .icono-play { display: none; }
.carrusel__btn[aria-pressed="true"] .icono-pausa { display: none; }
.carrusel__btn[aria-pressed="true"] .icono-play { display: block; }

/* ---------- Destacados ---------- */
.destacados { background: var(--c5); padding: 100px 0 40px; }
.tarjeta h3 { margin-top: 16px; margin-bottom: 8px; }
.tarjeta__icono { width: 48px; height: 48px; }
.destacados h3 { color: var(--c2); }

/* ---------- Servicios ---------- */
.servicios {
  padding: 144px 0 60px;
  background-color: #6f8fa8;
  /* Velo oscuro agregado para que el texto blanco sea legible sobre la fotografía. */
  background-image: linear-gradient(rgb(0 0 0 / 0.38), rgb(0 0 0 / 0.38)), url("../img/servicios-fondo.jpg");
  background-size: cover;
  background-position: center;
  color: var(--c5);
}
.servicios h2, .servicios h3 { color: var(--c5); }
.servicios__lista { margin-top: 50px; }
.servicio__imagen { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; margin-bottom: 16px; }

/* ---------- Sobre nosotros ---------- */
.nosotros { background: var(--c5); padding: 143px 0 144px; }
.nosotros__columnas { display: grid; gap: 40px; align-items: center; }
@media (min-width: 782px) { .nosotros__columnas { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); } .nosotros__texto { padding-right: 40px; } }
.nosotros h2 { color: var(--c1); }
.nosotros p { color: var(--c8); }
.nosotros__imagen { margin: 0; }
.nosotros__imagen img { width: 100%; border-radius: 4px; }
@media (max-width: 781px) { .nosotros { padding: 80px 0; } }

/* ---------- Fondo degradado (¿Por qué? y Contacto) ---------- */
.fondo-degradado { background: var(--degradado-contenido); }
.fondo-degradado h2, .fondo-degradado h3 { color: var(--c5); text-shadow: 0 1px 6px rgb(0 0 0 / 0.25); }
.por-que { padding: 144px 0; }
.por-que__lista { margin-top: 60px; column-gap: 80px; }
.por-que p { color: var(--c8); }
.por-que .tarjeta__icono { width: 64px; height: 64px; }
@media (max-width: 781px) { .por-que { padding: 80px 0; } }

/* ---------- Contacto ---------- */
.contacto { padding: 104px 0; }
.contacto h2 { text-align: center; }
.formulario { padding: 2rem 0 5rem; }
.campo { margin-bottom: 2rem; }
.campo label {
  display: block; margin-bottom: 10px;
  font-family: var(--fuente-titulos); font-weight: 600; font-size: 20px; color: var(--c5);
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.25);
}
.campo input, .campo textarea {
  width: 100%; padding: 10px 2px;
  border: 0; border-bottom: 1px solid rgb(255 255 255 / 0.85); border-radius: 0;
  background: transparent; color: var(--c8);
  font: 400 17px/1.5 var(--fuente-texto);
}
.campo textarea { resize: vertical; min-height: 130px; }
.campo input::placeholder, .campo textarea::placeholder { color: var(--c3); opacity: 1; font-size: 15px; }
.campo input:focus, .campo textarea:focus { outline: none; border-bottom: 2px solid var(--c8); background: rgb(255 255 255 / 0.25); }
.campo--error input, .campo--error textarea { border-bottom: 2px solid #b00020; }
.campo__error { margin: 6px 0 0; padding: 4px 8px; background: var(--error); color: var(--c8); font-size: 14px; border-radius: 4px; }
.campo-trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.aviso { margin: 1.5rem 0 0; padding: 12px 12px 12px 40px; border-radius: 5px; color: var(--c8); font-size: 15px; font-weight: 600; line-height: 1.3; background-repeat: no-repeat; background-position: 12px center; background-size: 18px; }
.aviso--exito { background-color: var(--exito); background-image: url("../img/iconos/aviso-exito.svg"); }
.aviso--error { background-color: var(--error); background-image: url("../img/iconos/aviso-error.svg"); }
.aviso--info { background-color: var(--c5); padding-left: 12px; font-weight: 400; }

/* ---------- Pie ---------- */
.pie { background: var(--c5); color: var(--c3); }
.pie__columnas { padding-top: 40px; padding-bottom: 40px; align-items: center; }
.pie__datos { list-style: disc; margin: 0; padding-left: 1.2em; }
.pie__copyright { border-top: 1px solid #e6e6e6; padding: 18px 0; text-align: center; font-size: 15px; }
@media (max-width: 781px) { .pie__columnas { text-align: center; justify-items: center; } .pie__datos { list-style: none; padding: 0; } }

@media print {
  .cabecera, .carrusel__controles, .formulario { display: none; }
  .portada, .servicios, .fondo-degradado { background: none; color: #000; }
}
