/* =========================
   RESET & BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #0f172a;
  color: #fff;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* 🔥 IMPORTANTE */
}

main {
  flex: 1;
}

.logo img {
  height: clamp(50px, 8vw, 120px);
  width: auto;
  display: block;
}

.logo {
  z-index: 1001;
}

.logo a {
  display: inline-block;
}

.service-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.about-img {
  width: 100%;
  height: clamp(240px, 30vw, 380px);
  object-fit: cover;

  border-radius: 16px;

  /* 🔥 sombra suave premium */
  box-shadow: 
    0 10px 30px rgba(0,0,0,0.25),
    0 2px 10px rgba(0,0,0,0.1);

  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* hover elegante (NO exagerado) */
.about-img:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 20px 50px rgba(0,0,0,0.4),
    0 5px 20px rgba(0,0,0,0.2);
}

/* =========================
   NAVBAR
========================= */
nav {
  position: fixed; /* 🔥 ESTE MANDA */
  width: 100%;
  top: 0;
  left: 0;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 10px 8%;
  z-index: 1000;

  min-height: clamp(50px, 6vh, 70px);
}

nav h2 {
  font-size: 1.2rem;
  letter-spacing: 1px;
}

nav div {
  display: flex;
  gap: 20px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
}

/* underline animado */
nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: #38bdf8;
  transition: 0.3s;
}

nav a:hover::after {
  width: 100%;
}

/* =========================
   NAV LINKS (DESKTOP)
========================= */
.nav-links {
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  position: relative;
  transition: all 0.3s ease;
}

/* underline elegante */
.nav-links a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: #38bdf8;
  transition: 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: #38bdf8;
}


/* =========================
   HAMBURGUESA
========================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: 0.3s ease;
}

/* animación a X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}


/* =========================
   MOBILE MENU
========================= */
@media (max-width: 768px) {

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    height: auto;
    padding: clamp(60px, 8vh, 80px) 0 30px;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 25px;

    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);

    transform: translateY(-120%);
    opacity: 0;

    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease;

    z-index: 1000;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }

  /* animación de entrada */
  .nav-links a {
    opacity: 0;
    transform: translateY(-10px);
  }

  .nav-links.active a {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links.active a:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active a:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active a:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active a:nth-child(4) { transition-delay: 0.4s; }

  /* hover más pro en mobile */
  .nav-links a:hover {
    transform: scale(1.05);
    color: #38bdf8;
  }

  .nav-links a::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-links a:hover::after {
    width: 60%;
  }
}

/* =========================
   UX EXTRA
========================= */
body.menu-open {
  overflow: hidden;
}

/* =========================
   HERO
========================= */
.hero {
  height: 100vh;
  padding: 0 8%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 20px;
}

.hero p {
  max-width: 600px;
  opacity: 0.8;
}

/* =========================
   GRID / SERVICIOS
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  padding: 60px 8%;
}

.card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  padding: 30px;
  border-radius: 15px;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
}

/* glow effect */
.card::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(56,189,248,0.2), transparent);
  top: -50%;
  left: -50%;
  opacity: 0;
  transition: 0.5s;
}

.card:hover::before {
  opacity: 1;
}

/* =========================
   SECCIONES
========================= */
section {
  padding: 80px 8%;
}

.center {
  text-align: center;
  max-width: 800px;
  margin: auto;
}

/* =========================
   BOTONES
========================= */
.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 28px;
  background: #38bdf8;
  color: #000;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  position: relative;
  overflow: hidden;
  transition: 0.3s;
}

.btn:hover {
  transform: scale(1.05);
}

/* =========================
   FORMULARIOS
========================= */
form {
  max-width: 500px;
  margin: auto;
}

input, textarea {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border: none;
  border-radius: 8px;
  outline: none;
  background: #1e293b;
  color: #fff;
}

textarea {
  min-height: 120px;
  resize: none;
}



/* =========================
   CONTACTO PRO
========================= */

.contact-section {
  text-align: center;
  padding: 80px 20px;
}

.contact-subtitle {
  opacity: 0.7;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

/* FORM */
.contact-form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* INPUT GROUP */
.input-group {
  position: relative;
}

/* INPUTS */
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  outline: none;
  background: #1e293b;
  color: #fff;
  font-size: 0.9rem;
  transition: 0.3s;
}

/* TEXTAREA */
.contact-form textarea {
  min-height: 120px;
  resize: none;
}

/* FOCUS EFECTO PRO */
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  box-shadow: 0 0 0 2px #38bdf8;
  background: #020617;
}

/* HOVER BOTÓN */
.contact-form .btn {
  margin-top: 10px;
}



/* =========================
   ANIMACIONES (JS)
========================= */
.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.show {
  opacity: 1;
  transform: translateY(0);
}

.ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
}

/* =========================
   FOOTER PRO (MEJORADO)
========================= */

.footer {
  background: #020617;
  padding: 50px 8% 15px;
  margin-top: 60px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.footer h4 {
  margin-bottom: 10px;
  color: #38bdf8;
  font-size: 0.95rem;
}

.footer p {
  opacity: 0.65;
  font-size: 0.85rem;
  margin-bottom: 6px;
  line-height: 1.4;
}

.footer a {
  display: block;
  color: #fff;
  text-decoration: none;
  margin-bottom: 6px;
  font-size: 0.85rem;
  opacity: 0.75;
  transition: 0.3s;
}

.footer a:hover {
  opacity: 1;
  color: #38bdf8;
  transform: translateX(4px);
}

/* Línea inferior */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 15px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  opacity: 0.5;
}

/* =========================
   TABLET
========================= */

@media (max-width: 768px) {
  .footer {
    padding: 40px 5% 10px;
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* =========================
   MOBILE (MEJORADO)
========================= */

@media (max-width: 480px) {

  .footer {
    padding: 30px 5% 10px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .footer h2 {
    font-size: 1rem;
  }

  .footer h4 {
    font-size: 0.9rem;
  }

  .footer p,
  .footer a {
    font-size: 0.8rem;
  }

  /*OPCIONAL: estilo tipo bloques */
  .footer-container > div {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .footer-container > div:last-child {
    border-bottom: none;
  }

  .footer a:hover {
    transform: none;
  }
}

/* =========================
   RESPONSIVE PRO
========================= */

/* Tablets */
@media (max-width: 992px) {
  nav {
    padding: 15px 5%;
  }

  .grid {
    padding: 40px 5%;
  }

  section {
    padding: 60px 5%;
  }
}

/* Móviles grandes */
@media (max-width: 768px) {

  .hero {
    padding: 0 5%;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  input, textarea {
    font-size: 0.9rem;
  }
}



