/* ===== BASE ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #00d4ff;
  --primary-dark: #0099bb;
  --accent: #7c3aed;
  --accent2: #f59e0b;
  --dark: #0a0a0f;
  --dark2: #12121a;
  --light: #f0f4ff;
  --text: #374151;
  --grad: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  --grad2: linear-gradient(135deg, #0a0a0f 0%, #1a1040 100%);
}

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Open Sans', sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background: #fff;
}

h1, h2, h3, h4, h5 { color: var(--dark); }

.seccion { padding: 5.5rem 0; }

.seccion-titulo { margin-bottom: 3.5rem; }
.seccion-titulo h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.seccion-titulo h2 span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.seccion-titulo p { color: #6b7280; font-size: 1.05rem; margin-top: .5rem; }

/* ===== NAVBAR ===== */
.encabezado {
  background: rgba(10,10,15,0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff;
  padding: .7rem 0;
  transition: all .4s ease;
}

.encabezado.fondo-menu {
  background: rgba(10,10,15,0.95);
  box-shadow: 0 4px 30px rgba(0,212,255,.12);
}

.encabezado .container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.encabezado .logo img { width: 48px; height: auto; }

.boton-menu {
  border: 0;
  font-size: 1.8rem;
  margin-left: auto;
  padding: 0 .5rem;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.boton-menu:focus { outline: 0; }

#menu-principal { flex: 1 1 100%; }

#menu-principal ul {
  list-style: none;
  padding: 0;
  margin: .8rem 0 0;
}

#menu-principal ul a {
  display: block;
  padding: .7rem 0;
  color: rgba(255,255,255,.85);
  text-transform: uppercase;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,.08);
  transition: color .3s;
}

#menu-principal ul a:hover,
#menu-principal ul li.active a { color: var(--primary); }

/* ===== HERO ===== */
.hero {
  position: relative;
  background: url('../images/fondo.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,15,.88) 0%, rgba(124,58,237,.35) 60%, rgba(0,212,255,.2) 100%);
}

/* partículas decorativas */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,212,255,.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(124,58,237,.2) 0%, transparent 40%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 1rem;
}

.hero-content h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -.03em;
  line-height: 1.15;
}

.hero-content h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content .lead {
  font-size: 1.15rem;
  opacity: .85;
  margin-bottom: 2.2rem;
  font-weight: 400;
}

.hero-btns .btn { margin: .4rem; }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 0; right: 0;
  z-index: 1;
}

.hero-scroll a {
  color: rgba(255,255,255,.6);
  font-size: 2.5rem;
  animation: bounce 2s infinite;
  text-decoration: none;
  transition: color .3s;
}
.hero-scroll a:hover { color: var(--primary); }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== BOTONES ===== */
.btn-primary {
  background: var(--grad);
  border: none;
  color: #fff;
  font-weight: 600;
  letter-spacing: .03em;
  border-radius: 50px;
  padding: .65rem 1.8rem;
  transition: opacity .3s, transform .2s, box-shadow .3s;
  box-shadow: 0 4px 20px rgba(0,212,255,.3);
}
.btn-primary:hover,
.btn-primary:focus {
  opacity: .9;
  border: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,212,255,.45);
  color: #fff;
}

.btn-outline-light {
  border-radius: 50px;
  padding: .65rem 1.8rem;
  font-weight: 600;
  letter-spacing: .03em;
  border: 2px solid rgba(255,255,255,.5);
  transition: all .3s;
}
.btn-outline-light:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

/* ===== SERVICIOS ===== */
.servicios-cards {
  background: var(--light);
  position: relative;
}

.servicios-cards::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad);
}

.card-servicio {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
  border: 1px solid rgba(0,212,255,.08);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  position: relative;
  overflow: hidden;
}

.card-servicio::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transition: transform .3s;
}

.card-servicio:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,212,255,.15);
  border-color: rgba(0,212,255,.25);
}

.card-servicio:hover::after { transform: scaleX(1); }

.icono-servicio {
  width: 72px; height: 72px;
  background: var(--grad);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.4rem;
  box-shadow: 0 8px 25px rgba(0,212,255,.3);
}

.icono-servicio i { font-size: 1.8rem; color: #fff; }

.card-servicio h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .6rem; }
.card-servicio p { font-size: .9rem; color: #6b7280; margin: 0; }

/* ===== NOSOTROS ===== */
.nosotros-sec {
  background: #fff;
  position: relative;
}

.lista-nosotros {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.lista-nosotros li {
  padding: .6rem 0;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.lista-nosotros li i {
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===== PROYECTOS ===== */
.proyectos-sec { background: var(--dark2); }

.proyectos-sec .seccion-titulo h2 { color: #fff; }
.proyectos-sec .seccion-titulo p { color: rgba(255,255,255,.5); }

.card-proyecto {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.card-proyecto img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform .5s ease;
  display: block;
}

.card-proyecto:hover img { transform: scale(1.1); }

.proyecto-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,15,.95) 0%, rgba(124,58,237,.5) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem;
  opacity: 0;
  transition: opacity .35s;
}

.card-proyecto:hover .proyecto-overlay { opacity: 1; }

.proyecto-overlay h4 { color: #fff; font-size: 1rem; font-weight: 700; margin: 0; }
.proyecto-overlay p {
  color: var(--primary);
  font-size: .82rem;
  font-weight: 600;
  margin: .3rem 0 0;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ===== STATS ===== */
.stats-banner {
  background: var(--grad2);
  padding: 4.5rem 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.stats-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 50%, rgba(0,212,255,.12) 0%, transparent 50%),
    radial-gradient(circle at 90% 50%, rgba(124,58,237,.15) 0%, transparent 50%);
}

.stat-item {
  position: relative;
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  transition: background .3s, transform .3s;
}

.stat-item:hover {
  background: rgba(0,212,255,.08);
  transform: translateY(-4px);
}

.stat-item i {
  font-size: 2.2rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .8rem;
  display: block;
}

.stat-item h3 { font-size: 2.2rem; font-weight: 800; color: #fff; margin: 0; letter-spacing: -.02em; }
.stat-item p { color: rgba(255,255,255,.55); margin: .3rem 0 0; font-size: .9rem; }

/* ===== CONTACTO ===== */
.contacto-sec {
  background: var(--light);
  position: relative;
}

.info-contacto { padding-right: 2rem; }

.item-contacto {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.8rem;
  padding: 1.2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0,0,0,.05);
  border: 1px solid rgba(0,212,255,.1);
  transition: box-shadow .3s, transform .3s;
}

.item-contacto:hover {
  box-shadow: 0 8px 30px rgba(0,212,255,.15);
  transform: translateX(4px);
}

.item-contacto i {
  font-size: 1.4rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-right: 1rem;
  margin-top: .2rem;
  flex-shrink: 0;
}

.item-contacto h5 { font-size: .9rem; font-weight: 700; margin: 0 0 .2rem; }
.item-contacto p { margin: 0; font-size: .9rem; color: #6b7280; }
.item-contacto a { color: var(--primary); text-decoration: none; }
.item-contacto a:hover { text-decoration: underline; }

.form-contacto {
  background: #fff;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 40px rgba(0,0,0,.08);
  border: 1px solid rgba(0,212,255,.1);
}

.form-contacto .form-control {
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  padding: .8rem 1.1rem;
  font-size: .9rem;
  transition: border-color .3s, box-shadow .3s;
  background: #fafafa;
}

.form-contacto .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0,212,255,.12);
  background: #fff;
}

/* ===== FOOTER ===== */
.piedepagina {
  background: var(--dark);
  color: rgba(255,255,255,.65);
  padding: 3.5rem 0 0;
  position: relative;
}

.piedepagina::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
}

.footer-col { margin-bottom: 2rem; }
.footer-logo { width: 50px; margin-bottom: 1rem; }

.piedepagina h5 { color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: 1rem; }
.piedepagina p { font-size: .85rem; }

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: .85rem;
  line-height: 2.2;
  transition: color .3s, padding-left .3s;
  display: block;
}

.footer-links li a:hover {
  color: var(--primary);
  padding-left: 6px;
}

.redes-sociales {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: .6rem;
}

.redes-sociales a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  text-decoration: none;
  transition: all .3s;
}

.redes-sociales a:hover {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,212,255,.3);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 1.2rem 0;
  margin-top: 1rem;
  font-size: .8rem;
  color: rgba(255,255,255,.3);
}

/* ===== IR ARRIBA ===== */
.ir-arriba {
  position: fixed;
  bottom: 1.8rem;
  right: 1.8rem;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--grad);
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  text-decoration: none;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,212,255,.4);
  transition: transform .2s, box-shadow .2s;
}

.ir-arriba:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,212,255,.55);
  color: #fff;
}

/* ===== MODAL ===== */
.modal-content {
  border-radius: 16px;
  border: 1px solid rgba(0,212,255,.15);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.modal-header {
  background: var(--grad2);
  border-radius: 16px 16px 0 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.modal-header .modal-title { color: #fff; font-weight: 700; }
.modal-header .close { color: rgba(255,255,255,.7); text-shadow: none; }

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  #menu-principal {
    flex: 0 1 auto;
    margin-left: auto;
    height: auto !important;
    display: block !important;
  }

  #menu-principal ul {
    display: flex;
    margin: 0;
    gap: .3rem;
  }

  #menu-principal ul a {
    padding: .5rem .9rem;
    border-top: 0;
    border-bottom: 2px solid transparent;
    text-transform: capitalize;
    font-size: .88rem;
    border-radius: 6px 6px 0 0;
  }

  #menu-principal ul a:hover,
  #menu-principal ul li.active a {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(0,212,255,.06);
  }

  .hero-content h1 { font-size: 3.8rem; }
  .info-contacto { padding-right: 3rem; }
}

@media (min-width: 992px) {
  html { font-size: 16px; }
  .hero-content h1 { font-size: 4.5rem; }
}
