@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  /* Colors */
  --color-primary: #F5B800;
  --color-primary-dark: #D4A017;
  --color-bg: #0A0A0A;
  --color-white: #FFFFFF;
  --color-light: #F8F9FA;
  --color-surface: #111111;
  --color-surface-2: #1A1A1A;
  --color-text: #F0F0F0;
  --color-text-dark: #1A1A1A;
  --color-muted: #888888;
  --color-border: #333333;
  --color-black: #000000;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --spacing-xxl: 6rem;

  /* Other */
  --radius: 12px;
  --radius-sm: 6px;
  --transition: all 0.3s ease;
  --color-whatsapp: #25D366;
}

/* Cursor Trail */
#cursor-trail-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.trail-dot {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 20px;
  height: 20px;
  background-color: var(--color-primary);
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(4px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

@media (max-width: 768px) {
  .container {
    padding: 0 2rem !important;
  }
}

/* Typography Utilities */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--color-primary);
}

.text-muted {
  color: var(--color-muted);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: var(--spacing-xl);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 36px;
  border-radius: 50px;
  /* Estilo Pill */
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-black);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-black);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-black);
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-sm) 0;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 65px;
  /* Tamaño optimizado para elegancia y legibilidad */
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: var(--transition);
}

.logo img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav-links a {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

/* Dropdown Styles */
.nav-item-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--color-surface);
  min-width: 250px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  padding: 1rem 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: 1fr;
  max-height: 400px;
  overflow-y: auto;
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  padding: 0.8rem 1.5rem;
  color: var(--color-text);
  font-size: 0.9rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-item:hover {
  background-color: var(--color-surface-2);
  color: var(--color-primary);
  padding-left: 2rem;
}

.dropdown-item i {
  font-size: 1rem;
  width: 30px;
  /* Increased to ensure consistent alignment */
  text-align: center;
}

/* Mobile Dropdown */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease;
  }

  .nav-item-dropdown.active .dropdown-menu,
  .nav-item-dropdown:hover .dropdown-menu {
    max-height: 1000px;
    padding: 1rem 0;
    transform: none;
  }

  .dropdown-item {
    padding: 0.8rem 0;
    justify-content: flex-start;
  }
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  background-color: var(--color-bg);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
  position: relative;
  z-index: 5;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  /* Título masivo adaptativo */
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--spacing-lg);
  text-transform: uppercase;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xl);
  opacity: 0.9;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 600px;
  filter: drop-shadow(0 20px 50px rgba(245, 184, 0, 0.2));
  animation: float 6s infinite ease-in-out;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

/* Ticker / Marquee Skewed */
.tickers-container {
  position: relative;
  margin: 60px 0;
  padding: 40px 0;
  overflow: hidden;
}

.ticker-wrap {
  width: 120%;
  margin-left: -10%;
  overflow: hidden;
  padding: 20px 0;
  white-space: nowrap;
  position: relative;
  z-index: 10;
  transform: rotate(-3deg);
  /* Inclinación hacia abajo */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ticker-wrap.yellow {
  background-color: var(--color-primary);
  margin-bottom: -40px;
  /* Para que se crucen */
  z-index: 11;
}

.ticker-wrap.white {
  background-color: var(--color-white);
  transform: rotate(2deg);
  /* Inclinación opuesta */
  z-index: 10;
}

.ticker {
  display: inline-block;
  animation: ticker 25s linear infinite;
}

.ticker-item {
  display: inline-block;
  padding: 0 30px;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-black);
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.ticker-item i {
  margin: 0 15px;
  font-size: 1.2rem;
  vertical-align: middle;
}

@keyframes ticker {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Water Ripple on Click */
.water-ripple {
  position: fixed;
  width: 2px;
  height: 2px;
  background: rgba(245, 184, 0, 0.4);
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: rippleEffect 1s ease-out forwards;
  z-index: 9999;
}

@keyframes rippleEffect {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
    border-width: 4px;
  }

  100% {
    width: 500px;
    height: 500px;
    opacity: 0;
    border-width: 1px;
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: calc(100% + 100px);
  height: calc(100% + 100px);
  background-image: linear-gradient(rgba(10, 10, 10, 0.4), rgba(10, 10, 10, 0.7)), url('../img/hero-bg.png');
  background-size: cover;
  background-position: center;
  z-index: -1;
  filter: url(#water-filter);
  transform: translate(var(--x, 0), var(--y, 0)) scale(1.05);
  transition: transform 0.1s ease-out;
}

/* Services Grid */
.section {
  padding: var(--spacing-xxl) 0;
  position: relative;
}

.section-alt {
  background-color: var(--color-surface);
}

.section-dark {
  background-color: var(--color-bg);
}

.section-pattern {
  background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Shape Dividers */
.divider {
  position: absolute;
  left: 0;
  width: 100%;
  height: 80px;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
}

.divider-top {
  top: 0;
  transform: translateY(-100%);
}

.divider-bottom {
  bottom: 0;
}

.divider svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}

.divider .shape-fill {
  fill: var(--color-surface);
}

.section-dark .divider .shape-fill {
  fill: var(--color-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

/* Animations & Reveals */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.service-card {
  background-color: var(--color-surface-2);
  /* Más claro para destacar */
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 184, 0, 0.05), transparent);
  transition: 0.5s;
}

.service-card:hover::after {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary);
  box-shadow: 0 10px 30px rgba(245, 184, 0, 0.1);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.service-card p {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

.service-card .btn-link {
  color: var(--color-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.service-card .btn-link:hover {
  gap: 10px;
}

/* Stats Section */
.stats {
  background-color: var(--color-primary);
  color: var(--color-black);
  padding: var(--spacing-xl) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  text-align: center;
}

.stat-item h3 {
  font-size: 3rem;
  margin-bottom: 0;
}

.stat-item p {
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* WhatsApp FAB */
.whatsapp-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 35px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  color: white;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Footer */
footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-col h4 {
  color: var(--color-text);
  margin-bottom: var(--spacing-lg);
}

.footer-col p {
  color: var(--color-muted);
  margin-bottom: var(--spacing-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-sm);
}

.footer-links a {
  color: var(--color-muted);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-logo {
  height: 80px;
  /* Logo grande en el footer */
  width: auto;
  margin-bottom: 1.5rem;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image img {
    margin: 0 auto;
    max-width: 400px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--color-surface);
    flex-direction: column;
    align-items: flex-start;
    /* Align left */
    justify-content: flex-start;
    padding-top: 2rem;
    padding-bottom: 4rem;
    padding-left: 3rem;
    /* Indent */
    overflow-y: auto;
    transition: var(--transition);
  }

  .trail-dot {
    display: none;
  }

  /* Hide cursor trail on touch */
  .nav-links.active {
    left: 0;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-btns {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col {
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  .footer-logo {
    margin: 0 auto 1.5rem auto;
  }

  /* Force inline grids to stack (Global fix for subservices) */
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"],
  form div[style*="grid-template-columns: 1fr 1fr"],
  .container[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-lg) !important;
  }

  /* Hero refinement for subservices */
  .hero {
    min-height: auto !important;
    padding-top: 120px !important;
    padding-bottom: 60px !important;
  }

  .hero h1 {
    font-size: 2.2rem !important;
    margin-bottom: 1rem !important;
  }

  /* Blog & Content Spacing */
  .blog-content {
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    padding: 0 1rem !important; /* Increased extra internal padding */
  }

  .blog-post-title {
    font-size: 1.8rem !important;
  }

  .highlight-box {
    padding: 1.5rem !important;
  }

  .blog-layout {
    gap: var(--spacing-lg) !important;
    padding: 30px 15px !important; /* Added horizontal padding to the layout itself */
  }
}