/* ============================================================ */
/* DESCARGAS 2025 — Centro de recursos corporativo              */
/* Lista limpia, tecnica y escaneable                           */
/* ============================================================ */

/* ==================== HEADER FORZADO AZUL ==================== */
body:has(.descargas-hero) .hp:not(.is-mega-open) {
  background: rgba(0, 34, 68, 0.95) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

/* ==================== VARIABLES ==================== */
:root {
  --descargas-grid-unit: 8px;
  --descargas-space-2: 16px;
  --descargas-space-3: 24px;
  --descargas-space-4: 32px;
  --descargas-space-6: 48px;
  --descargas-space-8: 64px;
  --descargas-space-12: 96px;
}

/* ==================== HERO ==================== */

.descargas-hero {
  position: relative;
  background: #f9fafb;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px var(--descargas-space-4) var(--descargas-space-8);
  text-align: center;
  overflow: hidden;
}

.descargas-eyebrow {
  display: inline-block;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  margin-bottom: var(--descargas-space-2);
}

.descargas-h1 {
  font-family: 'Space Grotesk', -apple-system, system-ui, sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0a0e27;
  margin: 0 0 var(--descargas-space-3) 0;
}

.descargas-hero-texto {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #4b5563;
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== CONTENIDO ==================== */

.descargas-contenido {
  padding: var(--descargas-space-8) var(--descargas-space-4);
  background: #ffffff;
}

.descargas-contenido .contenedor {
  max-width: 900px;
  margin: 0 auto;
}

/* ==================== BLOQUES DE DESCARGAS ==================== */

.descargas-bloque {
  margin-bottom: var(--descargas-space-8);
  padding-bottom: var(--descargas-space-6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.descargas-bloque:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.descargas-bloque h2 {
  font-family: 'Space Grotesk', -apple-system, system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #0a0e27;
  margin: 0 0 var(--descargas-space-2) 0;
}

.descargas-bloque-intro {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #6b7280;
  margin: 0 0 var(--descargas-space-4) 0;
  max-width: 700px;
}

/* ==================== LISTA DE DESCARGAS ==================== */

.descargas-lista {
  list-style: none;
  margin: 0;
  padding: 0;
}

.descargas-lista li {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.descargas-lista li:last-child {
  border-bottom: none;
}

.descargas-lista a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--descargas-space-2) 0;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  text-decoration: none;
  transition: all 0.2s ease;
}

.descargas-lista a:hover {
  color: #0a0e27;
}

.descargas-lista a:hover i {
  color: #dc2626;
}

.descargas-lista a i {
  font-size: 20px;
  color: #9ca3af;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.descargas-meta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  .descargas-hero {
    min-height: auto;
    padding: var(--descargas-space-12) var(--descargas-space-3);
  }

  .descargas-h1 {
    font-size: 36px;
  }

  .descargas-hero-texto {
    font-size: 16px;
  }

  .descargas-contenido {
    padding: var(--descargas-space-6) var(--descargas-space-3);
  }

  .descargas-bloque h2 {
    font-size: 24px;
  }

  .descargas-lista a {
    flex-wrap: wrap;
    gap: 8px;
  }

  .descargas-meta {
    margin-left: 32px;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .descargas-h1 {
    font-size: 28px;
  }

  .descargas-bloque h2 {
    font-size: 20px;
  }

  .descargas-lista a {
    font-size: 14px;
  }
}

/* ==================== MODAL DE DESCARGA ==================== */

.download-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  transition: opacity 0.3s ease;
}

.download-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.download-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.download-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: downloadModalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes downloadModalSlideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.download-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.download-modal-title {
  margin: 0;
  font-family: 'Space Grotesk', -apple-system, system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #0a0e27;
}

.download-modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #666;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-modal-close:hover {
  background: #f0f0f0;
  color: #0a0e27;
}

.download-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.download-modal-intro {
  margin: 0 0 1.5rem 0;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6b7280;
}

.download-form-group {
  margin-bottom: 1.5rem;
}

.download-form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0a0e27;
  margin-bottom: 8px;
}

.download-form-group label i {
  color: #6b7280;
}

.download-form-group .required {
  color: #dc2626;
}

.download-input {
  width: 100%;
  padding: 14px 16px;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 15px;
  color: #1f2937;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.download-input:focus {
  border-color: #0a0e27;
  box-shadow: 0 0 0 3px rgba(10, 14, 39, 0.08);
}

.download-input::placeholder {
  color: #9ca3af;
}

.download-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #dc2626;
  min-height: 18px;
}

/* Checkbox privacidad */
.download-privacy-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.download-privacy-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0 0;
  cursor: pointer;
  accent-color: #0a0e27;
  flex-shrink: 0;
}

.download-privacy-label {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
  cursor: pointer;
  font-weight: 400 !important;
}

.download-privacy-label a {
  color: #0a0e27;
  text-decoration: underline;
}

.download-modal-footer {
  padding: 0;
  margin-top: 0.5rem;
}

.download-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: #0a0e27;
  color: #fff;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.download-btn-primary:hover:not(:disabled) {
  background: #1a1d3a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 14, 39, 0.2);
}

.download-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.download-btn-primary i {
  font-size: 16px;
}

/* Responsive modal */
@media (max-width: 640px) {
  .download-modal {
    padding: 1rem;
  }

  .download-modal-header,
  .download-modal-body {
    padding: 1.25rem;
  }

  .download-modal-title {
    font-size: 1.15rem;
  }
}
