/* Note: Since you are using Tailwind CSS via a CDN script,
  most of your styles are generated dynamically. This CSS file contains
  the customizations and components you defined.
*/

:root { 
  --accent: #8DFF65; 
}

* { 
  box-sizing: border-box; 
}

html {
  scroll-behavior: smooth;
}

html, body { 
  overflow-x: hidden;
}

body { 
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans'; 
  color: #0A0A0A; 
  background: #FFFFFF;
  scrollbar-width: none; /* Firefox */
}
body::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

/* Smooth initial content load */
body.is-loading {
  opacity: 0;
  transition: opacity 0.2s ease-in;
}

.font-tight { 
  font-family: 'Inter Tight', Inter, sans-serif; 
}

.bg-accent { 
  background-color: var(--accent); 
}

.ring-accent { 
  --tw-ring-color: var(--accent); 
}

/* Green highlight for H1 claims only */
.mark-accent { 
  background: linear-gradient(transparent 62%, var(--accent) 0);
}

/* Subtle polygon lines */
.hero-grid svg { 
  filter: drop-shadow(0 0 2px rgba(141,255,101,.25)); 
}

@keyframes dash { 
  to { stroke-dashoffset: -1000; } 
}

.polyline { 
  stroke-dasharray: 6 12; 
  animation: dash 22s linear infinite; 
}

/* Hero padding control for better adaptability, moved from Tailwind classes */
.hero-grid {
  padding-top: 6rem;
  padding-bottom: max(6rem, calc(env(safe-area-inset-bottom) + 3.5rem));
}

@media (min-width: 640px) { /* Tailwind's sm breakpoint */
  .hero-grid {
    padding-top: 9rem;
  }
}

/* Adjustment for wide but short screens (e.g., 1366x768 laptops) */
@media (max-height: 800px) and (min-width: 768px) {
  .hero-grid {
    padding-top: 5rem;
    padding-bottom: 4rem;
  }
  .hero-title {
    font-size: clamp(2.25rem, 7vw, 4.5rem);
  }
}

/* Fluid title for small mobiles */
.hero-title { 
  font-family: 'Inter Tight', Inter, sans-serif; 
  font-weight: 900; 
  letter-spacing: -0.02em; 
  line-height: 1.02; 
  font-size: clamp(2.25rem, 8vw, 5.5rem);
  text-wrap: balance;
}

/* New rule to center H1 lines */
.hero-line {
  display: table;
  margin: 0 auto;
}


/* --- HERO WORD ROTATION STYLES (Revised) --- */
.rotating-words-slot {
  display: inline-block;
  position: relative;
  vertical-align: -0.15em; /* Fine-tune vertical alignment */
  transition: width 0.4s ease-in-out; /* Animate width change */
}

.rotating-words-slot .rotating-words-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
  height: 1.02em; /* Match line-height of title to prevent jumps */
  position: relative; /* Anchor for absolute list items */
}

.rotating-words-slot .rotating-words-list li {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
  white-space: nowrap;
}

.rotating-words-slot .rotating-words-list li.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility: Respects reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .rotating-words-slot .rotating-words-list li {
    transition: opacity 0.2s ease; /* Simple fade without movement */
    transform: none;
  }
}
/* --- END OF ROTATION STYLES --- */


/* Active Nav */
.nav-active { 
  text-decoration: underline; 
  text-decoration-thickness: 2px; 
  text-underline-offset: 6px; 
  text-decoration-color: var(--accent); 
  font-weight: 600; 
}

/* Minimal dashboards */
.meter { 
  height: 10px; 
  background: #e5e7eb; 
  position: relative; 
  overflow: hidden; 
}
.meter > i { 
  position: absolute; 
  inset: 0; 
  width: 0%; 
  background: var(--accent); 
  display: block; 
  transition: width 1200ms ease; 
}

/* --- LOGO SLIDER STYLES --- */
.logo-slider {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
}
.logo-slider-track {
  display: flex;
  align-items: center;
  width: fit-content;
  animation: scroll 40s linear infinite;
}
.logo-slider-item {
  flex-shrink: 0;
  padding: 0 1.5rem;
}
.logo-slider-item img {
  width: auto;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease-in-out;
}
.logo-slider-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% / 2)); }
}

/* --- GENERAL MOBILE ADJUSTMENTS --- */
@media (max-width: 767px) {
  .logo-slider-item {
    pointer-events: none;
  }
  .sticky-header-container {
    position: static; /* Changed from sticky for better layout control */
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    width: 100%;
    margin-left: 0;
    padding: 0;
  }
}

/* --- CONTENT CAROUSEL/GRID STYLES --- */

/* Mobile: Carousel styles */
@media (max-width: 767px) {
  .content-carousel, .results-carousel {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  .content-carousel::-webkit-scrollbar, .results-carousel::-webkit-scrollbar {
    display: block;
    height: 4px;
  }
  .results-carousel::-webkit-scrollbar {
      display: none; /* Hide for results as we have a different indicator */
  }
   .content-carousel::-webkit-scrollbar-track, .results-carousel::-webkit-scrollbar-track {
      background: transparent;
  }
   .content-carousel::-webkit-scrollbar-thumb, .results-carousel::-webkit-scrollbar-thumb {
      background: rgba(0,0,0,0.1);
      border-radius: 2px;
  }
  .content-carousel-track, .results-carousel-track {
    display: flex;
    padding-bottom: 1rem; /* Space for scrollbar */
  }
  .content-carousel-item {
    flex: 0 0 85%;
    padding-right: 1rem;
    scroll-snap-align: start;
  }
}

/* Desktop: Grid styles */
@media (min-width: 768px) {
    .logo-slider-item {
        padding: 0 2.5rem;
    }
    .content-carousel {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
     .results-carousel {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    .content-carousel-track, .results-carousel-track {
        display: contents;
    }
    .content-carousel-item:nth-child(n+7) {
        display: none;
    }
}

/* --- RESULTS CAROUSEL STYLES (MOBILE) --- */
@media (max-width: 767px) {
  .results-carousel-track {
    gap: 1rem;
  }
  .results-carousel-item {
    flex: 0 0 80%;
    scroll-snap-align: center; /* Center the active item */
    padding: 0;
  }
  .results-carousel {
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  }
}

/* --- SOLUTION CARD STYLES --- */
.solution-card {
  border: 1px solid rgba(0,0,0,0.1);
  padding: 1.25rem; /* p-5 */
  height: 100%;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.solution-card-icon {
  margin-bottom: 1rem; /* mb-4 */
  color: rgba(0,0,0,0.8);
  transition: color 0.2s ease-in-out;
}
@media (min-width: 768px) {
  .solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--accent);
  }
  .solution-card:hover .solution-card-icon {
    color: var(--accent);
  }
}

/* --- LANGUAGE TRANSITION STYLES --- */
[data-translate-key] {
    transition: opacity 0.2s ease-in-out, filter 0.2s ease-in-out;
}

body.translating [data-translate-key] {
    opacity: 0;
    filter: blur(4px);
}

/* --- FORM SUBMIT BUTTON ANIMATION --- */
#emailSubmitBtn.is-loading #emailSubmitIcon {
  animation: pulse-icon 1.5s infinite ease-in-out;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

#emailSubmitBtn.is-success #emailSubmitIcon {
  opacity: 0;
  transform: translateY(-150%) rotate(45deg);
}

#emailSubmitBtn.is-success #emailSuccessIcon {
  opacity: 1;
}

/* --- FORM STYLES --- */
.form-icon-wrapper i {
  pointer-events: none;
}

#other-reason-wrapper {
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
  transform: translateY(-10px);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

#other-reason-wrapper:not(.hidden) {
  transform: translateY(0);
  opacity: 1;
  max-height: 100px;
}

/* --- METHODOLOGY WORKFLOW STYLES --- */
.metodologia-section {
  background-color: #121212; /* Dark background */
  min-height: 100svh; /* Full viewport height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
  overflow: hidden;
}

.metodologia-inner-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  flex-grow: 1;
  width: 100%;
}

.workflow-container {
  display: flex;
  flex-direction: column; /* Mobile first: vertical layout */
  align-items: center;
  gap: 0.25rem; /* Reduced gap */
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 320px;
}

.workflow-node {
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  position: relative;
  transition: all 0.5s ease-in-out;
}

.workflow-node::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  box-shadow: 0 0 0 0 rgba(141, 255, 101, 0);
  transition: box-shadow 0.5s ease-in-out;
}

.workflow-icon {
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.5s ease-in-out;
  font-size: 1.5rem; /* Reduced icon size */
  line-height: 1;
}

.workflow-content {
    opacity: 0.7;
    transform: translateY(10px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}


/* Active State */
.workflow-step.is-active .workflow-node {
  border-color: var(--accent);
}

.workflow-step.is-active .workflow-node::before {
  box-shadow: 0 0 25px 5px rgba(141, 255, 101, 0.3);
}

.workflow-step.is-active .workflow-icon {
  color: var(--accent);
}

.workflow-step.is-active .workflow-content {
    opacity: 1;
    transform: translateY(0);
}


/* Connector lines */
.workflow-connector {
  width: 2px;
  height: 30px; /* Reduced connector height */
  background-color: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.workflow-connector::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.5s ease-in-out; /* Slower transition */
}

.workflow-connector.is-active::after {
  transform: scaleY(1);
}

/* Desktop layout */
@media (min-width: 768px) {
  .metodologia-section {
      padding-top: 6rem;
      padding-bottom: 6rem;
  }
  .metodologia-inner-container {
      display: block;
      flex-grow: 0;
  }
  .metodologia-inner-container .sticky-header-container {
      margin-bottom: 3rem;
  }
  .metodologia-inner-container > div:last-child {
      margin-top: 4rem;
  }

  .workflow-container {
    flex-direction: row; /* Horizontal layout */
    justify-content: center;
    align-items: flex-start;
    gap: 0;
  }
  
  .workflow-step {
    flex: 1;
  }

  .workflow-node {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
  }
  
  .workflow-connector {
    width: 120px; /* Horizontal line for desktop */
    height: 2px;
    align-self: center;
    margin-top: -5rem; /* Adjust vertical alignment */
  }
  
  .workflow-connector::after {
    transform: scaleX(0);
    transform-origin: left;
  }

  .workflow-connector.is-active::after {
    transform: scaleX(1);
  }
}

@media (min-width: 1024px) {
    .workflow-connector {
        width: 150px;
    }
}

