/* ==========================================================================
   Base: reset, tipografía, accesibilidad y utilidades.
   html conserva 16px (1rem = 16px); el tamaño base del texto va en body (14px, como Divi).
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding-bottom: 10px; /* como Divi: todos los títulos llevan 10 px debajo */
  font-weight: var(--fw-medium);
  color: var(--color-heading);
}

p, ul, ol, figure, blockquote {
  margin: 0;
}

img, svg, iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Foco visible solo con teclado */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--color-white);
  color: var(--color-heading);
  font-family: var(--font-ui);
  font-weight: var(--fw-semibold);
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Iconos SVG del sprite (_Icons.cshtml) */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* Imagen que falta en wwwroot (tag helper <site-image>) */
.img-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 4rem;
  padding: 1rem;
  background: #d9d9d9;
  color: #555;
  font: 0.75rem/1.3 monospace;
  text-align: center;
  word-break: break-all;
}

/* Visibilidad por dispositivo (puntos de corte de Divi: tablet ≤ 980 px, móvil ≤ 767 px) */
@media (min-width: 981px) {
  .only-mobile, .only-tablet, .only-phone { display: none !important; }
}

@media (max-width: 980px) {
  .only-desktop { display: none !important; }
}

@media (min-width: 768px) and (max-width: 980px) {
  .only-phone { display: none !important; }
}

@media (max-width: 767px) {
  .only-tablet,
  .hide-phone { display: none !important; }
}

/* Aparición al hacer scroll (equivalente a las animaciones de entrada de Divi).
   Solo con JS (clase .js en <html>) y sin «reducir movimiento». */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
