/* ==========================================================================
   LIFECODE — Design System & Estilos Globales
   Paleta: Slate Navy (#0F172A), Crimson Pulse (#E11D48), Emerald (#10B981)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-surface: #131D31;
  --bg-card: rgba(30, 41, 59, 0.75);
  --bg-card-hover: rgba(39, 53, 77, 0.85);

  --primary: #E11D48;
  --primary-glow: rgba(225, 29, 72, 0.45);
  --primary-hover: #BE123C;
  --primary-subtle: rgba(225, 29, 72, 0.12);

  --accent-cyan: #06B6D4;
  --accent-cyan-subtle: rgba(6, 182, 212, 0.12);
  --accent-green: #10B981;
  --accent-green-subtle: rgba(16, 185, 129, 0.12);
  --accent-amber: #F59E0B;
  --accent-amber-subtle: rgba(245, 158, 11, 0.12);

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-bright: rgba(255, 255, 255, 0.18);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--primary-glow);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  touch-action: manipulation;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
  touch-action: manipulation;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(225, 29, 72, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Scrollbar Estilizado */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}

/* Contenedores y Secciones Blindadas */
section, header, footer, main {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  contain: paint;
  box-sizing: border-box;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.section {
  padding: 90px 0;
  position: relative;
}

/* Badges y Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--primary-subtle);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #FDA4AF;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.badge-cyan {
  background: var(--accent-cyan-subtle);
  border-color: rgba(6, 182, 212, 0.3);
  color: #67E8F9;
}

.badge-green {
  background: var(--accent-green-subtle);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6EE7B7;
}

.badge .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 14px var(--primary); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(225, 29, 72, 0.5);
  background: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-glass-bright);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

.btn-cyan {
  background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
  color: #0F172A;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
}

.btn-cyan:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.5);
  background: linear-gradient(135deg, #22D3EE 0%, #06B6D4 100%);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition-smooth);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.header.scrolled {
  padding: 12px 0;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFFFFF;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 0 10px rgba(225, 29, 72, 0.4));
}

.logo span.highlight {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: #FFFFFF;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding-top: 170px;
  padding-bottom: 110px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.hero-content h1 .gradient-text {
  background: linear-gradient(135deg, #FFFFFF 30%, #FDA4AF 70%, #E11D48 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 44px;
}

.hero-stats {
  display: flex;
  gap: 36px;
  border-top: 1px solid var(--border-glass);
  padding-top: 28px;
}

.stat-item h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFFFFF;
}

.stat-item h3 span {
  color: var(--primary);
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* 3D Medical Card Preview */
.medical-card-preview {
  position: relative;
  perspective: 1000px;
}

.interactive-id-card {
  background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
  border: 1px solid rgba(225, 29, 72, 0.35);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(225, 29, 72, 0.2);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.interactive-id-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #E11D48, #06B6D4, #10B981);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-brand img {
  width: 32px;
  height: 32px;
}

.card-brand h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #FFFFFF;
}

.blood-type-pill {
  background: linear-gradient(135deg, #E11D48 0%, #9F1239 100%);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
}

.card-user-info {
  display: flex;
  gap: 18px;
  margin-bottom: 22px;
}

.card-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary);
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.card-details h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.card-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.card-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.tag-allergy {
  background: rgba(220, 38, 38, 0.2);
  color: #FCA5A5;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.tag-donor {
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-med {
  background: rgba(6, 182, 212, 0.2);
  color: #67E8F9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.card-qr-box {
  background: #FFFFFF;
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-qr-svg {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

.card-qr-text p {
  font-size: 0.78rem;
  color: #0F172A;
  font-weight: 700;
  line-height: 1.3;
}

.card-qr-text span {
  font-size: 0.7rem;
  color: #475569;
  font-weight: 500;
}

/* Floating pulse animation */
.pulse-badge-floating {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #10B981;
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  animation: float-badge 3s ease-in-out infinite;
  z-index: 2;
}

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Interactive QR Simulator Section
   ========================================================================== */
.simulator-section {
  background: linear-gradient(180deg, var(--bg-primary) 0%, #111A2E 50%, var(--bg-primary) 100%);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}

.sim-scanner-box {
  background: #0B1120;
  border: 2px dashed rgba(225, 29, 72, 0.4);
  border-radius: var(--radius-xl);
  padding: 40px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #E11D48;
  box-shadow: 0 0 15px #E11D48, 0 0 30px #E11D48;
  animation: scan-line 3s infinite linear;
}

@keyframes scan-line {
  0% { top: 10%; opacity: 0.8; }
  50% { top: 90%; opacity: 1; }
  100% { top: 10%; opacity: 0.8; }
}

.sim-qr-large {
  width: 180px;
  height: 180px;
  margin: 0 auto 24px;
  background: #FFFFFF;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.sim-qr-large:hover {
  transform: scale(1.04);
}

.sim-result-card {
  background: #1E293B;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass-bright);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}

.rescue-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 20px;
}

.rescue-view-header h3 {
  font-size: 1.3rem;
  color: #FDA4AF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.data-row span.label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.data-row span.val {
  font-weight: 600;
  color: #FFFFFF;
  font-size: 0.95rem;
}

.gps-toast {
  margin-top: 24px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6EE7B7;
  font-size: 0.88rem;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(16, 185, 129, 0.4); }
  50% { border-color: rgba(16, 185, 129, 0.9); box-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 22px;
  border: 1px solid rgba(225, 29, 72, 0.25);
  transition: var(--transition-smooth);
}

.glass-card:hover .feature-icon {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 0 20px var(--primary-glow);
  transform: scale(1.1) rotate(5deg);
}

.glass-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.glass-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Use Cases / Profiles
   ========================================================================== */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.use-case-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: var(--transition-smooth);
}

.use-case-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(225, 29, 72, 0.2);
}

.use-case-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.use-case-card h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.use-case-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Steps Section (Cómo Funciona)
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  transition: var(--transition-smooth);
}

.step-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
}

.step-number {
  position: absolute;
  top: -16px;
  left: 24px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
}

.step-card h3 {
  font-size: 1.2rem;
  margin-top: 10px;
  margin-bottom: 12px;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-item.active {
  border-color: rgba(225, 29, 72, 0.4);
  background: var(--bg-card);
}

.faq-question {
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  user-select: none;
}

.faq-toggle-icon {
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 26px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 250px;
  padding-bottom: 22px;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-box {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid rgba(225, 29, 72, 0.3);
  border-radius: var(--radius-xl);
  padding: 70px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cta-box h2 {
  font-size: 2.8rem;
  margin-bottom: 18px;
}

.cta-box p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 36px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #090D16;
  border-top: 1px solid var(--border-glass);
  padding: 70px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 16px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-glass);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ==========================================================================
   Legal & Tutorial Specific Styles
   ========================================================================== */
.legal-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 130px 24px 80px;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-lg);
}

.legal-card h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.legal-meta {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 18px;
}

.legal-card h2 {
  font-size: 1.45rem;
  margin-top: 36px;
  margin-bottom: 14px;
  color: #FDA4AF;
}

.legal-card p, .legal-card li {
  color: #CBD5E1;
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-card ul {
  padding-left: 24px;
  margin-bottom: 20px;
}

.legal-alert-box {
  background: rgba(225, 29, 72, 0.12);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin: 24px 0;
  color: #FDA4AF;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Adaptations (100% Fluido y Responsivo)
   ========================================================================== */

/* ── Pantallas Medianas / Tablets Grandes (Hasta 1024px) ── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-content {
    text-align: center;
  }
  .hero-content p {
    margin: 0 auto 30px;
  }
  .hero-btns {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
    gap: 24px;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .use-cases-grid, .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .simulator-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* ── Tablets & Celulares en Horizontal (Hasta 768px) ── */
@media (max-width: 768px) {
  .header {
    padding: 10px 0;
  }
  .nav-container {
    padding: 0 16px;
    gap: 10px;
  }
  .logo {
    font-size: 1.15rem;
    gap: 8px;
    flex-shrink: 0;
  }
  .logo img {
    width: 32px;
    height: 32px;
  }
  .guide-badge {
    display: none !important;
  }
  .nav-links {
    display: none;
  }
  .nav-actions {
    gap: 8px;
    flex-shrink: 0;
  }
  .nav-actions .btn {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 50px !important;
    white-space: nowrap !important;
    gap: 6px !important;
  }
  .menu-toggle {
    display: block;
    font-size: 1.4rem;
    padding: 4px;
  }
  .hero {
    padding-top: 90px;
    padding-bottom: 40px;
  }
  .hero-content h1 {
    font-size: clamp(1.85rem, 5vw, 2.3rem);
    line-height: 1.25;
  }
  .section-header h2 {
    font-size: 1.85rem;
  }
  .features-grid, .use-cases-grid, .steps-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .legal-container {
    padding: 90px 16px 40px;
  }
  .legal-card {
    padding: 22px 16px;
    border-radius: var(--radius-lg);
  }
  .legal-card h1 {
    font-size: 1.7rem;
  }
}

/* ── Celulares Estándar y Pequeños (Hasta 480px y 320px) ── */
@media (max-width: 480px) {
  .nav-container {
    padding: 0 12px;
  }
  .logo {
    font-size: 1.1rem;
    gap: 6px;
  }
  .logo img {
    width: 28px;
    height: 28px;
  }
  .nav-actions {
    gap: 6px;
  }
  .nav-actions .btn {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    border-radius: 50px !important;
    white-space: nowrap !important;
    gap: 4px !important;
  }
  .container {
    padding: 0 12px;
  }
  .hero-content h1 {
    font-size: 1.75rem;
  }
  .hero-content p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  .hero-btns {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .hero-btns .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 14px 20px;
  }
  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 16px;
  }
  .stat-item h3 {
    font-size: 1.5rem;
  }

  /* Carné 3D en Pantallas Pequeñas */
  .interactive-id-card {
    padding: 18px 14px;
    border-radius: 16px;
  }
  .card-header-flex {
    margin-bottom: 14px;
  }
  .card-brand h4 {
    font-size: 0.95rem;
  }
  .blood-type-pill {
    padding: 4px 10px;
    font-size: 0.95rem;
  }
  .card-user-info {
    gap: 12px;
    margin-bottom: 14px;
  }
  .card-avatar {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }
  .card-details h3 {
    font-size: 1.05rem;
  }
  .card-details p {
    font-size: 0.78rem;
  }
  .card-tags {
    gap: 6px;
    margin-bottom: 14px;
  }
  .card-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  .card-qr-box {
    padding: 12px;
    gap: 10px;
  }
  .card-qr-svg {
    width: 56px;
    height: 56px;
  }
  .card-qr-text p {
    font-size: 0.72rem;
  }
  .card-qr-text span {
    font-size: 0.65rem;
  }
  .pulse-badge-floating {
    top: -10px;
    right: -5px;
    padding: 4px 10px;
    font-size: 0.65rem;
  }

  /* Simulador en Celulares */
  .sim-scanner-box, .sim-standby-card, .sim-result-card {
    padding: 24px 16px !important;
  }
  .sim-qr-large {
    width: 140px;
    height: 140px;
  }
  .rescue-view-header h3 {
    font-size: 1.1rem;
  }
  .data-row {
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
  }
  .data-row .label {
    font-size: 0.78rem;
  }
  .data-row .val {
    font-size: 0.88rem;
    text-align: left;
  }
  .gps-toast {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 12px;
  }

  /* CTA y Footer */
  .cta-box {
    padding: 36px 18px;
  }
  .cta-box h2 {
    font-size: 1.75rem;
  }
  .cta-box p {
    font-size: 0.95rem;
  }
  .cta-box .btn {
    width: 100%;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}
