/* home_new.css - Warm Retro theme with innovative header and mobile enhancements */

:root {
  /* Palette Warm Retro */
  --primary-color:      #D4A017; /* mustard */
  --secondary-color:    #D35400; /* burnt orange */
  --accent-color:       #417D7A; /* deep sage */
  --success-color:      #6AA84F; /* muted green */
  --text-primary:       #F5F5DC; /* ivory/beige */
  --text-secondary:     #CCCCCC; /* light gray */
  --card-bg:            #2B2B2B; /* dark neutral for cards */
  --body-bg:            #1A1A1A; /* original dark bg */
  --gradient-primary:   linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  --gradient-secondary: linear-gradient(135deg, var(--card-bg) 20%, var(--accent-color) 100%);
}


.no-adsense ins.adsbygoogle {
  display: none !important;
}


/* Animations */
@keyframes floatGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes pixelFade {
  0%   { opacity: 0; transform: translateY(-10px) scale(0.8); filter: contrast(200%); }
  70%  { opacity: 1; transform: translateY(0) scale(1); filter: contrast(100%); }
  100% { filter: none; }
}

/* Entry Animations */
@keyframes headerEnter {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes cornerBounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@keyframes glowBorder {
  0%,100% { box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
  50%     { box-shadow: 0 4px 20px rgba(0,0,0,0.6); }
}
@keyframes pixelBlink {
  0%,100% { background-color: var(--secondary-color); }
  50%     { background-color: #FFF; }
}

/* Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--body-bg);
  color: var(--text-primary);
}
a { color: var(--primary-color); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--secondary-color); }

/* ----------------------------------
   NAVIGATION (mobile-first)
   ---------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  background-size: 300% 300%;
  animation: headerEnter 0.25s ease-out both, floatGradient 15s ease infinite;
  transition: padding 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
  z-index: 200;
}
.navbar.shrink {
  padding: 0.5rem 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  background: rgba(212,160,23,0.8);
}

/* Logo */
.navbar .logo {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.5rem;
  color: var(--text-primary);
  animation: pixelFade 1s ease-out;
}

/* Nav-links bullet + hover pop */
.navbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.navbar-nav .nav-link::before {
  content: '■';
  font-size: 0.85rem;
  color: var(--secondary-color);
  opacity: 1;
  margin-right: 0.4rem;
  transition: transform 0.2s ease;
}
.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
  transform: scale(1.4);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--secondary-color);
  text-shadow: 0 0 6px rgba(211,84,0,0.6);
}

/* MOBILE: retro-theme header + hamburger */
@media (max-width: 991px) {
  .navbar {
    background:
      repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.04) 0,
        rgba(255,255,255,0.04) 2px,
        transparent 2px,
        transparent 8px
      ),
      var(--gradient-primary);
    border-top: 2px solid var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    border-radius: 0;
    padding: 0.6rem 1rem !important;
  }
  .navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    z-index: 201;
  }
  .navbar-toggler {
    border: none;
    padding: 0.25rem;
    position: relative;
    z-index: 202;
  }
  .navbar-toggler-icon {
    background-image: none;
    width: 24px; height: 18px;
    position: relative;
  }
  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after,
  .navbar-toggler-icon div {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: var(--secondary-color);
  }
  .navbar-toggler-icon::before { top: 0; }
  .navbar-toggler-icon div        { top: 7px; }
  .navbar-toggler-icon::after   { bottom: 0; }
  .navbar-collapse.show .nav-link::before {
    content: '■';
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-right: 0.4rem;
    opacity: 1;
    transform: none;
  }
}

/* SOLO DESKTOP: pixel-grid + deco-corner + blink */
@media (min-width: 992px) {
  .navbar {
    padding: 1rem 2rem !important;
    background:
      repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.04) 0,
        rgba(255,255,255,0.04) 2px,
        transparent 2px,
        transparent 8px
      ),
      linear-gradient(135deg,
        rgba(211,84,0,0.9) 0%,
        rgba(65,125,122,0.9) 100%
      ) !important;
    border: 2px solid var(--secondary-color);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    overflow: visible;
    animation: glowBorder 6s ease-in-out infinite, cornerBounce 0.4s ease-out 1 both;
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .navbar::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    z-index: 201;
    top: -2px;
    left: -2px;
  }
  .navbar::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    z-index: 201;
    animation: pixelBlink 1s steps(1,start) infinite;
    top: -2px;
    right: -2px;
  }
  .navbar.shrink {
    padding: 0.5rem 2rem !important;
    background: linear-gradient(
      135deg,
      var(--primary-color) 0%,
      var(--primary-color) 60%,
      var(--accent-color) 100%
    ) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(8px);
  }
}


/* ----------------------------------
   HERO SECTION (Landing / Splash)
   ---------------------------------- */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--gradient-secondary);
  color: var(--text-primary);
  overflow: hidden;
  padding: 4rem 2rem;
}
.hero-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 2rem;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(65,125,122,0.4);
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* CTA Buttons */
.hero-cta {
  font-family: 'Press Start 2P', cursive;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0.5rem;
  color: var(--text-primary);
}
.hero-cta.primary {
  background: var(--gradient-primary);
  box-shadow: 0 0 8px rgba(211,84,0,0.4);
}
.hero-cta.primary:hover {
  background: var(--secondary-color);
  box-shadow: 0 0 12px rgba(211,84,0,0.7);
}
.hero-cta.accent {
  background: var(--accent-color);
  box-shadow: 0 0 8px rgba(65,125,122,0.4);
}
.hero-cta.accent:hover {
  background: var(--success-color);
  box-shadow: 0 0 12px rgba(65,125,122,0.7);
}
.hero-cta:hover,
.hero-cta:focus {
  text-decoration: none;
}
.hero-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 30vh;
  background: linear-gradient(to bottom, rgba(65,125,122,0), var(--body-bg) 80%);
  z-index: 0;             /* prima era 1 */
  pointer-events: none;   /* lascia passare i tap/click */
}





/* ----------------------------------
   MOBILE-FIRST ADJUSTMENTS
   ---------------------------------- */
@media (max-width: 576px) {
  .navbar { padding: 0.8rem 1rem; }
  .hero-section { padding: 3rem 1rem; }
  .hero-title { font-size: 1.4rem; }
  .hero-subtitle { font-size: 0.85rem; margin-bottom: 1.5rem; }
  .hero-cta { font-size: 0.75rem; padding: 0.6rem 1rem; }
}

/* ----------------------------------
   FEATURES SECTION
   ---------------------------------- */
.features-section {
  padding: 3rem 1rem;
  text-align: center;
}
.features-title {
  font-family: 'Press Start 2P', cursive;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-shadow: 0 0 6px rgba(65,125,122,0.4);
  font-size: 1.3rem;
}
.feature-box {
  background: var(--card-bg);
  border: 1px solid rgba(65,125,122,0.2);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 8px rgba(65,125,122,0.1);
  color: var(--text-primary);
}
.feature-box h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(65,125,122,0.4);
}
.feature-box p {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ----------------------------------
   BRAND LOGO & FOOTER LINK
   ---------------------------------- */
.brand-logo {
  text-decoration: none;
}
.brand-logo:hover,
.brand-logo:focus {
  text-decoration: underline;
}

/* ----------------------------------
   test hero homepage
   ---------------------------------- */
/* ----------------------------------
   HERO CAROUSEL STYLES
   ---------------------------------- */
.hero-carousel {
  position: relative;
  overflow: hidden;
}

.hero-carousel .carousel-item {
  transition: transform 0.8s ease-in-out;
}

.hero-carousel .carousel-indicators {
  bottom: 2rem;
  z-index: 10;
}

.hero-carousel .carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid var(--secondary-color);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.hero-carousel .carousel-indicators .active {
  opacity: 1;
  transform: scale(1.2);
  background-color: var(--secondary-color);
  animation: pixelBlink 2s steps(1,start) infinite;
}

/* Controlli carousel con stile retro */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card-bg);
  border: 2px solid var(--secondary-color);
  border-radius: 8px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.hero-carousel .carousel-control-prev {
  left: 2rem;
}

.hero-carousel .carousel-control-next {
  right: 2rem;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
  opacity: 1;
  background: var(--secondary-color);
  box-shadow: 0 0 12px rgba(211,84,0,0.6);
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  width: 24px;
  height: 24px;
  background-size: contain;
  filter: brightness(0) invert(1);
}

/* Secondo hero con variante colore */
.hero-section.hero-pro {
  background: linear-gradient(135deg, 
    var(--accent-color) 20%, 
    var(--success-color) 80%,
    var(--primary-color) 100%
  );
}

.hero-section.hero-pro .hero-title {
  text-shadow: 0 0 8px rgba(106,168,79,0.6);
}

.hero-section.hero-pro::after {
  background: linear-gradient(to bottom, 
    rgba(106,168,79,0), 
    var(--body-bg) 80%
  );
}

/* Mobile responsive per i controlli */
@media (max-width: 768px) {
  .hero-carousel .carousel-control-prev,
  .hero-carousel .carousel-control-next {
    width: 45px;
    height: 45px;
  }
  
  .hero-carousel .carousel-control-prev {
    left: 1rem;
  }
  
  .hero-carousel .carousel-control-next {
    right: 1rem;
  }
  
  .hero-carousel .carousel-indicators {
    bottom: 1rem;
  }
}

/* Auto-advance del carousel */
.hero-carousel .carousel-item {
  transition-duration: 1s;
}

/* Effetto retro per transizione */
@keyframes slidePixel {
  0% { transform: translateX(-100%) scale(0.8); filter: contrast(150%); }
  50% { filter: contrast(100%); }
  100% { transform: translateX(0) scale(1); filter: none; }
}

.hero-carousel .carousel-item.active {
  animation: slidePixel 0.8s ease-out;
}
