/**
 * webfe Design System
 * Base styles: reset, typography, colors
 * Version 1.0
 */

/* ==================== RESET & BOX SIZING ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== TYPOGRAPHY ==================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
}

h1 {
  font-size: 2rem;     /* 32px */
  margin-bottom: 1rem; /* 16px */
  margin-top: 2rem;    /* 32px */
}

h2 {
  font-size: 1.75rem;  /* 28px */
  margin-bottom: 1rem;
  margin-top: 1.5rem;  /* 24px */
}

h3 {
  font-size: 1.5rem;   /* 24px */
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

h4 {
  font-size: 1.25rem;  /* 20px */
  font-weight: 600;
  margin-bottom: 0.75rem;
  margin-top: 1rem;
}

h5 {
  font-size: 1.125rem; /* 18px */
  font-weight: 600;
}

h6 {
  font-size: 1rem;     /* 16px */
  font-weight: 600;
}

p {
  margin: 0 0 1rem 0;
  color: #1a1a1a;
}

small,
.small {
  font-size: 0.875rem; /* 14px */
  color: #757575;
}

strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

code {
  font-family: monospace;
  font-size: 0.875rem;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
}

/* ==================== LINKS ==================== */
a {
  color: #fa8c00;
  text-decoration: none;
  transition: color 200ms ease, text-decoration 200ms ease;
}

a:hover {
  color: #e07d00;
  text-decoration: underline;
}

a:focus {
  outline: 2px solid #fa8c00;
  outline-offset: 2px;
}

a:active {
  color: #c66900;
}

/* ==================== LISTS ==================== */
ul,
ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

ul ul,
ul ol,
ol ul,
ol ol {
  margin: 0.5rem 0 0 0;
}

/* ==================== TABLES ==================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

thead {
  background: #f5f5f5;
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  color: #1a1a1a;
  border-bottom: 2px solid #d3d3d3;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #d3d3d3;
  color: #1a1a1a;
}

tbody tr:hover {
  background: #f9f9f9;
}

tbody tr:nth-child(even) {
  background: #f5f5f5;
}

/* ==================== HORIZONTAL RULE ==================== */
hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid #d3d3d3;
}

/* ==================== IMAGES & MEDIA ==================== */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  vertical-align: middle;
}

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

.visually-hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: #757575;
}

.text-primary {
  color: #fa8c00;
}

.text-success {
  color: #28a745;
}

.text-danger {
  color: #e6524a;
}

.text-warning {
  color: #ffc107;
}

.text-info {
  color: #1e8c9e;
}

.font-weight-bold {
  font-weight: 700;
}

.font-weight-normal {
  font-weight: 400;
}

.font-italic {
  font-style: italic;
}

/* ==================== SELECTION ==================== */
::selection {
  background: #fa8c00;
  color: #fff;
}

::-moz-selection {
  background: #fa8c00;
  color: #fff;
}

/* ==================== FOCUS VISIBLE (para accesibilidad) ==================== */
*:focus-visible {
  outline: 2px solid #fa8c00;
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #fa8c00;
  outline-offset: 2px;
}
