/* ==========================================================
   Decacross Custom Styles - Enhanced Animations
   ========================================================== */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Luxury accent palette */
  --orange-500: #f97316; /* brand accent */
  --orange-600: #ea580c; /* hover accent */
  --amber-500: #d3913d;  /* subtle gold for highlights */
  /* Luxury dark surfaces */
  --bg-dark: #0e0e0e;    /* base background (near-black) */
  --bg-card: #2f2f2f;    /* cards/surfaces */
}

/* ============================================
   PREVENT HORIZONTAL OVERFLOW ON MOBILE
   ============================================ */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

* {
  max-width: 100%;
}

body, div, section, main, article, header, footer, nav {
  box-sizing: border-box;
}

/* ============================================
   BRAND LOGO SIZING
   ============================================ */
.brand-logo {
  height: 2rem; /* ~32px mobile */
  width: auto;
  display: inline-block;
}
@media (min-width: 640px) {
  .brand-logo { height: 2.75rem; } /* ~44px sm */
}
@media (min-width: 768px) {
  .brand-logo { height: 4rem; } /* ~64px desktop */
}

.brand-logo--footer { height: 2.75rem; }
@media (min-width: 768px) {
  .brand-logo--footer { height: 3.25rem; }
}

/* ============================================
   NAVBAR MOBILE OPTIMIZATIONS
   ============================================ */
#mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.3));
  transition: all 0.3s ease;
}

#mobile-menu-btn:active {
  filter: drop-shadow(0 0 16px rgba(249, 115, 22, 0.6));
  transform: scale(0.95);
}

#mobile-menu-btn svg {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

/* Ensure mobile menu links don't overflow */
#mobile-menu a {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

#mobile-menu {
  width: 100vw;
  left: 0 !important;
  right: 0 !important;
  overflow-x: hidden !important;
}

#navbar {
  width: 100vw;
  left: 0 !important;
  right: 0 !important;
}

/* Prevent background text from causing overflow */
#mobile-menu h2 {
  max-width: 100vw;
  overflow: hidden;
}

/* ============================================
   SCROLL ANIMATIONS (Enhanced)
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.animate-on-scroll[style*="animation-delay: 100ms"].visible { transition-delay: 0.1s; }
.animate-on-scroll[style*="animation-delay: 200ms"].visible { transition-delay: 0.2s; }
.animate-on-scroll[style*="animation-delay: 300ms"].visible { transition-delay: 0.3s; }
.animate-on-scroll[style*="animation-delay: 350ms"].visible { transition-delay: 0.35s; }
.animate-on-scroll[style*="animation-delay: 400ms"].visible { transition-delay: 0.4s; }
.animate-on-scroll[style*="animation-delay: 450ms"].visible { transition-delay: 0.45s; }

/* Slide from left */
.animate-slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.animate-slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up */
.animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   FLOATING ANIMATIONS
   ============================================ */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.animate-float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

/* ============================================
   BREATHING/PULSE ANIMATIONS
   ============================================ */
@keyframes breathe {
  0%, 100% { opacity: 0.05; transform: scale(1); }
  50% { opacity: 0.1; transform: scale(1.05); }
}

.animate-breathe {
  animation: breathe 8s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.3); }
  50% { box-shadow: 0 0 40px rgba(249, 115, 22, 0.6); }
}

.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes hudPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.hud-element {
  animation: hudPulse 3s ease-in-out infinite;
}

/* ============================================
   TEXT EFFECTS
   ============================================ */
.hero-mist {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Sombra naranja tipo halo/rings como en la captura */
.hero-mist::before {
  content: '';
  position: absolute;
  inset: -10%;
  /* Halo principal + caída amplia */
  background:
    radial-gradient(900px 700px at 60% 42%, rgba(249,115,22,0.32) 0%, rgba(249,115,22,0.18) 35%, rgba(249,115,22,0.06) 55%, transparent 70%),
    radial-gradient(1600px 1200px at 60% 42%, rgba(249,115,22,0.12) 0%, transparent 70%);
  filter: blur(30px);
  opacity: 0.7;
  mix-blend-mode: screen;
}

/* Anillos muy sutiles para dar sensación de ondas concéntricas */
.hero-mist::after {
  content: '';
  position: absolute;
  inset: -5%;
  background:
    repeating-radial-gradient(circle at 60% 42%, rgba(249,115,22,0.10) 0 1px, transparent 1px 120px);
  opacity: 0.15;
  filter: blur(1.5px);
  mix-blend-mode: screen;
}
/* Removed complex pulse to match static capture look */
.text-outline {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
  color: transparent;
}

.text-outline-orange {
  -webkit-text-stroke: 2px rgba(249, 115, 22, 0.6);
  color: transparent;
}

.hero-gradient-text {
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero title subtle luxury shine */
.hero-title-shine { position: relative; display: inline-block; }
.hero-title-shine::after {
  content: '';
  position: absolute;
  top: 0; left: -150%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-20deg);
  animation: titleShine 6s ease-in-out infinite;
}
@keyframes titleShine {
  0% { left: -150%; }
  60% { left: 120%; }
  100% { left: 120%; }
}

/* Sombra/glow naranja tras el título grande */
#hero .hero-title-shine {
  text-shadow:
    0 0 22px rgba(249, 115, 22, 0.20),
    0 0 60px rgba(249, 115, 22, 0.14);
  filter: drop-shadow(0 0 14px rgba(249, 115, 22, 0.15));
}

/* Intensificar efecto en secciones de fuerza y salud */
#hero .text-outline-orange {
  text-shadow:
    0 0 16px rgba(249, 115, 22, 0.25),
    0 0 40px rgba(249, 115, 22, 0.12);
}

#hero h1 span[class*="text-white"] {
  text-shadow:
    0 0 12px rgba(249, 115, 22, 0.18);
}

/* Efecto de lujo: brillo sutil en botones CTA para reflejar profesionalismo */
#hero .btn-primary {
  box-shadow: 
    0 0 20px rgba(249, 115, 22, 0.3),
    0 0 40px rgba(249, 115, 22, 0.15);
  transition: box-shadow 0.4s ease;
}

#hero .btn-primary:hover {
  box-shadow: 
    0 0 30px rgba(249, 115, 22, 0.5),
    0 0 60px rgba(249, 115, 22, 0.25);
}

/* Brillo sutil en el texto descriptivo */
#hero .text-neutral-400 {
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.08);
}

/* Glitch effect */
@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

.glitch-hover:hover {
  animation: glitch 0.3s ease-in-out;
}

/* ============================================
   P5.JS BACKGROUND
   ============================================ */
#p5-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#p5-bg canvas {
  display: block;
}

/* ============================================
   CARD EFFECTS
   ============================================ */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px -15px rgba(249, 115, 22, 0.3);
}

.booking-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.booking-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.6s ease;
}

.booking-card:hover::before {
  left: 100%;
}

.booking-card:hover {
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-4px);
}

.feature-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(249, 115, 22, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

/* Service card */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--orange-500);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.service-card:hover::after {
  transform: scaleY(1);
}

.service-icon {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-icon {
  transform: scale(1.15) rotate(-5deg);
}

/* ============================================
   ROADMAP
   ============================================ */
.roadmap-line {
  background: linear-gradient(to right, transparent, rgba(249, 115, 22, 0.3), transparent);
}

.roadmap-step {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.roadmap-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.roadmap-node {
  position: relative;
}

.roadmap-node::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--orange-500);
  opacity: 0;
  animation: node-pulse 2s ease-in-out infinite;
}

@keyframes node-pulse {
  0%, 100% { transform: scale(1); opacity: 0; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

/* ============================================
   ROADMAP CARDS (Premium)
   ============================================ */
.roadmap-card {
  position: relative;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  padding: 1.25rem 1.25rem 1.25rem 1.25rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.roadmap-card:hover {
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: 0 20px 60px -20px rgba(249, 115, 22, 0.25);
  transform: translateY(-2px);
}
.roadmap-badge {
  position: absolute;
  top: -12px; left: -12px;
  background: linear-gradient(135deg, rgba(249,115,22,0.9), rgba(234,88,12,0.9));
  color: #0a0a0a;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  padding: 6px 10px;
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(234,88,12,0.35);
}
.roadmap-kicker { color: var(--orange-500); letter-spacing: 0.2em; font-weight: 700; text-transform: uppercase; font-size: 10px; }

/* Progress bar animation support */
#roadmap-progress { will-change: height; }


/* ============================================
   SCHEDULE TABLE
   ============================================ */
.schedule-table th,
.schedule-table td {
  padding: 0.75rem 1rem;
  text-align: center;
}

.schedule-table th {
  background: rgba(249, 115, 22, 0.1);
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.schedule-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.schedule-table tr:hover td {
  background: rgba(249, 115, 22, 0.05);
}

/* ============================================
   NAVBAR & MOBILE MENU
   ============================================ */
#navbar {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#navbar.scrolled {
  background: rgba(24, 24, 24, 0.9);
  backdrop-filter: blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

#mobile-menu {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
  transform: translateX(0) !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-outline {
  position: relative;
  overflow: hidden;
}

.btn-outline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--orange-500);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.btn-outline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ============================================
   MODALS
   ============================================ */
.modal-enter {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
}

.modal-enter-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal scrollbar */
[id^="modal-"] .overflow-y-auto::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, 0.3);
}

/* ============================================
   COOKIE TOGGLE
   ============================================ */
.peer:checked ~ div {
  background-color: var(--orange-600);
}

/* ============================================
   MAP CONTAINER
   ============================================ */
.map-container {
  position: relative;
  /* padding-bottom: 56.25%; Removed to allow Tailwind h-* classes to control height */
  /* height: 0; Removed to allow Tailwind h-* classes to control height */
  overflow: hidden;
  border-radius: 4px;
}

.map-container iframe {
  /* position: absolute; Not needed if we use fixed height container */
  /* top: 0; */
  /* left: 0; */
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(80%) contrast(1.1);
  transition: filter 0.5s ease;
  display: block; /* Ensure no inline spacing */
}

.map-container:hover iframe {
  filter: grayscale(0%) contrast(1);
}

/* ============================================
   EU FUNDING SECTION
   ============================================ */
.eu-funding {
  background: linear-gradient(to right, rgba(0, 51, 153, 0.05), rgba(255, 204, 0, 0.05));
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, 0.5);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
  background: var(--orange-500);
  color: white;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}

/* ============================================
   NOISE OVERLAY
   ============================================ */
.noise-overlay {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  #navbar,
  #cookie-banner,
  [id^="modal-"],
  #p5-bg,
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-slide-left,
  .animate-slide-right,
  .animate-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .animate-float,
  .animate-float-slow,
  .animate-breathe,
  .hud-element {
    animation: none;
  }
  
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ============================================
   GSAP / AOS INTEGRATION CLASSES
   ============================================ */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
}

[data-aos].aos-animate {
  opacity: 1;
}

[data-aos="fade-up"] {
  transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
}

[data-aos="fade-left"] {
  transform: translateX(50px);
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
}

[data-aos="fade-right"] {
  transform: translateX(-50px);
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
}

[data-aos="zoom-in"] {
  transform: scale(0.9);
}

[data-aos="zoom-in"].aos-animate {
  transform: scale(1);
}

/* ============================================
   DISABLE TAILWIND ANIMATIONS
   ============================================ */
.animate-bounce {
  animation: none !important;
}

.animate-ping {
  animation: none !important;
}

.animate-pulse {
  animation: none !important;
}

