/* =====================================
   Loading Skills — Dark Mode (Global)
   ===================================== */

/* -------- Variables -------- */
:root {
  --bg-900:#0b0f13;     /* fondo principal */
  --bg-800:#131a21;     /* header / secciones */
  --bg-700:#1c252e;     /* tarjetas / paneles */
  --bg-600:#27323f;     /* bordes */

  --green-500:#29a36a;  /* acento principal */
  --green-400:#3ecf8e;
  --blue-500:#2196f3;   /* acento secundario */
  --amber-400:#ffd166;

  --text-100:#f1f5f9;   /* texto fuerte */
  --text-300:#cbd5e1;   /* texto medio */
  --text-500:#94a3b8;   /* texto apagado */

  --radius:14px;
  --shadow:0 6px 18px rgba(0,0,0,.4);
  --shadow-sm:0 2px 8px rgba(0,0,0,.35);
}

/* -------- Reset + Base -------- */
*{box-sizing:border-box;}
html,body{margin:0;height:100%;}
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg-900);
  color: var(--text-100);
  line-height:1.6;
  -webkit-font-smoothing: antialiased;
}
img,video {height:auto; display:block;}
a {color:inherit; text-decoration:none;}
[hidden]{display:none!important}

/* -------- Header / Nav -------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-800);
  padding: .7rem 1rem;
  border-bottom: 2px solid var(--green-500);
  box-shadow: var(--shadow-sm);
}

header.top nav {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Logo izq / botones der */
}

.logo-wrapper img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

/* Contenedor de links */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
  header.top nav {
    flex-direction: column;
    align-items: center;
  }
  .nav-links {
    justify-content: center;
    margin-top: .5rem;
    width: 100%;
  }
}





.logo-wrapper img{width:44px; height:44px; border-radius:50%;}
nav{margin-left:auto; display:flex; gap:.4rem;}
.text-wrapper{
  color:var(--text-300);
  background:transparent;
  border:1px solid transparent;
  border-radius:999px;
  padding:.6rem 1rem;
  font-weight:600;
  cursor:pointer;
  transition:all .2s ease;
}
.text-wrapper:hover{color:var(--text-100); border-color:var(--green-500); background:rgba(41,163,106,.1);}
.text-wrapper.activo{background:var(--green-500); color:#fff;}

/* -------- Sections -------- */
.section{
  background: var(--bg-800);
  border:1px solid var(--bg-600);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:28px;
  max-width:1200px;
  margin:22px auto;
}
h1,h2,h3{margin:0 0 .5rem; line-height:1.3;}
h1{font-size:clamp(1.8rem,3.5vw,2.6rem); color:var(--text-100);}
h2{font-size:clamp(1.4rem,2.8vw,2rem); color:var(--text-100);}
h3{font-size:1.2rem; color:var(--text-300);}
.subtitle{color:var(--text-500); margin:.25rem 0 1rem;}
.barra-separadora{width:80px; height:4px; border-radius:4px; background:var(--green-500); margin:14px 0 22px;}

/* -------- Layouts -------- */
.content-wrapper{display:grid; gap:24px; align-items:center;}
.hero{grid-template-columns:1.05fr .95fr;}
@media(max-width:900px){.hero{grid-template-columns:1fr;}}

/* -------- Buttons -------- */
.button{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  padding:.8rem 1.2rem; border-radius:999px;
  font-weight:700; cursor:pointer; text-decoration:none;
  border:2px solid transparent; transition:all .2s ease;
}
.primary{background:var(--green-500); color:#fff;}
.primary:hover{background:var(--green-400);}
.secondary{background:var(--bg-700); color:var(--text-100); border-color:var(--green-500);}
.secondary:hover{background:var(--bg-600);}
.ghost{background:transparent; color:var(--green-500); border:2px solid var(--green-500);}
.ghost:hover{background:rgba(41,163,106,.1);}

/* -------- Cards -------- */
.cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px;}
.card{
  background: var(--bg-700);
  border:1px solid var(--bg-600);
  border-radius: var(--radius);
  padding:20px;
  box-shadow: var(--shadow-sm);
  display:flex; flex-direction:column; gap:12px;
  transition:transform .2s ease, box-shadow .2s ease;
}
.card:hover{transform:translateY(-4px); box-shadow:0 8px 20px rgba(0,0,0,.6);}
.card h3{color:var(--text-100);}
.card .price{font-size:1.2rem; font-weight:800; color:var(--green-400);}
.card .features{margin:0; padding-left:18px; color:var(--text-300);}
.card .badge{background:var(--amber-400); color:#000; border-radius:999px; padding:.25rem .6rem; font-weight:700;}

.cardapply {
  max-width: 860px;
  margin: 40px auto;
  padding: 28px 32px;
  background: #27323f;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.cardapply h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: fff;
}

.cardapply .lead {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 6px;
}

/* -------- Forms -------- */
form, .form{
  background: var(--bg-700);
  border:1px solid var(--bg-600);
  border-radius: var(--radius);
  padding:20px;
  box-shadow: var(--shadow-sm);
}
label{display:flex; flex-direction:column; gap:.35rem; font-weight:600; color:var(--text-100);}
input,select,textarea{
  border:2px solid var(--bg-600);
  border-radius:12px;
  padding:.7rem .9rem;
  font:inherit;
  background:var(--bg-800);
  color:var(--text-100);
}
input:focus,select:focus,textarea:focus{border-color:var(--green-500); outline:none;}

/* -------- Flow -------- */
#flow .card{background:var(--bg-700);}
#flow .card::before{
  content: attr(data-step);
  position:absolute; top:-14px; left:-14px;
  width:34px; height:34px; border-radius:50%;
  background:var(--green-500); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:.9rem;
}

/* -------- FAQ -------- */
#faq details{
  background:var(--bg-700);
  border:1px solid var(--bg-600);
  border-radius:12px;
  padding:14px 16px;
  margin-top:10px;
}
#faq details[open]{border-color:var(--green-500);}
#faq summary{cursor:pointer; font-weight:700; color:var(--text-100);}
#faq p{color:var(--text-300);}



/* -------- Tables (general use) -------- */
table{width:100%; border-collapse:collapse; margin:1rem 0; font-size:.95rem;}
th,td{padding:.75rem 1rem; border:1px solid var(--bg-600);}
th{background:var(--bg-700); color:var(--text-100); text-align:left;}
td{color:var(--text-300);}

/* -------- Footer -------- */
footer{
  background: var(--bg-800);
  color: var(--text-500);
  padding:26px 16px;
  border-top:3px solid var(--green-500);
  margin-top:40px;
  text-align:center;
}
footer a{color:var(--green-400);}
footer a:hover{text-decoration:underline;}

/* -------- Utilities -------- */
.caption{color:var(--text-500); font-size:.85rem; margin-top:.35rem;}
@media(max-width:900px){.cards{grid-template-columns:1fr;}}

/* ===========================
   Loading Skills — AI Chat
   =========================== */
#ai-chat {
  background: var(--bg-800);
}

#ls-chat-box {
  background: var(--bg-900);
  border: 2px solid var(--bg-600);
  border-radius: 14px;
  padding: 14px;
  height: 340px;
  overflow-y: auto;
  font-size: 0.95rem;
  color: var(--text-100);
  line-height: 1.4;
  box-shadow: inset 0 0 6px rgba(0,0,0,.3);
}

/* Scrollbar sutil */
#ls-chat-box::-webkit-scrollbar { width: 8px; }
#ls-chat-box::-webkit-scrollbar-thumb {
  background: var(--bg-600);
  border-radius: 10px;
}
#ls-chat-box::-webkit-scrollbar-thumb:hover { background: var(--green-500); }

/* Mensajes */
.message {
  max-width: 80%;
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: 12px;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.user-message {
  background: var(--green-500);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}
.bot-message {
  background: var(--bg-700);
  color: var(--text-100);
  margin-right: auto;
  border-bottom-left-radius: 2px;
}

/* Input */
#ls-chat-input {
  flex: 1;
  resize: none;
  border: 2px solid var(--bg-600);
  border-radius: 12px;
  padding: .7rem;
  background: var(--bg-900);
  color: var(--text-100);
  font: inherit;
  line-height: 1.4;
  transition: border-color .2s ease;
}
#ls-chat-input::placeholder { color: var(--text-500); }
#ls-chat-input:focus {
  border-color: var(--green-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(41,163,106,.2);
}

/* Botón enviar */
#ls-chat-send {
  flex-shrink: 0;
  padding: .8rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
}

/* ============================
   Loading Skills — Primary Button
   ============================ */
.button.primary {
  --btn-bg: linear-gradient(135deg, var(--green-500) 0%, var(--green-400) 100%);
  --btn-shadow: 0 6px 14px rgba(41,163,106,.35);
  --btn-border: 2px solid var(--green-500);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;

  padding: .9rem 1.6rem;
  border-radius: 14px;
  border: var(--btn-border);

  background: var(--btn-bg);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .3px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;

  box-shadow: var(--btn-shadow);
  transition:
    transform .08s ease,
    box-shadow .25s ease,
    filter .25s ease;
}

/* Hover */
.button.primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 18px rgba(41,163,106,.45);
  transform: translateY(-1px);
}

/* Active (click) */
.button.primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(41,163,106,.4);
}

/* Focus accesible */
.button.primary:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(41,163,106,.35),
    0 6px 14px rgba(41,163,106,.45);
}

/* Disabled */
.button.primary[disabled],
.button.primary[aria-disabled="true"] {
  opacity: .6;
  cursor: not-allowed;
  filter: grayscale(.3);
  transform: none;
  box-shadow: none;
}

/* Glow gamer decorativo */
.button.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.15), transparent 60%),
             radial-gradient(circle at 80% 80%, rgba(24,194,156,.25), transparent 60%);
  opacity: .5;
  pointer-events: none;
  transition: opacity .3s ease;
}
.button.primary:hover::after { opacity: .8; }





/* -------- Blog / Posts -------- */
/* -------- Blog / Posts (Dark) -------- */
.post-card {
  background: var(--bg-800, #1a1f29);
  border: 1px solid var(--bg-600, #2b3442);
  border-radius: var(--radius, 14px);
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
  display: grid;
  gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.55);
}
.post-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-100, #f3f4f6);
}
.post-card p {
  margin: 0;
  color: var(--text-300, #c0c5ce);
}
.post-card .meta {
  font-size: .85rem;
  color: var(--text-400, #9aa3b2);
}
.post-card .badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-blue, #2563eb);
  color: #fff;
}
.post-card .readmore {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  color: var(--green-500, #22c55e);
  border: 2px solid var(--green-500, #22c55e);
  padding: .5rem 1rem;
  border-radius: 12px;
  transition: background .2s ease, color .2s ease, transform .1s ease;
}
.post-card .readmore:hover {
  background: var(--green-500, #22c55e);
  color: #fff;
  transform: translateY(-2px);
}

/* -------- Blog Hero (Dark) -------- */
.blog-hero {
  display: grid;
  gap: 14px;
  padding: 48px 16px;
  text-align: center;
  background: linear-gradient(180deg, #0b0f17, #141b24);
}
.blog-hero h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin: 0;
  color: var(--text-100, #f3f4f6);
}
.blog-hero p {
  color: var(--text-300, #c0c5ce);
  max-width: 820px;
  margin: 0 auto;
}

/* -------- Blog Actions -------- */
.blog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.blog-actions .button {
  padding: .7rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--green-500, #22c55e);
  background: var(--green-500, #22c55e);
  color: #fff;
  font-weight: 600;
  transition: background .2s ease, transform .1s ease;
}
.blog-actions .button:hover {
  background: var(--green-400, #34d399);
  transform: translateY(-2px);
}
.blog-actions .button.secondary {
  background: var(--dark-card, #1f2733);
  color: var(--text-100, #f3f4f6);
  border-color: var(--green-500, #22c55e);
}
.blog-actions .button.secondary:hover {
  background: var(--green-500, #22c55e);
  color: #fff;
}

/* -------- Blog Section -------- */
.blog-section {
  padding: 28px 16px;
}

/* -------- Posts Grid -------- */
.posts-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 1100px;
  margin: 0 auto;
}

/* -------- Footer Separator (Dark) -------- */
.footer-separator {
  border: 0;
  height: 1px;
  background: var(--bg-600, #2b3442);
  margin: 12px 0;
}

/* -------- Banner / Hero Image -------- */
.imgb {
  width: 100%;                /* Ocupar todo el ancho disponible */
  max-width: 100%;            /* Evita desbordes */
  height: auto;               /* Mantener proporciones */
  object-fit: cover;          /* Rellenar de forma estética */
  
  box-shadow: 0 6px 18px rgba(0,0,0,.45); /* sombra profesional */
  /* centrado y con espacio inferior */
  display: block;
}

/* Versión responsive: si quieres efecto "hero" */
@media (min-width: 1024px) {
  .imgb {
    max-height: 480px;        /* altura máxima para que no se dispare en pantallas grandes */
  }
}


/* --- Layout horizontal para post-card --- */
.post-card.horizontal {
  display: flex;
  align-items: center;
  gap: 20px;
}

.post-card.horizontal .post-card-media {
  flex: 1;
}

.post-card.horizontal .post-card-media img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

.post-card.horizontal .post-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Responsive: vuelve a stack en móvil */
@media(max-width: 768px) {
  .post-card.horizontal {
    flex-direction: column;
  }
  .post-card.horizontal .post-card-media,
  .post-card.horizontal .post-card-content {
    width: 100%;
  }
}


.image-content {
  display: flex;
  justify-content: center;   /* Centra horizontal */
  align-items: center;       /* Centra vertical si hay altura */
  margin: 28px auto;         /* Espaciado */
  max-width: 600px;         /* No excede demasiado en pantallas grandes */
  padding: 0 16px;           /* Respira en los lados */
}

.image-content img {
  width: 100%;
  max-width: 900px;          /* Controla tamaño máximo */
  height: auto;
  border-radius: 16px;       /* Bordes suaves */
  box-shadow: 0 8px 24px rgba(0,0,0,.45);  /* Sombra pro */
  object-fit: cover;
  transition: transform .3s ease, box-shadow .3s ease;
}

/* Efecto hover elegante */
.image-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,.55);
}


/* TIMELINE SECTION */
.timeline {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timeline-marker {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}

.timeline-content {
  flex: 1;
  
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}

.timeline-content h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--ink);
}

.timeline-content p {
  margin: 0;
  font-size: .95rem;
  color: var(--muted);
}

/* STATE COLORS */
.timeline-item.completed .timeline-marker {
  background: #22c55e; /* verde */
}
.timeline-item.completed .timeline-content {
  border-left: 4px solid #22c55e;
}

.timeline-item.active .timeline-marker {
  background: #0ea5e9; /* azul */
}
.timeline-item.active .timeline-content {
  border-left: 4px solid #0ea5e9;
}

.timeline-item:not(.completed):not(.active) .timeline-marker {
  background: #c99e2a; /* gris neutro */
}
.timeline-item:not(.completed):not(.active) .timeline-content {
  border-left: 4px solid #c99e2a;
}

.hero-video {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-wrapper {
  width: 100%;
  max-width: 1200px;  /* en pantallas grandes */
  aspect-ratio: 16 / 9;
  position: relative;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* puedes cambiar a "contain" si prefieres ver todo el video */
  border-radius: 8px;
  display: block;
}

.caption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .video-wrapper {
    max-width: 100%;       /* que ocupe todo el ancho disponible */
    aspect-ratio: 16 / 9;  /* mantiene proporción */
  }

  .video-wrapper video {
    border-radius: 3%;      /* sin bordes redondeados en móvil */
    object-fit: contain;   /* en móvil suele ser mejor ver el video completo */
  }

  .caption {
    font-size: 0.8rem;
    padding: 0 10px;       /* más margen lateral en pantallas pequeñas */
  }
}

@media (max-width: 480px) {
  .caption {
    font-size: 0.75rem;
  }
}


/* Fondo del modal */
.modal {
  display: flex;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
}

/* Caja del modal */
.modal-content {
  background: #111;
  padding: 20px;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: fadeIn 0.4s ease-in-out;
}

/* Botón cerrar (ajustado para que siempre se vea) */
.close-btn {
  position: fixed;      /* ahora fijo en la pantalla */
  top: 20px;            /* separación desde arriba */
  right: 25px;          /* separación desde la derecha */
  font-size: 36px;      /* más grande */
  font-weight: bold;
  color: #fff;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;       /* por encima de todo */
  transition: background 0.2s, transform 0.2s;
}

.close-btn:hover {
  background: rgba(255, 0, 0, 0.8);
  transform: scale(1.1);
}


/* Video responsive */
.video-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
}
.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.caption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #ccc;
}

/* Animación */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    padding: 10px;
  }
  .close-btn { font-size: 24px; }
}






/* Estructura dos columnas */
#contact .content-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

/* Texto a la izquierda */
#contact .text-content {
  flex: 1;
  min-width: 280px;
  order: 1;
}

/* Imagen a la derecha */
#contact .image-content {
  flex: 1;
  min-width: 280px;
  text-align: right;
  order: 2;
}

#contact .image-content img {
  max-width: 100%;
  height: auto;
}

/* Responsive: apilado en móviles */
@media (max-width: 768px) {
  #contact .content-wrapper {
    flex-direction: column;
    text-align: center;
  }

  #contact .image-content {
    text-align: center;
    margin-top: 20px;
  }
}
