/* Estilo general */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === HEADER GENERAL === */
.header-SuperColor {
  position: relative;
  background: linear-gradient(135deg, #004d7a, #008793, #00bf72, #a8eb12);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
  padding: 10px 20px;
  overflow: visible;
}

/* Fondo animado con grietas */
.crack-overlay {
  position: absolute;
  inset: 0;
  background: url("img/crack.png") center/cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

/* Animación del fondo */
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Contenedor principal */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  position: relative;
}

/* Branding */
.branding {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-principe {
  height: 100px;
  animation: floatLogo 4s ease-in-out infinite;
}

.logo-anios {
  height: 80px;
  animation: popIn 1s ease-out forwards;
}

/* Animación de flotación */
@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Animación de entrada */
@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* === MENÚ PRINCIPAL === */
.nav .menu {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav .menu li {
  position: relative;
}

.nav .menu a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav .menu a:hover {
  color: yellow;
  transform: scale(1.05);
}

/* === SUBMENÚ === */
.submenu {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  background: white;
  color: black;
  list-style: none;
  padding: 10px 0;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 6px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
  z-index: 999;
}

.submenu li a {
  display: block;
  padding: 8px 15px;
  color: black;
  transition: background 0.3s ease;
}

.submenu li a:hover {
  background: #f0f0f0;
}

/* Mostrar submenú */
.dropdown:hover .submenu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* BOLA DE DEMOLICIÓN */
.wrecking-ball {
  position: absolute;
  top: -150px;
  left: -150px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, #444 30%, #222 100%);
  border-radius: 50%;
  box-shadow: inset -8px -8px 20px rgba(0,0,0,0.6);
  transform: scale(0);
  opacity: 0;
  z-index: 20;
  pointer-events: none;
}

/* Animación de entrada */
@keyframes swingBall {
  0%   { transform: translateX(-200px) translateY(-200px) scale(1) rotate(0deg); opacity: 1; }
  40%  { transform: translateX(50px) translateY(20px) scale(1) rotate(15deg); }
  60%  { transform: translateX(100px) translateY(0px) scale(1) rotate(-10deg); }
  100% { transform: translateX(150px) translateY(200px) scale(0.5); opacity: 0; }
}

/* Efecto de grietas */
.crack-overlay {
  position: absolute;
  inset: 0;
  background-image: url('img/Crack.png');
  background-size: cover;
  opacity: 0;
  pointer-events: none;
  z-index: 15;
  transition: opacity 0.3s ease;
}


/* Que el fondo animado no bloquee el mouse */
.header-SuperColor::before{
  pointer-events: none;
  z-index: 0;
}

/* Asegura que la barra y el menú queden por encima del ::before */
.top-bar, .nav, .menu{
  position: relative;
  z-index: 2;
}

/* Submenú por encima y ligeramente separado */
.submenu{
  left: 0;
  top: calc(100% + 8px);
  z-index: 999;
  background: #fff;            /* mantiene tu estilo actual */
  background-clip: padding-box;
}

/* Mantén overflow oculto normalmente, pero muéstralo cuando se abre el dropdown */
.header-SuperColor:has(.dropdown:hover){
  overflow: visible;
}

/* Accesibilidad + micro-anim en enlaces sin cambiar tu look */
.menu a{
  position: relative;
  transition: background-color .3s ease, transform .3s ease;
}
.menu a::after{
  content:"";
  position:absolute;
  left:10px; right:10px; bottom:6px;
  height:2px;
  background: rgba(255,255,255,.55);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.menu a:hover::after,
.menu a:focus-visible::after{ transform: scaleX(1); }

.menu a:focus-visible{
  outline: 2px solid #ffdc73;
  outline-offset: 3px;
  border-radius: 8px;
}

/* Si usas la bola de demolición, activa su animación con clase .active */
.wrecking-ball.active{
  transform: scale(1);
  opacity: 1;
  animation: swingBall 1.5s ease forwards;
}

/* Sutileza: brillo del degradado (no cambia colores) */
.header-SuperColor{
  background-size: 200% 200%;
  animation: headerShine 12s ease infinite;
}
@keyframes headerShine{
  0%{background-position: 0% 50%}
  50%{background-position: 100% 50%}
  100%{background-position: 0% 50%}
}




/* CONTENEDOR PRINCIPAL */
.container {
  width: 100%;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* CARRUSEL CRISTAL */
.slide {
  width: 100%;
  max-width: 1200px;
  height: 550px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* SLIDES - HORIZONTAL PARA TODOS */
.item {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease-in-out;
  padding: 20px 40px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  box-sizing: border-box;
  z-index: 0;
}

.item.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
  transform: scale(1.03);
  transition: opacity 1.2s ease-in-out, transform 0.6s ease;
}

/* IMAGEN */
.item .item-img {
  width: 480px;
  height: 320px;
  object-fit: cover;
  border-radius: 20px;
  margin-right: 40px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s ease;
}

.item:hover .item-img {
  transform: scale(1.05);
}

/* CONTENIDO */
.item .content {
  max-width: 600px;
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 16px;
  color: #fff;
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  transform: translateY(40px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.item.active .content {
  opacity: 1;
  transform: translateY(0);
}

/* TÍTULO */
.content .name {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #ffdc73;
  text-shadow: 1px 1px 6px #b38700cc;
  animation: glow 2.5s ease-in-out infinite alternate;
}

/* DESCRIPCIÓN */
.content .des {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 25px;
  color: #e0e0e0;
  animation: fadeInText 2s ease forwards;
}

/* BOTÓN */
.content button {
  padding: 12px 28px;
  font-size: 15px;
  background: #ffdc73;
  border: none;
  border-radius: 6px;
  color: #333;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
  animation: pulse 2.5s infinite;
}

.content button:hover {
  background: #ffd044;
  box-shadow: 0 0 15px #ffdc73;
  transform: scale(1.1);
}

/* BOTONES NAVEGACIÓN */
.button {
  position: absolute;
  width: 100%;
  top: 50%;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1000;
}

.button button {
  background: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 12px 16px;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: all;
  transition: background 0.3s, transform 0.3s;
  animation: arrowFloat 3s ease-in-out infinite;
}

.button button:hover {
  background: #ffdc73;
  transform: scale(1.3);
  filter: drop-shadow(0 0 15px #ffdc73);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  .slide {
    height: auto;
    max-width: 90%;
  }

  .item {
    flex-direction: column;
    height: auto;
    padding: 10px 20px;
    position: relative;
  }

  .item-img {
    width: 100%;
    height: auto;
    max-height: 350px;
    margin: 0 0 20px 0;
  }

  .content {
    max-width: 100%;
    padding: 20px;
  }

  .content .name {
    font-size: 24px;
  }

  .content .des {
    font-size: 14px;
  }
}

/* ANIMACIONES */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0% {
    text-shadow: 0 0 5px #b38700cc, 0 0 10px #b38700cc;
  }
  100% {
    text-shadow: 0 0 15px #ffdc73ee, 0 0 30px #ffdc73ee;
  }
}

@keyframes fadeInText {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 #ffdc73aa;
  }
  70% {
    box-shadow: 0 0 15px 10px #ffdc73aa;
  }
  100% {
    box-shadow: 0 0 0 0 #ffdc73aa;
  }
}

@keyframes arrowFloat {
  0%, 100% {
    transform: translateX(0);
    filter: drop-shadow(0 0 0 rgba(255, 220, 115, 0));
  }
  50% {
    transform: translateX(6px);
    filter: drop-shadow(0 0 6px rgba(255, 220, 115, 0.7));
  }
}


