/* ============================================================
   ALKINS CT – Custom Styles
   Solo: carousel, scroll-reveal, pseudo-elementos, scrollbar
   Paleta oficial: #008fc9 | #27407c | #b62a32
   ============================================================ */

:root {
  --blue:  #008fc9;
  --red:   #b62a32;
  --dk:    #27407c;
  --navy:  #0d1a2c;
  --navy2: #121e30;
  --white: #eef3ff;
  --muted: #7a90b8;
  --grad:  linear-gradient(130deg, #008fc9 0%, #27407c 55%, #b62a32 100%);
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ── GRADIENT TEXT UTILITY ────────────────────────────────── */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── BUTTON ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  font-family: 'Orbitron', sans-serif;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: opacity .25s, transform .2s;
}
.btn:hover { opacity: .85; transform: translateY(-2px); }

/* ── NAV LINK – línea hover ───────────────────────────────── */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  height: 2px; width: 0;
  background: var(--grad);
  transition: width .3s;
}
.nav-link:hover::after { width: 100%; }

/* ── CAROUSEL ─────────────────────────────────────────────── */
.carousel {
  position: relative;
  width: 100%;
  height: calc(100dvh - 68px);
  overflow: hidden;
  margin-top: 68px;
}

.track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .75s cubic-bezier(.77,0,.18,1);
  will-change: transform;
}

.slide {
  /* Tamaño fijo igual al viewport — no crece con el contenido */
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;        /* contenido siempre en la zona inferior */
  padding: 0 8% 80px;           /* espacio para dots */
  overflow: hidden;
}

/* Escritorio: centrar verticalmente */
@media (min-width: 769px) {
  .slide {
    align-items: center;
    padding: 0 8% 0;
  }
}

.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.28);
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(13,26,44,.92) 38%, rgba(13,26,44,.1) 100%);
}

@media (max-width: 768px) {
  .slide-overlay {
    /* En móvil el contenido está abajo: degradado de abajo hacia arriba */
    background: linear-gradient(
      to top,
      rgba(13,26,44,.97) 0%,
      rgba(13,26,44,.75) 50%,
      rgba(13,26,44,.25) 100%
    );
  }
}

.slide-content { position: relative; z-index: 2; max-width: 580px; width: 100%; }

.slide-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: .65rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.slide-tag::before { content: ''; width: 28px; height: 2px; background: var(--blue); }

.slide-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}
.slide-title span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide-desc {
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(238,243,255,.7);
  line-height: 1.7;
  margin-bottom: 30px;
}

.slide-icon-bg {
  position: absolute;
  right: 6%; top: 50%;
  transform: translateY(-50%);
  font-size: clamp(7rem, 14vw, 12rem);
  opacity: .05;
  color: var(--blue);
  z-index: 1;
  pointer-events: none;
}

/* Carousel controls */
.c-dots {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 10;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(238,243,255,.3);
  cursor: pointer; transition: all .3s;
}
.dot.on { background: var(--blue); transform: scale(1.4); }

.c-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0,143,201,.15);
  border: 1px solid rgba(0,143,201,.3);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; z-index: 10;
  transition: background .3s;
}
.c-arrow:hover { background: rgba(0,143,201,.4); }
.c-arrow.prev { left: 22px; }
.c-arrow.next { right: 22px; }

.progress-bar {
  position: absolute; bottom: 0; left: 0;
  height: 3px; background: var(--grad);
  transition: width .1s linear; z-index: 10;
}

/* ── MVV CARD – línea superior ────────────────────────────── */
.mvv-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--grad);
}

/* ── SERVICE CARD – overlay hover ─────────────────────────── */
.sp-card {
  position: relative;
  overflow: hidden;
}
.sp-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad);
  opacity: 0; transition: opacity .3s; z-index: 0;
}
.sp-card:hover::before { opacity: .07; }
.sp-card > * { position: relative; z-index: 1; }

/* ── SCROLL REVEAL ────────────────────────────────────────── */
.r   { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.r.v { opacity: 1; transform: translateY(0); }
.r2  { transition-delay: .15s; }
.r3  { transition-delay: .3s; }

/* ══════════════════════════════════════════════════════════
   SISTEMA DE TEMAS — DARK / LIGHT
   ══════════════════════════════════════════════════════════ */

/* Variables de tema — dark (por defecto) */
:root {
  --theme-bg-page:    #0d1a2c;
  --theme-bg-surface: #121e30;
  --theme-bg-footer:  #091220;
  --theme-text:       #eef3ff;
  --theme-muted:      #7a90b8;
}

/* Variables de tema — light */
html.light {
  --theme-bg-page:    #f0f5fb;
  --theme-bg-surface: #e2eaf4;
  --theme-bg-footer:  #cfdcea;
  --theme-text:       #0c1a2c;
  --theme-muted:      #3f5a78;
}

/* ── BOTÓN TOGGLE ─────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(0,143,201,0.08);
  border: 1px solid rgba(0,143,201,0.2);
  color: var(--blue);
  cursor: pointer;
  transition: background .2s, color .2s;
  flex-shrink: 0;
  font-size: 0.88rem;
}
.theme-toggle:hover { background: rgba(0,143,201,0.22); }

/* ── LIGHT MODE: OVERRIDES ────────────────────────────────── */

/* Tailwind bg */
html.light .bg-act-navy  { background-color: var(--theme-bg-page)    !important; }
html.light .bg-act-navy2 { background-color: var(--theme-bg-surface) !important; }

/* Tailwind text */
html.light .text-act-white { color: var(--theme-text)  !important; }
html.light .text-act-muted  { color: var(--theme-muted) !important; }

/* bg-act-white: usado en líneas del hamburger */
html.light .bg-act-white { background-color: var(--theme-text) !important; }

/* Nav */
html.light nav {
  background: rgba(240,248,255,0.96) !important;
  border-color: rgba(0,143,201,0.22) !important;
  box-shadow: 0 2px 16px rgba(0,80,160,0.07);
}
html.light .nav-link       { color: var(--theme-muted) !important; }

/* Mobile menu */
html.light #mobile-menu {
  background: rgba(240,248,255,0.98) !important;
  border-color: rgba(0,143,201,0.18) !important;
}
html.light .mobile-link        { color: var(--theme-muted) !important; }
html.light .mobile-link:hover  { color: var(--theme-text)  !important; }

/* Tarjetas con valores rgba arbitrarios de Tailwind */
html.light [class*="bg-[rgba(18,30,48"] {
  background-color: rgba(255,255,255,0.9) !important;
  box-shadow: 0 1px 10px rgba(0,80,160,0.07);
}
html.light [class*="bg-[rgba(13,26,44"] {
  background-color: rgba(225,238,255,0.8) !important;
}

/* Footer */
html.light footer {
  background-color: var(--theme-bg-footer) !important;
  border-color: rgba(0,143,201,0.18) !important;
}

/* Carousel */
html.light .slide-overlay {
  background: linear-gradient(
    95deg,
    rgba(230,242,255,.92) 0%,
    rgba(230,242,255,.68) 42%,
    rgba(230,242,255,.04) 100%
  ) !important;
}
html.light .slide-bg         { filter: brightness(.44) !important; }
html.light .slide-desc       { color: rgba(12,26,44,.78) !important; }
html.light .c-arrow          { color: var(--theme-text)  !important; }
html.light .dot              { background: rgba(12,26,44,.28) !important; }
html.light .dot.on           { background: var(--blue)  !important; }

/* Scrollbar */
html.light ::-webkit-scrollbar-track { background: var(--theme-bg-surface); }

/* Botón toggle en modo claro */
html.light .theme-toggle {
  background: rgba(0,143,201,0.1);
  border-color: rgba(0,143,201,0.28);
}
html.light .theme-toggle:hover { background: rgba(0,143,201,0.22); }

/* Botón toggle versión móvil (ancho completo en menú) */
.theme-toggle-mobile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

/* ── TABLET ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .slide-icon-bg { display: none; }

  .slide-content { max-width: 100%; }

  .c-arrow {
    width: 36px;
    height: 36px;
    font-size: .8rem;
  }
  .c-arrow.prev { left: 10px; }
  .c-arrow.next { right: 10px; }

  .slide-title {
    font-size: clamp(1.6rem, 5.5vw, 2.4rem);
    margin-bottom: 12px;
  }

  .slide-desc {
    font-size: .98rem;
    line-height: 1.6;
    margin-bottom: 20px;
    /* Limitar a 3 líneas — evita que el contenido crezca y rompa el layout */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ── LOGOS POR TEMA ────────────────────────────────────────── */
/* dark mode (por defecto): logo-Blanco visible, logo-Color oculto */
.logo-light { display: none; }
/* light mode: logo-Color visible, logo-Blanco oculto */
html.light .logo-dark  { display: none; }
html.light .logo-light { display: block; }

/* ── MÓVIL (≤ 480px) ──────────────────────────────────────── */
@media (max-width: 480px) {
  .slide { padding: 0 5% 68px; }

  .c-arrow { display: none; }

  .slide-tag {
    font-size: .56rem;
    letter-spacing: .15em;
    margin-bottom: 8px;
  }

  .slide-title {
    font-size: clamp(1.4rem, 7.5vw, 2rem);
    margin-bottom: 10px;
    line-height: 1.15;
  }

  .slide-desc {
    font-size: .88rem;
    margin-bottom: 18px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .btn {
    font-size: .6rem;
    padding: 10px 18px;
  }

  .c-dots { bottom: 20px; }
  .dot { width: 7px; height: 7px; }
}
