/* Hero 3D - Título arriba | Carousel en el medio | Botón abajo - Punto Bizarro */

/* El body ya tiene margin-top (85px/80px) en core-style.css para compensar el header fijo */
.hero-3d {
  position: relative;
  width: 100%;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* Fondo con gradiente de marca (verde + negro) - aplicado directamente al contenedor */
  background: linear-gradient(145deg, #1D1D1B 0%, #00823F 50%, #1D1D1B 100%);
  background-size: 200% 200%;
  animation: heroGradientShift 12s ease infinite;
}

/* Sobreescribir la altura fija de .welcome_area del template */
.hero-3d.welcome_area {
  height: auto !important;
  min-height: auto !important;
}

/* Fondo legacy - ya no se usa, el gradiente está en .hero-3d */
.hero-3d-bg {
  display: none;
}

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

/* Contenedor interno: define el espacio del hero */
.hero-3d-inner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 20px 40px; /* padding normal, el fondo ahora está en el padre */
  gap: 0;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .hero-3d-inner {
    padding: 24px 24px 50px;
  }
}

/* Título + tagline; 24px de separación hasta el carousel */
.hero-3d-header {
  text-align: center;
  padding: 0;
  margin-bottom: 24px;
}

.hero-3d-header h2 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  color: #FFFF;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 130, 63, 0.3);
  margin: 16px 0 6px 0;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.2;
}

.hero-3d-tagline {
  font-size: clamp(13px, 2vw, 16px);
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-weight: 500;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* Carousel: reservar altura suficiente para los items que rotan (radio + item size) */
.hero-3d-scene {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  margin-top: 0;
  margin-bottom: 40px;
  overflow: visible;
  /* En mobile: radio 100px + item 100px = ~200px desde el centro hacia afuera */
  /* Necesitamos altura total para cubrir arriba y abajo */
  min-height: 260px;
}

@media (min-width: 768px) {
  .hero-3d-scene {
    min-height: 280px;
    margin-bottom: 30px;
  }
}

@media (min-width: 992px) {
  .hero-3d-scene {
    min-height: 340px;
    margin-bottom: 24px;
  }
}

/* Stage: tamaño justo para el contenido visible, los items 3D se dibujan con overflow visible */
.hero-3d-stage {
  position: relative;
  width: 160px;  /* Ajustado para radio 100px en mobile */
  height: 160px;
  transform-style: preserve-3d;
  transition: transform 0.1s linear;
  overflow: visible;
}

@media (min-width: 768px) {
  .hero-3d-stage {
    width: 240px;
    height: 240px;
  }
}

@media (min-width: 992px) {
  .hero-3d-stage {
    width: 280px;
    height: 280px;
  }
}

/* Cada item del carousel: posición en círculo 3D */
.hero-3d-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100px;  /* Ajustado para radio 100px en mobile */
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
  transform-style: preserve-3d;
  backface-visibility: visible;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .hero-3d-item {
    width: 150px;
    height: 150px;
    margin-left: -75px;
    margin-top: -75px;
  }
}

@media (min-width: 992px) {
  .hero-3d-item {
    width: 200px;
    height: 200px;
    margin-left: -100px;
    margin-top: -100px;
  }
}

.hero-3d-item a {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 30px rgba(0, 130, 63, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-3d-item a:hover {
  transform: scale(1.08);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 0 2px rgba(0, 130, 63, 0.5),
    0 0 50px rgba(0, 130, 63, 0.4);
}

.hero-3d-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* Botón: debajo del carousel, con z-index alto para estar sobre todo */
.hero-3d-cta {
  text-align: center;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.hero-3d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #FFFF;
  color: #00823F;
  border: 2px solid #FFFF;
  font-weight: 700;
  padding: 14px 32px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  min-width: 180px;
}

.hero-3d-btn:hover {
  background: transparent;
  color: #FFFF;
  border-color: #FFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}
