/* =========================
   RESET
========================= */

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

html{
  scroll-behavior:smooth;
}

body {
  font-family:'Inter',sans-serif;
  color:white;
  overflow-x:hidden;
  background:#020617;
  position:relative;
  z-index:0;
}

/* =========================
   FONDO ANIMADO
========================= */

body::before {
  content:"";
  position:fixed;
  inset:0;

  background:
    radial-gradient(circle at 20% 30%, rgba(212,175,55,0.12), transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(212,175,55,0.08), transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,0.04), transparent 60%);

  animation:moverFondo 25s infinite linear;

  z-index:0;
  filter:blur(120px);
  pointer-events:none;
}

body > *{
  position:relative;
  z-index:1;
}

@keyframes moverFondo{
  0%{
    background-position:0% 0%,100% 0%,50% 100%;
  }
  50%{
    background-position:100% 100%,0% 100%,50% 0%;
  }
  100%{
    background-position:0% 0%,100% 0%,50% 100%;
  }
}

/* =========================
   HERO
========================= */

.hero{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* =========================
   NAVBAR
========================= */

.navbar{
  width:100%;
  padding:30px 8%;

  display:flex;
  justify-content:space-between;
  align-items:center;
}

.logo{
  display:flex;
  align-items:center;
  gap:18px;
}

.logo img{
  width:80px;
}

.logo span{
  font-size:1.25rem;
  font-weight:700;
  letter-spacing:5px;
  color:#fff;
}

.menu{
  display:flex;
  gap:40px;
  list-style:none;
}

.menu a{
  text-decoration:none;
  color:#cbd5e1;
  font-weight:500;
  transition:0.3s;
}

.menu a:hover{
  color:#d4af37;
}

/* =========================
   CONTENIDO HERO
========================= */

.hero-content{
  flex:1;

  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;

  text-align:center;

  max-width:1000px;
  margin:auto;
  padding:0 30px;
}

/* TAG */

.hero-tag{
  background:rgba(212,175,55,0.12);

  color:#d4af37;

  border:1px solid rgba(212,175,55,0.25);

  padding:12px 24px;

  border-radius:50px;

  font-size:0.85rem;
  font-weight:600;
  letter-spacing:2px;

  margin-bottom:35px;

  backdrop-filter:blur(20px);
}

/* TITULO */

.hero h1{
  font-size:4.8rem;
  line-height:1.1;

  max-width:900px;

  margin-bottom:30px;

  background:linear-gradient(
    135deg,
    #ffffff,
    #d4af37,
    #ffffff
  );

  background-size:300%;

  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;

  animation:shine 8s linear infinite;
}

@keyframes shine{
  from{
    background-position:0%;
  }
  to{
    background-position:300%;
  }
}

/* SUBTITULO */

.hero p{
  max-width:750px;

  color:#94a3b8;

  font-size:1.3rem;
  line-height:1.9;

  margin-bottom:50px;
}

/* BOTONES */

.hero-buttons{
  display:flex;
  gap:20px;
}

.btn{
  padding:18px 38px;

  border-radius:18px;

  text-decoration:none;

  font-weight:600;

  transition:0.35s;
}

.btn-primary{
  background:#d4af37;
  color:#020617;

  box-shadow:
    0 10px 40px rgba(212,175,55,0.25);
}

.btn-primary:hover{
  transform:translateY(-6px);

  box-shadow:
    0 20px 50px rgba(212,175,55,0.4);
}

.btn-secondary{
  border:1px solid rgba(255,255,255,0.1);

  color:white;

  backdrop-filter:blur(20px);
}

.btn-secondary:hover{
  background:rgba(255,255,255,0.05);

  transform:translateY(-6px);
}

/* =========================
   SCROLL INDICATOR
========================= */

.scroll-indicator{
  position:absolute;
  bottom:40px;
  left:50%;
  transform:translateX(-50%);
}

.scroll-indicator span{
  display:block;

  width:25px;
  height:40px;

  border:2px solid rgba(255,255,255,0.2);
  border-radius:30px;

  position:relative;
}

.scroll-indicator span::before{
  content:"";

  width:5px;
  height:8px;

  background:#d4af37;

  border-radius:50px;

  position:absolute;
  top:7px;
  left:50%;
  transform:translateX(-50%);

  animation:scroll 2s infinite;
}

@keyframes scroll{
  0%{
    opacity:0;
    transform:translate(-50%,0);
  }

  50%{
    opacity:1;
  }

  100%{
    opacity:0;
    transform:translate(-50%,15px);
  }
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:900px){

  .menu{
    display:none;
  }

  .hero h1{
    font-size:3rem;
  }

  .hero p{
    font-size:1.1rem;
  }

  .hero-buttons{
    flex-direction:column;
  }
}


/* =========================
   PORTAFOLIO
========================= */

.portfolio {

  padding: 140px 8%;

  background: rgba(2, 6, 23, 0.5);

}


/* =========================
   HEADER
========================= */

.portfolio-header {

  max-width: 800px;

  margin: 0 auto 70px;

  text-align: center;

}


.section-tag {

  display: inline-block;

  color: #d4af37;

  font-size: 0.8rem;

  font-weight: 600;

  letter-spacing: 3px;

  margin-bottom: 20px;

}


.portfolio-header h2 {

  color: white;

  font-size: 3.5rem;

  line-height: 1.15;

  margin-bottom: 25px;

}


.portfolio-header p {

  color: #94a3b8;

  font-size: 1.1rem;

  line-height: 1.8;

}


/* =========================
   GALERÍA
========================= */

.portfolio-gallery {

  max-width: 1200px;

  margin: auto;

}


/* =========================
   PROYECTO PRINCIPAL
========================= */

.gallery-main {

  position: relative;

  display: flex;

  align-items: center;

}


.project-preview {

  width: 100%;

  height: 600px;

  position: relative;

  overflow: hidden;

  border-radius: 25px;

  border: 1px solid rgba(255,255,255,0.1);

  background: #020617;

  box-shadow:
    0 30px 80px rgba(0,0,0,0.4);

}


.project-preview::after {

  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      to top,
      rgba(2,6,23,0.95),
      rgba(2,6,23,0.1) 60%
    );

  pointer-events: none;

}


#project-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
    transition: opacity 0.3s, transform 0.5s;
}


/* =========================
   INFORMACIÓN DEL PROYECTO
========================= */

.project-overlay {

  position: absolute;

  z-index: 2;

  left: 50px;

  bottom: 45px;

  max-width: 600px;

}


.project-overlay span {

  color: #d4af37;

  font-size: 0.75rem;

  font-weight: 600;

  letter-spacing: 3px;

}


.project-overlay h3 {

  color: white;

  font-size: 2.5rem;

  margin: 12px 0;

}


.project-overlay p {

  color: #cbd5e1;

  font-size: 1rem;

  line-height: 1.7;

  margin-bottom: 25px;

}


.project-button {

  display: inline-block;

  padding: 13px 22px;

  border-radius: 12px;

  background: #d4af37;

  color: #020617;

  text-decoration: none;

  font-weight: 600;

  transition: 0.3s;

}


.project-button:hover {

  transform: translateY(-3px);

  box-shadow:
    0 10px 30px rgba(212,175,55,0.3);

}


/* =========================
   FLECHAS
========================= */

.gallery-arrow {

  position: absolute;

  z-index: 5;

  top: 50%;

  transform: translateY(-50%);

  width: 55px;

  height: 55px;

  border-radius: 50%;

  border: 1px solid rgba(255,255,255,0.15);

  background: rgba(2,6,23,0.7);

  backdrop-filter: blur(10px);

  color: white;

  font-size: 35px;

  line-height: 1;

  cursor: pointer;

  transition: 0.3s;

}


.gallery-arrow:hover {

  background: #d4af37;

  color: #020617;

  transform:
    translateY(-50%)
    scale(1.08);

}


.gallery-prev {

  left: 20px;

}


.gallery-next {

  right: 20px;

}


/* =========================
   MINIATURAS
========================= */

.gallery-thumbnails {

  display: flex;

  justify-content: center;

  gap: 20px;

  margin-top: 25px;

}


.thumbnail {

  width: 180px;

  height: 110px;

  position: relative;

  padding: 0;

  overflow: hidden;

  border-radius: 15px;

  border: 2px solid transparent;

  background: #020617;

  cursor: pointer;

  transition: 0.3s;

}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
    opacity: 0.55;
    transition: 0.3s;
}


.thumbnail span {

  position: absolute;

  left: 0;

  right: 0;

  bottom: 0;

  padding: 8px;

  background: rgba(2,6,23,0.75);

  color: white;

  font-size: 0.75rem;

}


.thumbnail:hover img {

  opacity: 0.9;

}


.thumbnail.active {

  border-color: #d4af37;

}


.thumbnail.active img {

  opacity: 1;

}


/* =========================
   RESPONSIVE
========================= */

@media(max-width: 700px) {

  .portfolio {

    padding: 100px 5%;

  }


  .portfolio-header h2 {

    font-size: 2.5rem;

  }


  .project-preview {

    height: 500px;

  }


  .project-overlay {

    left: 25px;

    right: 25px;

    bottom: 30px;

  }


  .project-overlay h3 {

    font-size: 1.8rem;

  }


  .project-overlay p {

    font-size: 0.9rem;

  }


  .gallery-arrow {

    width: 45px;

    height: 45px;

    font-size: 28px;

  }


  .thumbnail {

    width: 140px;

    height: 90px;

  }

}


/* =========================
   CHATBOT
========================= */

#chatbot {

    position: fixed;

    bottom: 25px;
    right: 25px;

    z-index: 9999;

}


/* =========================
   BOTÓN
========================= */

#chatbot-button {

    width: 60px;
    height: 60px;

    border: none;
    border-radius: 50%;

    background: #d4af37;
    color: #020617;

    font-size: 25px;

    cursor: pointer;

    box-shadow:
        0 5px 25px rgba(0,0,0,0.35);

    transition: 0.3s;

}


#chatbot-button:hover {

    transform: scale(1.08);

    box-shadow:
        0 10px 35px rgba(212,175,55,0.3);

}


/* =========================
   VENTANA
========================= */

#chatbot-window {

    position: absolute;

    bottom: 75px;
    right: 0;

    width: 350px;

    background: white;
    color: #111;

    border-radius: 18px;

    box-shadow:
        0 15px 50px rgba(0,0,0,0.4);

    overflow: hidden;

    display: none;

    flex-direction: column;

}

#chatbot-window.active {

  display: flex;

}

/* =========================
   HEADER
========================= */

.chatbot-header {

    background: #111;

    color: white;

    padding: 18px;

    display: flex;

    justify-content: space-between;

    align-items: center;

}


.chatbot-header strong {

    display: block;

    font-size: 17px;

}


.chatbot-header span {

    display: block;

    margin-top: 3px;

    font-size: 12px;

    opacity: 0.7;

}


#chatbot-close {

    background: none;

    border: none;

    color: white;

    font-size: 25px;

    cursor: pointer;

}


/* =========================
   MENSAJES
========================= */

#chatbot-messages {

    padding: 15px;

    height: 220px;

    overflow-y: auto;

    background: #f7f7f7;

    color: #111;

}


.bot-message,
.user-message {

    max-width: 85%;

    padding: 10px 13px;

    margin-bottom: 10px;

    border-radius: 12px;

    font-size: 14px;

    line-height: 1.4;

}


.bot-message {

    background: white;

    color: #111;

    border: 1px solid #eee;

}


.user-message {

    background: #111;

    color: white;

    margin-left: auto;

}


/* =========================
   PREGUNTAS
========================= */

#chatbot-questions {

    padding: 12px;

    display: flex;

    flex-direction: column;

    gap: 7px;

    max-height: 260px;

    overflow-y: auto;

}


#chatbot-questions button {

    border: 1px solid #ddd;

    background: white;

    color: #111;

    padding: 9px 12px;

    border-radius: 10px;

    text-align: left;

    font-size: 13px;

    cursor: pointer;

    transition: 0.2s;

}


#chatbot-questions button:hover {

    background: #f0f0f0;

    border-color: #d4af37;

}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 500px) {

  #chatbot {
    position: fixed;
    bottom: 25px;
    right: 25px;
}


    #chatbot-window {

        width: calc(100vw - 30px);

        right: -5px;

    }

}


