/* ============================================================
   DATAMATIUM CIA. LTDA. — index.css
   Estilos exclusivos de la página de inicio (index.html)
   Requiere: base.css cargado antes
   ============================================================ */

/* ── LOGO más grande en inicio ───────────────────────────── */
.logo-img  { height: 80px; }
.footer-logo { height: 52px; }

/* ── HERO CAROUSEL ───────────────────────────────────────── */
.hero { width: 100%; padding: 0; }

.carousel-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--navy);
  height: clamp(260px, 55vw, 650px);
}

.carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.carousel-img.active { opacity: 1; }

/* Overlay degradado */
.carousel-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,31,58,0.72) 0%, rgba(11,31,58,0.20) 60%, transparent 100%);
  pointer-events: none;
}

/* Caption */
.hero-caption {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  color: white;
  max-width: min(480px, 85%);
  text-align: center; /* asegura que el texto dentro esté centrado */
}


.hero-caption {
  position: absolute;
  left: clamp(16px, 5vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  color: white;
  max-width: min(480px, 85%);
}

.hero-caption p {
  font-size: clamp(12px, 1.8vw, 16px);
  opacity: 0.85;
  margin-top: 8px;
  max-width: 320px;
}

.hero-cta {
  display: inline-block;
  margin-top: 16px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: clamp(12px, 1.5vw, 14px);
  padding: 10px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.hero-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* Botones prev / next */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(255,255,255,0.92);
  border: none;
  width: clamp(32px, 4vw, 40px);
  height: clamp(32px, 4vw, 40px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--navy);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.2s;
}

.carousel-btn:hover { background: white; transform: translateY(-50%) scale(1.08); }

#prev { left: 12px; }
#next { right: 12px; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active { background: white; width: 24px; border-radius: 4px; }

/* ── STATS BAR ───────────────────────────────────────────── */
.stats-bar {
  width: 100%;
  padding: 24px 24px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 6px rgba(11,31,58,0.07);
  border: 1px solid var(--gray-light);
  transition: box-shadow 0.2s;
}

.stat-card:hover { box-shadow: 0 4px 20px rgba(11,31,58,0.12); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.blue  { background: var(--sky-light); }
.stat-icon.red   { background: #fde8e9; }
.stat-icon.green { background: #e8f5e9; }
.stat-icon.gold  { background: #fff8e6; }

.stat-info .num {
  font-family: 'Rajdhani', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-info .lbl { font-size: 11px; color: var(--gray-mid); margin-top: 2px; font-weight: 500; }

/* ── SECTION HEADER ──────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 28px; }

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}

/* ── CATEGORIES ──────────────────────────────────────────── */
.categories { width: 100%; margin: 48px 0 0; padding: 0 24px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.cat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 18px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border: 1.5px solid var(--gray-light);
  position: relative;
  overflow: hidden;
  transition: all 0.28s;
}

.cat-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.28s;
}

.cat-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(230,57,70,0.15); }
.cat-card:hover::before { transform: scaleX(1); }

.cat-emoji { font-size: 34px; margin-bottom: 12px; display: block; }

.cat-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
}

.cat-desc { font-size: 12px; color: var(--gray-mid); margin-top: 4px; line-height: 1.5; }

/* ── WHY SECTION ─────────────────────────────────────────── */
.why-section { width: 100%; margin: 56px 0 0; padding: 0 24px; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.why-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px;
  border: 1px solid var(--gray-light);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: box-shadow 0.2s;
}

.why-card:hover { box-shadow: 0 6px 24px rgba(11,31,58,0.1); }

.why-num {
  font-family: 'Rajdhani', sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--gray-light);
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}

.why-content h3 { font-family: 'Rajdhani', sans-serif; font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.why-content p  { font-size: 13px; color: var(--text-soft); line-height: 1.6; }

/* ── FOOTER AJUSTE INICIO ────────────────────────────────── */
.footer-inner  { padding-top: 48px; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  ≤ 900px
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .cat-grid  { grid-template-columns: repeat(2, 1fr); }
  .why-grid  { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤ 640px
══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .logo-img { height: 52px; }

  /* Carousel */
  .carousel-wrap  { height: clamp(220px, 60vw, 340px); }
  .hero-caption   { left: 14px; right: 14px; max-width: none; }
  .hero-caption p { max-width: 100%; }

  /* Stats */
  .stats-bar   { grid-template-columns: repeat(2, 1fr); padding: 16px 14px 0; gap: 12px; }
  .stat-card   { padding: 14px; gap: 10px; }
  .stat-icon   { width: 36px; height: 36px; font-size: 16px; }
  .stat-info .num { font-size: 20px; }

  /* Categories */
  .categories  { margin-top: 28px; padding: 0 14px; }
  .cat-grid    { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-card    { padding: 20px 12px; }
  .cat-emoji   { font-size: 28px; }

  /* Why */
  .why-section { margin-top: 32px; padding: 0 14px; }
  .why-grid    { grid-template-columns: 1fr; gap: 12px; }
}
