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


:root {
  /* 30 % — estructura y tipografía */
  --primary-color: #1A1A2E;
  --secondary-color: #3D3D5C;
  --dark-blue: #0D0D0D;

  /* 10 % — acento e interacción */
  --accent-color: #1CDAFF;
  --accent:    #1CDAFF;
  --accent2:   #0BBDE0;
  
  /* 60 % — fondos y espacios */
  --white:          #FFFFFF;
  --light-gray:     #F4F6F8;
  --border-color:   #E8ECF0;

  /* Texto */
  --text-primary:   #0D0D0D;
  --text-secondary: #3D3D5C;

  --background: #b9b8b8;
  --background2:rgb(219, 215, 215);
}

body {
  font-family: "Tomorrow", sans-serif;
  color: var(--text-primary);
  background: #050816;
  overflow-x: hidden;
  position: relative;
}

/* Luces de fondo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 255, 255, 0.372), transparent 25%),
    radial-gradient(circle at 80% 20%, rgba(0, 102, 255, 0.285), transparent 25%),
    radial-gradient(circle at 50% 80%, rgba(140, 0, 255, 0.301), transparent 30%);
  filter: blur(70px);
  z-index: -1;
}

@keyframes floatBg {
  from {
    transform: translate(0,0) scale(1);
  }
  to {
    transform: translate(-40px,20px) scale(1.2);
  }
}

/* Header corporativo */
header {
  margin-top:1rem;
  background: rgba(47, 43, 43, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 1200px;
  border-radius: 20px;
  z-index: 1000;
  border: 50%;
  z-index: 1000;
  display: flex;
  justify-content:space-around;
  align-items: center;
  transition: box-shadow 0.3s ease;
  padding: 0.5rem 2rem;
}
header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}


img {
  height: 60px;;
}

/* ===== MENU PRINCIPAL ===== */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu li {
  position: relative;
}

/* Links y botón del submenu */
.nav-menu a,
.submenu-btn {
  display: block;
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--background);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Iceland", sans-serif;
  font-weight: 600;
  font-style: normal;
}

/* Hover color */
.nav-menu a:hover,
.submenu-btn:hover {
  color: var(--accent-color);
}

/* Línea inferior animada */
.nav-menu a::after,
.submenu-btn::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--background2);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-menu a:hover::after,
.submenu-btn:hover::after {
  width: 70%;
}

/* ===== SUBMENU ===== */
.submenu {
  position: absolute;
  top: 110%;
  left: 0;
  background: var(--background);
  border-radius: 10px;
  width: 300px;
  list-style: none;
  padding: 0.5rem 0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  display: block !important;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 100;
}

/* Mostrar submenu */
.dropdown:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* items */
.submenu li {
  display: block;
  width: 100%;
}

/* Items del submenu */
.submenu li a {
  display: block;
  padding: 12px 18px;
  width: 100%;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text-primary);
}

/* Hover submenu */
.submenu li a:hover {
  background: #f5f7fa;
  color: var(--primary-color);
}

/* eliminar linea animada del submenu */
.submenu a::after {
  display: none;
}

.hamburguesa{
   background: none;
   border: none;
   color: #000;
   font-size: 2rem;
   cursor: pointer;
   display: none;
}

.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6),
  rgba(0, 0, 0, 0.6)),
  url("/img/consultoria.webp")
  center/cover no-repeat;
  color: var(--white);
  padding: 120px 80px;
  text-align: left;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items:flex-start;
  mask-image: linear-gradient(#1a1a2e 80%, transparent);
}

.hero h2 {
  font-size: 3rem;
  font-family: "Zen Dots", sans-serif;
  font-weight: 400;
  font-style: normal;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 1000px;
  color: #f7fafc;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 1000px;
  line-height: 1.7;
  font-family: "Tomorrow", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.hero h2 {
  opacity: 0;
  animation: fadeDown 1s cubic-bezier(0.22,1,0.36,1) 0.2s forwards;
}
.hero p {
  opacity: 0;
  animation: fadeUp 1s cubic-bezier(0.22,1,0.36,1) 0.5s forwards;
}

/* Secciones */
#consultoria {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columnas */
  gap: 2rem;
  padding: 4rem 5%;
  text-align: center;
  transition: all 0.2s ease-in-out;
}

.servicio-card {
  background:var(--background);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.servicio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.servicio-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.servicio-card h3 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.servicio-card p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}

.servicio-card {
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
/* Línea teal inferior al hacer hover */
.servicio-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 3px;
  background: var(--accent-color);
  transition: width 0.45s ease;
  border-radius: 0 0 12px 12px;
}
.servicio-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  border-color: rgba(28,218,255,0.2);
}
.servicio-card:hover::after { width: 100%; }

/* Imagen de la card con zoom suave */
.servicio-card img {
  transition: transform 0.45s ease;
}
.servicio-card:hover img {
  transform: scale(1.06);
}

/* Título con color en hover */
.servicio-card h3 {
  transition: color 0.3s ease;
}
.servicio-card:hover h3 {
  color: var(--accent-color);
}


/* ======== SECCIÓN DE VIDEO ======== */
.video-section {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 0;
}

.video-section video {
  width: 80%;
  max-width: 1200px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

/* Efecto al pasar el mouse */
.video-section video:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.video-section video {
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.4s ease;
}
.video-section video:hover {
  transform: scale(1.035);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35),
              0 0 0 3px rgba(28,218,255,0.2);
}


/* Footer corporativo */
.footer {
  color: var(--background);
  padding: 3rem 2rem 2rem;
  font-family: "Tomorrow", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-col h3, .footer-col h4 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  opacity: 0.9;
  font-family: "Iceland", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.footer-col p {
  margin-bottom: 0.5rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--background);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-col a:hover {
  opacity: 1;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  transition: all 0.3s ease;
  font-weight: 500;
  opacity: 1; /* Ajustado para mejor visibilidad */
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.2rem;
   font-family: "Iceland", sans-serif;
  font-weight: 600;
  font-style: normal;
  opacity: 0.8;
}

.footer-bottom a {
  color: var(--background);
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

.footer-col ul li a {
  position: relative;
  display: inline-block;
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.footer-col ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}
.footer-col ul li a:hover {
  color: var(--accent-color);
  opacity: 1;
  padding-left: 5px;
}
.footer-col ul li a:hover::after { width: 100%; }

.social-links a {
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.social-links a:hover {
  background: rgba(28,218,255,0.1);
  border-color: rgba(28,218,255,0.4);
  transform: translateX(6px);
}

/* ── Keyframes ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(50px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-65px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeRight {
  from { opacity: 0; transform: translateX(65px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.75) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes wipeLeft {
  from { opacity: 1; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 0% 0 0); }
}
@keyframes dropCard {
  from { opacity: 0; transform: translateY(-30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes floatImg {
  0%, 100% { transform: translateY(0px); }
  40%       { transform: translateY(-10px); }
  70%       { transform: translateY(-5px); }
}
@keyframes shimmer {
  0%   { left: -100%; }
  100% { left: 160%; }
}
@keyframes tealPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(28,218,255,0.35); }
  50%       { box-shadow: 0 0 22px 6px rgba(28,218,255,0.07); }
}
@keyframes listSlide {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Estados iniciales ── */
.anim-up, .anim-down, .anim-left, .anim-right,
.anim-pop, .anim-wipe, .anim-drop, .anim-list {
  opacity: 0;
  will-change: opacity, transform;
}
.anim-up    { transform: translateY(50px); }
.anim-down  { transform: translateY(-40px); }
.anim-left  { transform: translateX(-65px); }
.anim-right { transform: translateX(65px); }
.anim-pop   { transform: scale(0.75) translateY(30px); }
.anim-drop  { transform: translateY(-30px) scale(0.95); }
.anim-list  { transform: translateX(-30px); }
.anim-wipe  { clip-path: inset(0 100% 0 0); opacity: 1; }

/* ── Disparar al entrar ── */
.anim-up.visible    { animation: fadeUp    0.8s  cubic-bezier(0.22,1,0.36,1) forwards; }
.anim-down.visible  { animation: fadeDown  0.75s cubic-bezier(0.22,1,0.36,1) forwards; }
.anim-left.visible  { animation: fadeLeft  0.85s cubic-bezier(0.22,1,0.36,1) forwards; }
.anim-right.visible { animation: fadeRight 0.85s cubic-bezier(0.22,1,0.36,1) forwards; }
.anim-pop.visible   { animation: popIn     0.75s cubic-bezier(0.34,1.56,0.64,1) forwards; }
.anim-wipe.visible  { animation: wipeLeft  0.95s cubic-bezier(0.22,1,0.36,1) forwards; }
.anim-drop.visible  { animation: dropCard  0.7s  cubic-bezier(0.34,1.56,0.64,1) forwards; }
.anim-list.visible  { animation: listSlide 0.65s cubic-bezier(0.22,1,0.36,1) forwards; }

/* ── Delays ── */
.d1 { animation-delay: 0.08s !important; }
.d2 { animation-delay: 0.17s !important; }
.d3 { animation-delay: 0.26s !important; }
.d4 { animation-delay: 0.35s !important; }
.d5 { animation-delay: 0.44s !important; }
.d6 { animation-delay: 0.53s !important; }

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

/* TABLET */
@media (max-width: 1024px) {
  header {
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem;
    gap: 1rem;
  }

  header img {
    height: 80px;
  }

  #consultoria {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablet */
  }
}

/* MÓVIL */
@media (max-width: 768px) {
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
  }

   header img {
    width: auto;
    height: 60px;
  }

 .hamburguesa {
    display: block;
 }

  /* Menú oculto inicialmente */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    clip-path: circle(0px at 90% -10%);
    pointer-events: none;
  }

  .nav-menu a{
    font-size: 1.2rem;
    color: var(--white);
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .nav-menu.active{
    clip-path: circle(1000px at 90% -10%);
    pointer-events: all;
  }

  .submenu-btn{
    color: var(--white);
  }

  .nav-menu li{
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
  }

  .nav-menu.active li{
    opacity: 1;
    transform: translateY(0);
  }

  .nav-menu li:nth-child(1) {transition: 0.1s;}
  .nav-menu li:nth-child(2) {transition: 0.2s;}
  .nav-menu li:nth-child(3) {transition: 0.3s;}
  .nav-menu li:nth-child(4) {transition: 0.4s;}

  
  #consultoria {
    grid-template-columns: repeat(2, 1fr); /* 1 columnas en móvil */
    gap: 1.5rem;
    padding: 2rem 1rem;
  }

  .servicio-card {
    padding: 1.2rem;
  }

  .servicio-card h3 {
    font-size: 1rem;
  }

  .hero{
    padding: 0 10px;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

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

  .video-section {
    padding: 2rem 1rem;
  }

  .video-section video {
    width: 100%;
  }

  .footer-row {
    flex-direction: column;
    text-align: center;
  }

  .footer-col a{
    font-size: 1rem;
  }
}

/* MÓVIL PEQUEÑO */
@media (max-width: 480px) {
  #consultoria {
    grid-template-columns: 1fr; /* 1 columna si es muy estrecho */
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .footer-bottom p {
    font-size: 0.75rem;
  }
}

/* ESCONDER BOTÓN EN ESCRITORIO */
@media (min-width: 769px) {

  /* Menú horizontal */
  .nav-menu ul {
    display: flex;
    flex-direction: row;
    gap: 20px;
  }

/* Ocultar retroceder */
  .back-button {
    display: none;
  }
}