@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;600&display=swap');

:root {
  --bg-color: #0B0B0C;
  --surface-color: #1a1a1a;
  --accent-color: #00FF9C;
  --neutral-color: #F5F5F7;
  --muted-color: #9CA3AF;
  --alert-color: #D24A3A;

  --font-heading: 'Bebas Neue', display;
  --font-body: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--neutral-color);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.bebas {
  font-family: var(--font-heading);
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Base Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  border: none;
  font-size: 1rem;
}

.accent-text {
  color: var(--accent-color);
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(106, 212, 125, 0.4);
}

.btn-ghost {
  background-color: transparent;
  color: var(--neutral-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--neutral-color);
}

/* Global Canvas */
#global-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Wrapper */
.content-wrapper {
  position: relative;
  z-index: 1;
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- 1. NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.5rem 5%;
  transition: all 0.4s ease;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 1.2rem 5%;
  /* Padding superior e inferior aumentado para el menú */
  background-color: rgba(11, 11, 12, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(106, 212, 125, 0.08);
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
}

.arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .arrow {
  transform: rotate(180deg);
  color: var(--accent-color);
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(106, 212, 125, 0.1);
  border-radius: 12px;
  min-width: 220px;
  padding: 0.8rem 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.nav-dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(5px);
}

.dropdown-content a {
  display: block !important;
  padding: 0.8rem 1.5rem !important;
  font-size: 0.85rem !important;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  text-align: left !important;
}

.dropdown-content a:hover {
  background: rgba(106, 212, 125, 0.08);
  color: var(--accent-color) !important;
  padding-left: 1.8rem !important;
}

.navbar-logo {
  font-family: var(--font-heading);
  color: var(--neutral-color);
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  transition: all 0.4s ease;
  max-width: 500px;
  max-height: 100px;
  overflow: hidden;
}

.navbar.scrolled .navbar-logo {
  max-width: 0;
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.navbar-logo span.light {
  font-weight: 400;
  letter-spacing: 0.05em;
  -webkit-text-stroke: 1.2px var(--bg-color);
}

.navbar-logo span.bold {
  font-weight: 400;
  font-size: inherit;
  letter-spacing: 0.02em;
}

.navbar-links {
  display: flex;
  gap: 2rem;
  transition: all 0.3s ease;
}

.navbar-links a {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--neutral-color);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.2rem;
  /* Separación base entre letras */
  transition: color 0.3s ease, letter-spacing 0.3s ease, font-size 0.4s ease;
  display: flex;
  align-items: center;
}

/* --- LANG TOGGLE --- */
.lang-toggle {
  position: absolute;
  top: 1.8rem;
  right: 5%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
  z-index: 110;
  transition: all 0.4s ease;
}

.navbar.scrolled .lang-toggle {
  top: 1.5rem;
}

.lang-toggle span {
  cursor: pointer;
  transition: color 0.3s ease;
}

.lang-toggle span.active {
  color: var(--accent-color);
}

.lang-toggle span:hover {
  color: #FFFFF0;
}

.navbar.scrolled .navbar-links a {
  font-size: 0.8rem;
}

.navbar-links a:hover {
  color: var(--accent-color);
  letter-spacing: 0.15em;
  /* Mayor separación al hacer hover */
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--neutral-color);
  font-size: 1.8rem;
  cursor: pointer;
  position: absolute;
  right: 5%;
  top: 1.2rem;
  z-index: 101;
}

/* --- 2. HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 0 5% 0 15%;
  /* Incrementé agresivamente el padding izquierdo (15%) para darle efecto de sangría profunda */
  overflow: hidden;
}

.hero-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  perspective: 1000px;
  z-index: -1;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  transform-origin: center;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.hero-orb-accent {
  position: absolute;
  top: 10%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(106, 212, 125, 0.08) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orb-white {
  position: absolute;
  bottom: 0%;
  left: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  max-width: 780px;
  position: relative;
  z-index: 2;
  margin-top: 4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(106, 212, 125, 0.1);
  border: 1px solid rgba(106, 212, 125, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(106, 212, 125, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(106, 212, 125, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(106, 212, 125, 0);
  }
}

.hero h1 {
  font-size: clamp(3rem, 6.5vw, 5.2rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #FFFFF0;
}

.hero h1 em {
  font-style: normal;
  color: #FFFFF0;
}

.hero-subtitle {
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--muted-color);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

/* Portfolio Hero Specifics */
.projects-hero {
  min-height: 40vh !important;
  justify-content: flex-start !important;
  padding-top: 16rem !important;
  text-align: left !important;
}

.projects-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem) !important;
  margin-bottom: 0.5rem !important;
}

.projects-hero .hero-content {
  margin-top: 0 !important;
  max-width: 100% !important;
}

.projects-hero .section-label {
  margin-left: 0 !important;
  justify-content: flex-start !important;
  color: var(--accent-color) !important;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero entrance animations */
.hero .badge {
  animation: fadeUp 0.8s ease backwards;
}

.hero h1 {
  animation: fadeUp 0.8s ease 0.12s backwards;
}

.hero-subtitle {
  animation: fadeUp 0.8s ease 0.24s backwards;
}

.hero-buttons {
  animation: fadeUp 0.8s ease 0.36s backwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(var(--accent-color), transparent);
  animation: fadeIn 1s ease 1s backwards;
  z-index: 2;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* --- SECTION SHARED --- */
.section {
  padding: 10rem 5%;
  position: relative;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted-color);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--accent-color);
}

.services-master-card {
  background: #FFFFF0;
  backdrop-filter: none;
  border: none;
  border-radius: 3.5rem;
  padding: 8rem 6rem;
  max-width: 1600px;
  margin: 0 auto;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
  color: #1a1a1a;
  /* Texto oscuro para fondo claro */
}

.services-master-card .section-header h2,
.services-master-card .section-header p,
.services-master-card .product-title,
.services-master-card .service-desc,
.services-master-card .product-features li {
  color: #1a1a1a !important;
}

.services-master-card .product-card {
  background: rgba(26, 26, 26, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.services-master-card .section-label {
  color: #1a1a1a;
  opacity: 0.6;
}

.services-master-card .btn-ghost {
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.2);
}

.services-master-card .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: #1a1a1a;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Dash visible by default for centered headers too */
.section-header .section-label::before {
  display: block;
}

.section-header h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--muted-color);
  max-width: 560px;
  font-weight: 300;
  line-height: 1.6;
  font-size: 1.05rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  perspective: 1200px;
}

.card {
  background: var(--surface-color);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
}

/* Removed card hover line animation */


/* --- 3. MÉTRICAS --- */
.metrics {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4rem 5%;
  background-color: rgba(26, 26, 26, 0.3);
  /* Surface al 8% sobre negro */
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1400px;
  margin: 0 auto;
}

.metric-item {
  text-align: center;
  position: relative;
}

.metric-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.metric-number {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  display: inline-block;
  line-height: 1;
}

.metric-number.white {
  color: var(--neutral-color);
}

.metric-label {
  font-size: 0.82rem;
  color: var(--muted-color);
  max-width: 160px;
  margin: 0 auto;
  line-height: 1.4;
}

.why-us {
  padding: 10rem 5%;
  margin-left: 0%;
}

.why-us-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: center;
}

.why-us-text {
  display: flex;
  flex-direction: column;
}

.why-us .section-label {
  justify-content: flex-start;
  color: var(--accent-color);
  font-weight: 800;
}

.why-us h2 {
  text-align: left;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: #FFFFF0;
}

.why-us .subtitle {
  text-align: left;
  color: var(--muted-color);
  max-width: 560px;
  margin: 0 0 2rem 0;
  font-weight: 300;
  line-height: 1.6;
  font-size: 1.05rem;
}

.why-us-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.why-us .card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
}

.why-us .card:hover {
  border-color: rgba(106, 212, 125, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.icon-box {
  width: 48px;
  height: 48px;
  background: rgba(106, 212, 125, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-color);
}

.icon-box svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.card-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--neutral-color);
}

.card-desc {
  color: var(--muted-color);
  font-weight: 300;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* --- 5. DOLOR --- */
.pain-section {
  padding: 10rem 5%;
}

.pain-section-container {
  max-width: 1400px;
  margin: 0 auto;
}

.pain-section .section-label {
  display: flex;
  justify-content: center;
  color: var(--alert-color);
  font-weight: 800;
}

.pain-section .section-label::before {
  background: var(--alert-color);
}

.pain-section h2 {
  text-align: center;
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.pain-section .subtitle {
  text-align: center;
  color: var(--muted-color);
  font-weight: 300;
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

.pain-section h2 .alert-text {
  color: var(--alert-color);
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  margin-bottom: 6rem;
  margin-top: 10rem;
}

.pain-card {
  position: relative;
  padding: 4rem 3.5rem;
  border: 1px solid rgba(210, 74, 58, 0.3);
  background: rgba(20, 20, 20, 0.5);
  border-radius: 0;
  margin-top: 2rem;
  transition: all 0.3s ease;
  overflow: visible;
  /* Asegura que el badge sea visible */
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pain-card:hover {
  border-color: rgba(210, 74, 58, 0.8);
  box-shadow: 0 20px 60px rgba(210, 74, 58, 0.2);
  transform: translateY(-15px);
}

.pain-number {
  position: absolute;
  top: -18px;
  right: 2.5rem;
  background: var(--alert-color);
  color: #F5F5F7;
  padding: 0.5rem 1.2rem;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  z-index: 10;
}

.pain-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #FFFFF0;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.pain-desc {
  color: var(--muted-color);
  font-size: 1.05rem;
  line-height: 1.6;
}

.pain-label {
  color: var(--alert-color);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.9rem;
  margin-top: 1.5rem;
  text-align: left;
  letter-spacing: 0.05em;
}

.solution-card {
  background: rgba(106, 212, 125, 0.08);
  border: 1px solid rgba(106, 212, 125, 0.3);
  border-radius: 14px;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  transition: all 0.4s ease;
  max-width: 1400px;
  margin: 0 auto;
}

.solution-card:hover {
  border-color: rgba(106, 212, 125, 0.6);
  box-shadow: 0 0 20px rgba(106, 212, 125, 0.15);
  transform: translateY(-2px);
}

.solution-icon {
  color: var(--accent-color);
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.solution-icon svg {
  width: 100%;
  height: 100%;
}

.solution-content {
  flex-grow: 1;
}

.solution-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  color: var(--neutral-color);
}

.solution-desc {
  font-size: 1.05rem;
  color: var(--muted-color);
  line-height: 1.5;
}

.pain-cta {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
}

/* --- 6. PRODUCTOS --- */
.section-header .section-label {
  color: var(--accent-color);
  font-weight: 800;
  letter-spacing: 0.15em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.section-header .section-label::before {
  content: '';
  width: 25px;
  height: 2px;
  background: var(--accent-color);
  display: block;
}

.product-card {
  padding: 2.5rem;
  border-radius: 16px;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, border-color 0.4s ease, box-shadow 0.4s ease;
}

.product-card:hover {
  border-color: rgba(106, 212, 125, 0.4);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
}

.tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.service-icon {
  margin-bottom: 2rem;
  width: 60px;
  height: 60px;
  color: var(--accent-color);
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.tag-accent {
  background: rgba(106, 212, 125, 0.1);
  color: var(--accent-color);
}

.tag-white {
  background: rgba(255, 255, 255, 0.05);
  color: var(--neutral-color);
}

.tag-accent-high {
  background: rgba(106, 212, 125, 0.5);
  color: #0B0B0C;
}

.product-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 1.05rem;
  color: var(--muted-color);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.product-features li {
  font-size: 0.9rem;
  color: var(--muted-color);
  font-weight: 300;
  display: flex;
  gap: 0.6rem;
}

.feature-bullet {
  color: var(--accent-color);
}

.services-cta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 5rem;
  margin-bottom: 2rem;
}

.ai-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.ai-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 255, 156, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 1;
  pointer-events: none;
}

.ai-card:hover::before {
  opacity: 1;
}

.ai-card .project-image {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: var(--surface-color);
}

.ai-card .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.ai-card:hover .project-image img {
  transform: scale(1.1);
}

.ai-card .project-tag {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-color);
  border: 1px solid rgba(106, 212, 125, 0.3);
  z-index: 2;
}

.ai-card .card-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.ai-card h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #FFFFF0;
}

.ai-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted-color);
  margin-bottom: 2rem;
  font-weight: 300;
}

/* --- PROJECT MODAL --- */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-container {
  position: relative;
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  background: #0B0B0C;
  border: 1px solid rgba(0, 255, 156, 0.15);
  border-radius: 20px;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 255, 156, 0.05);
  z-index: 2;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.modal-container::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.project-modal.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #FFFFF0;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--accent-color);
  color: #0B0B0C;
  transform: rotate(90deg);
}

.modal-body {
  padding: 0;
}

/* Modal Content Styles */
.modal-header-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-info {
  padding: 3rem;
}

.modal-info h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: #FFFFF0;
}

.modal-category {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: rgba(0, 255, 156, 0.1);
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2rem;
}

.modal-description {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--muted-color);
  margin-bottom: 3rem;
  font-weight: 300;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.modal-feature-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-feature-card h4 {
  color: #FFFFF0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.modal-feature-card p {
  font-size: 0.95rem;
  color: var(--muted-color);
  line-height: 1.6;
}

.project-card-trigger {
  cursor: pointer;
}

.project-card-trigger:hover {
  border-color: rgba(0, 255, 156, 0.3);
}

/* --- BANNER CTA INTERMEDIO --- */
.banner-cta {
  background: linear-gradient(90deg, rgba(106, 212, 125, 0.05), transparent);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 3.5rem 5%;
  position: relative;
}

.banner-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.banner-content h2 {
  font-size: 2.8rem;
  margin: 0;
}


/* --- 8. CONTACTO --- */
.contact-section {
  padding: 10rem 5%;
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

.contact-info .section-label {
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  font-weight: 800;
}

.contact-info h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.contact-info p {
  color: var(--muted-color);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-weight: 300;
  font-size: 1.05rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.method-icon {
  width: 36px;
  height: 36px;
  background: rgba(106, 212, 125, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
}

.method-icon svg {
  width: 18px;
  height: 18px;
}

.method-text {
  font-size: 0.95rem;
  color: var(--neutral-color);
  font-weight: 300;
}

.contact-form {
  background: var(--surface-color);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-control {
  background: var(--bg-color);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--neutral-color);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
}

select.form-control {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5F5F7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.btn-submit {
  width: 100%;
  margin-top: 1rem;
}

/* --- 9. FOOTER --- */
.footer {
  background: var(--surface-color);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3.5rem 5% 2rem;
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
  display: flex;
}

.footer-logo span.light {
  font-weight: 400;
  letter-spacing: 0.05em;
  -webkit-text-stroke: 1.2px var(--surface-color);
}

.footer-logo span.bold {
  font-weight: 400;
  font-size: inherit;
  letter-spacing: 0.02em;
}

.footer-desc {
  color: var(--muted-color);
  font-size: 1.05rem;
  max-width: 280px;
  line-height: 1.6;
  font-weight: 300;
}

.footer-col-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--neutral-color);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--muted-color);
  font-size: 0.85rem;
  transition: color 0.3s ease;
  font-weight: 300;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-divider {
  max-width: 1400px;
  margin: 2.5rem auto 1.5rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  font-size: 0.78rem;
  color: var(--muted-color);
  font-weight: 300;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--neutral-color);
}

.social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.social-icon:hover {
  background: rgba(106, 212, 125, 0.1);
  color: var(--accent-color);
  box-shadow: 0 0 10px rgba(106, 212, 125, 0.2);
}

/* RESPONSIVE */
@media (max-width: 1330px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .pain-grid {
    grid-template-columns: 1fr;
  }

  .solution-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 0;
  }

  .metric-item:nth-child(2)::after {
    display: none;
  }

  .navbar {
    min-height: 80px;
    /* Asegura altura para los controles */
    justify-content: center;
    padding: 1.5rem 5% !important;
  }

  .navbar.scrolled {
    min-height: 70px;
    padding: 1rem 5% !important;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(106, 212, 125, 0.08);
  }

  .navbar-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
    top: 50% !important;
    transform: translateY(-50%);
  }

  .lang-toggle {
    right: 5%;
    top: 50% !important;
    transform: translateY(-50%);
    margin-right: 50px;
    /* Separación del hamburguesa */
    background: transparent;
    padding: 0;
    backdrop-filter: none;
  }
}

@media (max-width: 600px) {
  .banner-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero {
    text-align: center;
    align-items: center;
  }

  .section {
    padding: 4rem 5%;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 3rem;
  }
}

/* --- SUCCESS MODAL --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--surface-color);
  border: 1px solid rgba(106, 212, 125, 0.2);
  padding: 3.5rem 2.5rem;
  border-radius: 24px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  transform: scale(0.8) translateY(20px);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(106, 212, 125, 0.1);
  color: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.modal-icon svg {
  width: 32px;
  height: 32px;
}

.modal-content h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--neutral-color);
}

.modal-content p {
  color: var(--muted-color);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 300;
  font-size: 1.05rem;
}

.modal-content .btn {
  width: 100%;
  padding: 1.2rem;
}

/* --- PORTFOLIO & DETAILS --- */
.projects-hero,
.project-detail-hero {
  padding: 16rem 5% 6rem;
  text-align: center;
}

.projects-hero .container,
.project-detail-hero .container {
  max-width: 1000px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
}

.back-link:hover {
  transform: translateX(-5px);
}

.project-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(106, 212, 125, 0.1), rgba(255, 255, 255, 0.02));
  border-radius: 16px;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image-placeholder.large {
  aspect-ratio: 4/3;
}

.project-tag {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: var(--accent-color);
  color: #0B0B0C;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.btn-link {
  color: var(--accent-color);
  font-weight: 600;
  margin-top: 1rem;
  display: inline-block;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

.detail-text h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  margin-top: 3rem;
}

.detail-text h2:first-child {
  margin-top: 0;
}

.feature-list {
  list-style: none;
  padding: 2rem 0;
}

.feature-list li {
  padding: 0.8rem 0;
  display: flex;
  gap: 1rem;
  color: var(--muted-color);
}

.feature-list span {
  color: var(--accent-color);
}

.results-section {
  background: rgba(106, 212, 125, 0.03);
  border-radius: 40px;
}

.detail-cta {
  text-align: center;
  padding-bottom: 10rem;
}

.detail-cta h2 {
  margin-bottom: 2.5rem;
}

@media (max-width: 1330px) {
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* --- CHATBOT WINDOW --- */
.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 500px;
  height: 700px;
  max-height: calc(100vh - 120px);
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(106, 212, 125, 0.2);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transform-origin: bottom right;
}

.chatbot-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-header {
  padding: 1.2rem 1.5rem;
  background: rgba(106, 212, 125, 0.08);
  border-bottom: 1px solid rgba(106, 212, 125, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.chat-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-color);
}

.chat-close {
  background: none;
  border: none;
  color: var(--muted-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 300px;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.chat-messages::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.message {
  padding: 0.8rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  max-width: 85%;
  line-height: 1.4;
}

.message.nomad {
  background: rgba(255, 255, 255, 0.05);
  color: var(--neutral-color);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.message.user {
  background: var(--accent-color);
  color: #000000 !important;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

/* Typing Indicator */
.typing-indicator {
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  border-bottom-left-radius: 2px;
  align-self: flex-start;
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--muted-color);
  border-radius: 50%;
  animation: typing-jump 1.4s infinite ease-in-out;
  opacity: 0.6;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-jump {

  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-4px);
  }
}

.chat-input-area {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  gap: 0.8rem;
  align-items: flex-end;
}

.chat-input-area textarea {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: var(--neutral-color);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  resize: none;
  max-height: 150px;
  transition: border-color 0.3s ease;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.chat-input-area textarea::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.chat-input-area textarea:focus {
  border-color: var(--accent-color);
}

#sendMessage {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
}

#sendMessage svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 480px) {
  .chatbot-window {
    width: 90vw;
    height: 80vh;
    bottom: 70px;
    right: -10px;
  }
}

/* --- CHATBOT WIDGET --- */
.chatbot-widget {
  position: fixed;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.chatbot-widget.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chatbot-bubble {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(106, 212, 125, 0.2);
  padding: 1rem 1.5rem;
  border-radius: 18px 18px 0 18px;
  max-width: 280px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: float 3s ease-in-out infinite;
}

.chatbot-bubble p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  color: var(--neutral-color);
}

.chatbot-trigger {
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 8px 25px rgba(106, 212, 125, 0.4);
  transition: all 0.3s ease;
}

.chatbot-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(106, 212, 125, 0.6);
}

.chatbot-trigger svg {
  width: 28px;
  height: 28px;
}

.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-color);
  opacity: 0.6;
  animation: pulse-ring 2s infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 768px) {
  .chatbot-widget {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .chatbot-bubble {
    display: none;
  }
}

/* --- PROJECTS MOSAIC --- */
.projects-mosaic-section {
  padding: 6rem 0 10rem;
  background: transparent;
}

.mosaic-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mosaic-layout {
  display: flex;
  gap: 20px;
  height: 600px;
  /* Base height for the main feature */
}

.mosaic-main {
  flex: 2;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Portfolio Hero Specifics - Adjusted for Title/Mosaic Flow */
.projects-hero {
  min-height: auto !important;
  height: auto !important;
  padding-top: 20rem !important;
  padding-left: 0 !important;
  /* Moved even more to the left */
  /* Spacing below navbar */
  padding-bottom: 1rem !important;
  text-align: left !important;
  justify-content: flex-start !important;
}

.projects-hero .hero-content {
  margin-top: 0 !important;
}

.projects-hero .section-label {
  margin-left: 0 !important;
  justify-content: flex-start !important;
  color: var(--accent-color) !important;
}

/* --- PROJECTS MOSAIC --- */
.main-card {
  width: 100%;
  height: 100%;
  position: relative;
}

.main-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.5s ease;
}

.main-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 11, 12, 0.95) 0%, rgba(11, 11, 12, 0.3) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 3.5rem;
}

.project-details h3 {
  font-size: 3.5rem;
  color: #FFFFF0;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.project-details p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 2rem;
}

.mosaic-side {
  flex: 0 0 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 33% Height Rule for Side Thumbs */
.mosaic-side .thumb-card {
  height: calc(33.333% - 7px);
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.mosaic-bottom {
  display: flex;
  gap: 20px;
  /* 33% Height Rule for Bottom Thumbs relative to main (approx) */
  height: 200px;
}

.mosaic-bottom .thumb-card {
  flex: 1;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.thumb-card:hover {
  opacity: 1;
}

.thumb-card:hover img {
  transform: scale(1.1);
}

.thumb-card.active {
  opacity: 1;
  border-color: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-color);
}

@media (max-width: 1330px) {
  .why-us-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .why-us .subtitle {
    max-width: 100%;
  }

  /* Keep hero titles off the viewport edges when shrinking past 1080px */
  .projects-hero {
    padding-left: 5% !important;
    padding-right: 5% !important;
  }

  /* SERVICIOS: Centrar y reducir ancho entre 1330 y 750 */
  #servicios .services-grid {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #servicios .product-card {
    max-width: 550px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  #servicios .service-icon {
    margin: 0 auto 1.5rem auto !important;
  }

  #servicios .product-features li {
    justify-content: center !important;
  }
}

/* @media (max-width: 1024px) (merged into 1330px) */
@media (max-width: 1330px) {
  .mosaic-layout {
    flex-direction: column;
    height: auto;
  }

  .mosaic-main {
    height: 400px;
  }

  .mosaic-side {
    flex-direction: row;
    height: 120px;
    width: 100%;
  }

  .mosaic-side .thumb-card {
    height: 100%;
    flex: 1;
  }

  .mosaic-bottom {
    height: 120px;
  }
}

@media (max-width: 750px) {

  /* --- GLOBAL MOBILE CENTERING --- */
  .section,
  .hero,
  .why-us-text,
  .why-us-cards .card,
  .card-content,
  .contact-info,
  .contact-methods,
  .contact-method,
  .detail-text,
  .modal-info,
  .feature-list li {
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Specific fix for elements that need column stacking when centered */
  .why-us .card,
  .contact-method,
  .feature-list li {
    flex-direction: column;
  }

  /* Force absolute elements like pain numbers back to relative center */
  .pain-number {
    position: relative !important;
    top: 0 !important;
    right: auto !important;
    margin: 0 auto 1.5rem auto !important;
  }

  .pain-label {
    margin: 1.5rem auto 0 auto !important;
    width: 100%;
    display: block;
    text-align: center !important;
  }

  /* Services icon centering */
  .service-icon {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Services features list centering */
  .product-features,
  .cta-section .btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .product-features li {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
    text-align: center;
  }

  /* CTA components and Footer column centering */
  .cta-content,
  .pain-cta,
  .footer-column,
  .footer-grid,
  .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center !important;
    align-items: center !important;
    flex-direction: column;
    gap: 1.5rem;
  }

  .section-label,
  h1,
  h2,
  p,
  .subtitle,
  .hero-subtitle,
  .modal-description,
  .service-desc,
  .card-desc,
  .detail-text p,
  .contact-info p,
  .badge,
  .hero-buttons,
  .pain-label {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center !important;
  }

  .project-details h3 {
    font-size: 2.5rem;
  }

  .main-overlay {
    padding: 2rem;
  }

  /* Prevent horizontal scroll */
  body,
  html {
    overflow-x: hidden;
  }

  /* Fix edge touching & balance hero vertically */
  .hero {
    padding: 8rem 1.5rem 8rem !important;
  }

  .projects-hero {
    padding-top: 6rem !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    padding-bottom: 1rem !important;
    /* Reducido drásticamente para acercar la primera tarjeta */
    text-align: center !important;
    justify-content: center !important;
  }

  .project-detail-hero {
    padding-top: 20rem !important;
    padding-bottom: 6rem !important;
    text-align: center !important;
    justify-content: center !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .section {
    padding: 4rem 1.5rem !important;
  }

  /* Expandir la cuadrícula internamente sin alterar el marco (padding) del contenedor marfil */
  .services-grid {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .projects-mosaic-section {
    padding: 6rem 1.5rem 4rem !important;
  }

  /* Modal responsive */
  .modal-container {
    width: 95%;
  }

  .modal-info {
    padding: 2rem 1.5rem;
  }

  .modal-header-img {
    height: 250px;
  }

  /* Fix Grid overflow */
  .why-us-container,
  .pain-grid,
  .modal-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  .grid-3,
  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
    /* Más margen/separación entre las tarjetas de servicios */
  }

  /* --- HEADER RESPONSIVE 650PX FIX --- */
  @media (max-width: 650px) {
    .navbar {
      display: flex !important;
      flex-direction: column !important;
      /* APILAR TODO EN DOMINO */
      justify-content: center !important;
      align-items: center !important;
      padding: 1rem 5% !important;
      gap: 0.8rem !important;
      /* Espacio vertical entre los elementos */
      background: rgba(11, 11, 12, 0.95) !important;
      backdrop-filter: blur(20px) !important;
    }

    .navbar-logo {
      font-size: 2.1rem !important;
      text-align: center !important;
      justify-content: center !important;
      display: flex !important;
      margin: 0 0 0.5rem 0 !important;
    }

    .lang-toggle {
      position: static !important;
      margin: 0 !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
    }

    .hamburger {
      position: static !important;
      margin: 0 !important;
      display: block !important;
      font-size: 2rem !important;
    }

    /* Ocultar links normales en movil */
    .navbar-links {
      display: none !important;
    }

    .navbar-links.active {
      display: flex !important;
      /* Mostrar si está activo */
      position: fixed;
      /* ... estilos de menú móvil ... */
    }

    /* Al hacer scroll */
    .navbar.scrolled .navbar-logo {
      display: none !important;
    }

    .navbar.scrolled {
      padding: 0.8rem 5% !important;
    }
  }

  /* --- MICRO MOBILE (< 550px) FIX --- */
  /* Mantener tarjetas más cuadradas y evitar que se alarguen por el texto */
  @media (max-width: 550px) {

    /* Hacer que toda la sección sea marfil */
    #servicios.section {
      background: #FFFFF0 !important;
    }

    .services-master-card {
      background: transparent !important;
      box-shadow: none !important;
      padding: 0 !important;
      border-radius: 0 !important;
    }

    /* Ya no forzamos colores oscuros, dejamos que hereden el texto oscuro por defecto para fondo marfil */

    /* Quitar margen negativo ahora que no hay contenedor marfil */
    .services-grid {
      grid-template-columns: 1fr !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      gap: 1.5rem !important;
      /* Separación clara entre los 3 servicios */
    }

    /* Convertir formato de tarjeta a tipo why-us usando Grid, pero para fondo claro */
    #servicios .product-card {
      background: rgba(26, 26, 26, 0.05) !important;
      border: 1px solid rgba(0, 0, 0, 0.08) !important;
      border-radius: 20px !important;
      box-shadow: none !important;
      padding: 2.5rem 1.5rem !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      text-align: center !important;
      gap: 1.2rem !important;
    }

    #servicios .product-card:hover {
      border-color: rgba(106, 212, 125, 0.3) !important;
      box-shadow: none !important;
    }

    #servicios .service-icon {
      width: 56px !important;
      height: 56px !important;
      background: rgba(106, 212, 125, 0.1) !important;
      border-radius: 14px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      color: var(--accent-color) !important;
      margin: 0 0 0.5rem 0 !important;
    }

    #servicios .service-icon svg {
      width: 24px !important;
      height: 24px !important;
    }

    #servicios .product-title {
      font-size: 1.5rem !important;
      margin: 0 !important;
      color: #1a1a1a !important;
    }

    #servicios .service-desc {
      font-size: 1.05rem !important;
      line-height: 1.6 !important;
      margin: 0 !important;
      color: #333 !important;
    }

    #servicios .product-features {
      display: flex !important;
      flex-direction: column !important;
      gap: 0.8rem !important;
      padding: 0 !important;
      align-items: center !important;
    }

    #servicios .product-features li {
      font-size: 0.95rem !important;
      justify-content: flex-start !important;
    }
  }

  /* Form inputs mobile padding */
  .contact-form input,
  .contact-form textarea {
    padding: 0.8rem 1rem;
  }

  /* Typography Scale */
  h1 {
    font-size: 2.5rem !important;
  }

  h2 {
    font-size: 2rem !important;
  }

  p,
  .subtitle,
  .hero-subtitle,
  .modal-description {
    font-size: 1rem !important;
    line-height: 1.6;
  }

  .section-label {
    font-size: 0.75rem;
  }
}

/* --- BOOKING SECTION --- */
.booking-section {
  padding: 8rem 5% 4rem;
  background: transparent;
  text-align: center;
}

.booking-container {
  max-width: 1000px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(106, 212, 125, 0.1);
  border-radius: 24px;
  overflow: hidden;
  min-height: 600px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.booking-standalone-hero {
  padding: 12rem 5% 4rem;
  text-align: center;
}

@media (max-width: 768px) {
  .booking-section {
    padding: 6rem 5% 2rem;
  }

  .booking-container {
    min-height: 700px;
  }
}

/* --- PORTFOLIO PAGES REFINEMENTS (AI & WEB) --- */
/* Hide logo on portfolio pages as requested */
#ai-page .navbar-logo,
#web-page .navbar-logo {
  display: none !important;
}

/* Reduce global spacing & Force Centering */
#ai-page .projects-hero,
#web-page .projects-hero {
  padding-top: 10rem !important;
  /* Reducido de 16-20rem */
  padding-bottom: 0 !important;
  min-height: auto !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

#ai-page .projects-hero .hero-content,
#ai-page .projects-hero .container,
#web-page .projects-hero .hero-content,
#web-page .projects-hero .container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  padding: 0 1.5rem !important;
}

#ai-page .projects-hero .section-label,
#web-page .projects-hero .section-label {
  justify-content: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: fit-content;
}

#ai-page .projects-grid-section,
#web-page .projects-mosaic-section {
  padding-top: 2rem !important;
  padding-bottom: 4rem !important;
  /* Espacio igualado según referencia de IA */
}

/* Specific mobile adjustment for portfolio pages */
@media (max-width: 750px) {

  #ai-page .projects-hero,
  #web-page .projects-hero {
    padding-top: 6rem !important;
    padding-bottom: 0 !important;
  }

  #ai-page .projects-grid-section,
  #web-page .projects-grid-section {
    padding-top: 1rem !important;
  }

  /* Refuerzo de centrado para subtítulo en móviles */
  #ai-page .projects-hero .section-label,
  #web-page .projects-hero .section-label {
    margin-bottom: 1rem !important;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Fix overlap when navbar stacks vertically at 650px */
@media (max-width: 650px) {

  #ai-page .projects-hero,
  #web-page .projects-hero {
    padding-top: 13rem !important;
    /* Espacio extra para navbar vertical */
  }
}