/* ============================================
   STYLES OPTIMIZADO PARA VELOCIDAD
   Minificado + Critical CSS Inline
   ============================================ */

:root {
  --primary: #003366;
  --primary-light: #004d99;
  --primary-dark: #001a33;
  --secondary: #f0f4f8;
  --text-dark: #1a202c;
  --text-light: #4a5568;
  --white: #ffffff;
  --accent: #2b6cb0;
  --border: #e2e8f0;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--secondary);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.2; }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); text-align: center; margin-bottom: 3rem; }
h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); }

p { color: var(--text-light); margin-bottom: 1rem; line-height: 1.8; }

a {
  color: var(--accent);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-light);
}

/* ============ HEADER ============ */
header {
  background-color: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 5%;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-container img {
  height: 45px;
  width: auto;
  border-radius: 6px;
}

.logo-container span {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 800;
  color: var(--primary);
}

nav ul {
  display: flex;
  list-style: none;
  gap: clamp(1rem, 2vw, 2rem);
  flex-wrap: wrap;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

nav a:hover,
nav a.active {
  color: var(--accent);
  font-weight: 700;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: clamp(0.7rem, 1.5vw, 0.8rem) clamp(1.2rem, 2vw, 1.5rem);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0, 51, 102, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 51, 102, 0.3);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: clamp(2rem, 5vw, 5rem);
  color: var(--white);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-color: var(--primary-dark);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 51, 102, 0.5) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-content h1 {
  color: var(--white);
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============ SECTIONS ============ */
.section {
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 5vw, 5%);
}

.section-white {
  background-color: var(--white);
}

.section-grey {
  background-color: var(--secondary);
}

/* ============ GRID ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2rem);
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.card h3 {
  margin-bottom: 1rem;
}

.card p {
  margin-bottom: 1rem;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* ============ FORMS ============ */
form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

input,
textarea,
select {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

/* ============ FOOTER ============ */
footer {
  background-color: var(--primary-dark);
  color: var(--white);
  text-align: center;
  padding: clamp(1.5rem, 3vw, 2rem) 5%;
  font-size: 0.9rem;
}

footer p {
  color: var(--border);
  margin-bottom: 0.5rem;
}

footer a {
  color: #c4b5fd;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  nav ul {
    gap: 0.8rem;
    font-size: 0.85rem;
  }

  .hero {
    min-height: 50vh;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .hero {
    min-height: 40vh;
    padding: 1rem;
  }

  nav ul {
    display: none;
  }

  .card {
    padding: 1rem;
  }
}

/* ============ ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ PERFORMANCE ============ */
img {
  max-width: 100%;
  height: auto;
}

/* Lazy loading for images */
img[loading="lazy"] {
  background-color: var(--secondary);
}

/* Trust badges */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  padding: 8px 16px;
  border-radius: 20px;
  color: #15803d;
  font-weight: 600;
  font-size: 0.85rem;
  margin: 10px 5px 10px 0;
}

/* Print styles */
@media print {
  header,
  footer,
  .btn,
  form {
    display: none;
  }
}
