/* ==========================================================
   DEMOFLOW HOMEPAGE
========================================================== */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  background:#f4f7fb;
  color:#1f2937;
  font-family:Segoe UI,Roboto,Arial,sans-serif;
}

.home-page{
  width:100%;
  min-height:100vh;
  padding:40px 20px;
  display:flex;
  justify-content:center;
}

.home-container{
  width:100%;
  max-width:1400px;
  margin:0 auto;
}

/* HEADER */

.home-header{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:35px;
  flex-wrap:wrap;
  gap:20px;
}

.home-header h1{
  font-size:42px;
  color:#2563eb;
}

.home-header p{
  margin-top:10px;
  color:#6b7280;
  font-size:18px;
}

/* HERO */

.hero-card{
  width:100%;
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#fff;
  border-radius:20px;
  padding:60px;
  margin:0 auto 35px;
  box-shadow:0 20px 40px rgba(0,0,0,.12);
  text-align:center;
}

.hero-card h2{
  font-size:42px;
  margin-bottom:20px;
}

.hero-card p{
  font-size:18px;
  line-height:1.8;
  max-width:900px;
  margin:0 auto;
  opacity:.95;
}

.hero-actions{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:15px;
  margin-top:35px;
  flex-wrap:wrap;
}

/* BOTONES */

.btn-primary,
.btn-white,
.btn-outline-white,
.btn-secondary,
.btn-danger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 24px;
  border-radius:10px;
  font-weight:bold;
  text-decoration:none;
  transition:.25s;
  border:none;
}

.btn-primary{
  background:#2563eb;
  color:white;
}

.btn-primary:hover{
  background:#1d4ed8;
  transform:translateY(-2px);
}

.btn-white{
  background:white;
  color:#2563eb;
}

.btn-white:hover{
  transform:translateY(-2px);
}

.btn-outline-white{
  border:2px solid white;
  color:white;
}

.btn-outline-white:hover{
  background:white;
  color:#2563eb;
}

.btn-secondary{
  background:#eef2ff;
  color:#2563eb;
}

.btn-secondary:hover{
  background:#dbeafe;
}

.btn-danger{
  background:#dc2626;
  color:white;
  cursor:pointer;
}

.btn-danger:hover{
  background:#b91c1c;
}

/* TARJETAS */

.video-card,
.steps-card,
.ia-card,
.tech-card,
.empty-card{
  width:100%;
  background:white;
  border-radius:18px;
  padding:35px;
  margin:0 auto 35px;
  box-shadow:0 12px 30px rgba(0,0,0,.06);
}

/* VIDEO */

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

.video-info{
  text-align:left;
}

.video-info h2{
  font-size:34px;
  margin:10px 0 20px;
}

.video-info p{
  color:#6b7280;
  line-height:1.8;
  margin-bottom:25px;
}

.video-player{
  width:100%;
}

.video-player iframe{
  width:100%;
  height:360px;
  border:none;
  border-radius:15px;
  display:block;
}

/* TITULOS */

.section-head{
  margin-bottom:30px;
  text-align:center;
}

.section-head h2{
  font-size:34px;
  margin:10px 0;
}

.section-head p{
  color:#6b7280;
  max-width:760px;
  margin:0 auto;
  line-height:1.7;
}

.mini-label{
  display:inline-block;
  background:#dbeafe;
  color:#2563eb;
  padding:6px 12px;
  border-radius:30px;
  font-size:13px;
  font-weight:bold;
}

/* PASOS */

.steps-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:20px;
}

.step-card{
  background:#f8fafc;
  border-radius:15px;
  padding:25px;
  text-align:center;
}

.step-card span{
  width:50px;
  height:50px;
  border-radius:50%;
  background:#2563eb;
  color:white;
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0 auto;
  font-size:22px;
  font-weight:bold;
}

.step-card h3{
  margin:20px 0 12px;
}

.step-card p{
  color:#6b7280;
  line-height:1.6;
}

/* IA */

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

.ia-header h2,
.ia-header p{
  text-align:left;
}

.ia-creditos{
  background:#2563eb;
  color:white;
  padding:10px 18px;
  border-radius:30px;
  font-weight:bold;
}

.ia-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:20px;
}

.info-card{
  background:#f8fafc;
  border-radius:15px;
  padding:25px;
  text-align:center;
}

.info-card h3{
  margin-bottom:15px;
}

.info-card p{
  line-height:1.6;
}

.estado-ok{
  color:#16a34a;
  font-weight:bold;
}

.estado-error{
  color:#dc2626;
  font-weight:bold;
}

.texto-azul{
  color:#2563eb;
}

/* TECNOLOGIAS */

.tech-grid{
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  gap:15px;
}

.tech-grid span{
  background:#2563eb;
  color:white;
  padding:10px 18px;
  border-radius:30px;
  font-weight:bold;
}

/* PROYECTOS */

.section-title{
  font-size:34px;
  margin-bottom:30px;
  text-align:center;
}

.proyectos-grid{
  width:100%;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:30px;
  justify-content:center;
}

.proyecto-card{
  background:white;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 25px rgba(0,0,0,.06);
  transition:.25s;
}

.proyecto-card:hover{
  transform:translateY(-6px);
}

.preview-box{
  height:260px;
  background:#f3f4f6;
}

.preview-frame{
  width:100%;
  height:100%;
  border:none;
  display:block;
}

.preview-empty{
  display:flex;
  justify-content:center;
  align-items:center;
  height:100%;
  color:#9ca3af;
  text-align:center;
  padding:20px;
}

.proyecto-body{
  padding:25px;
  text-align:left;
}

.proyecto-body h3{
  margin-bottom:15px;
}

.descripcion{
  margin:15px 0;
  color:#6b7280;
  line-height:1.6;
}

.badge{
  display:inline-block;
  background:#dbeafe;
  color:#2563eb;
  padding:6px 12px;
  border-radius:30px;
  font-size:13px;
  font-weight:bold;
}

.acciones-card{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}

/* EMPTY */

.empty-card{
  text-align:center;
}

.empty-card h3{
  margin-bottom:15px;
}

.empty-card p{
  color:#6b7280;
  margin-bottom:25px;
  line-height:1.6;
}

/* RESPONSIVE */

@media(max-width:900px){

  .home-page{
    padding:25px 14px;
  }

  .home-header{
    flex-direction:column;
    align-items:center;
    text-align:center;
  }

  .hero-card{
    padding:38px 24px;
  }

  .hero-card h2{
    font-size:32px;
  }

  .hero-card p{
    font-size:16px;
  }

  .video-card{
    grid-template-columns:1fr;
    text-align:center;
  }

  .video-info{
    text-align:center;
  }

  .video-player iframe{
    height:260px;
  }

  .ia-header{
    justify-content:center;
    text-align:center;
  }

  .ia-header h2,
  .ia-header p{
    text-align:center;
  }

  .proyectos-grid{
    grid-template-columns:1fr;
  }

  .acciones-card{
    justify-content:center;
  }

  .proyecto-body{
    text-align:center;
  }
}

@media(max-width:480px){

  .home-header h1{
    font-size:34px;
  }

  .home-header p{
    font-size:16px;
  }

  .hero-card h2,
  .section-head h2,
  .section-title{
    font-size:28px;
  }

  .video-card,
  .steps-card,
  .ia-card,
  .tech-card,
  .empty-card{
    padding:24px 18px;
  }

  .btn-primary,
  .btn-white,
  .btn-outline-white,
  .btn-secondary,
  .btn-danger{
    width:100%;
  }

  .hero-actions,
  .acciones-card{
    width:100%;
  }
}

/* ==========================================================
   AJUSTE FINAL MOBILE - PROYECTOS
========================================================== */

@media(max-width:600px){

  .home-page{
    padding-left:10px;
    padding-right:10px;
  }

  .home-container{
    width:100%;
    max-width:100%;
  }

  .proyectos-grid{
    grid-template-columns:1fr;
    gap:22px;
  }

  .proyecto-card{
    width:100%;
    max-width:360px;
    margin:0 auto;
  }

  .proyecto-body{
    padding:22px 18px;
    text-align:center;
  }

  .proyecto-body h3{
    font-size:26px;
    line-height:1.2;
  }

  .descripcion{
    font-size:16px;
    line-height:1.7;
  }

  .acciones-card{
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
    width:100%;
  }

  .acciones-card a,
  .acciones-card button,
  .acciones-card form{
    width:100%;
  }

  .acciones-card .btn-primary,
  .acciones-card .btn-secondary,
  .acciones-card .btn-danger{
    width:100%;
    min-height:58px;
    font-size:17px;
    border-radius:14px;
  }

  .preview-box{
    height:220px;
  }

}