/* ==========================================================================
   EBSS - Base Styles
   Reset + Tipografía + Elementos HTML base
   ========================================================================== */

/* ========================================
   FONTS - Cargar tipografías
   ======================================== */

/* Gobold - Fuente local */
@font-face {
  font-family: 'Gobold';
  src: url('../fonts/Gobold-Bold-Italic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* PT Sans - Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400&display=swap');

/* ========================================
   RESET - Normalize básico
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden; /* Previene scroll horizontal de animaciones laterales */
}

/* ========================================
   TIPOGRAFÍA
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  font-style: italic;
  line-height: var(--leading-tight);
  color: var(--color-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

h4 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

h5 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

h6 {
  font-size: var(--text-base);
  margin-bottom: var(--space-sm);
}

/* Desktop heading sizes */
@media (min-width: 1024px) {
  h1 {
    font-size: var(--text-6xl);
  }
  
  h2 {
    font-size: var(--text-5xl);
  }
  
  h3 {
    font-size: var(--text-3xl);
  }
  
  h4 {
    font-size: var(--text-2xl);
  }
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: var(--font-bold);
}

small {
  font-size: var(--text-sm);
}

/* ========================================
   ENLACES
   ======================================== */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ========================================
   LISTAS
   ======================================== */

ul, ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-xs);
}

/* li:last-child {
  margin-bottom: 0;
}
 */
/* ========================================
   IMÁGENES Y MEDIA
   ======================================== */

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic; /* Alt text styling */
}

/* ========================================
   FORMULARIOS BASE
   ======================================== */

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  width: 100%;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  font-style: italic;
  color: var(--color-heading);
  margin-bottom: var(--space-md);
}

/* ========================================
   TABLAS
   ======================================== */

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: var(--font-semibold);
  color: var(--color-heading);
}

/* ========================================
   UTILIDADES BASE
   ======================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   LAYOUT BASE
   ======================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

main {
  flex: 1;
}

/* Estructura página con footer sticky */
body {
  display: flex;
  flex-direction: column;
}
