/* ============================================
   Marc García SEO — Premium Styles
   Companion to Tailwind CSS (via CDN)
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-dark: #0F2426;
  --color-primary: #1A3C40;
  --color-accent: #2BC2A5;
  --color-cta: #C7E876;
  --color-bg: #FAFAFA;
  --color-white: #FFFFFF;
  --color-text: #1A1A1A;
  --color-muted: #6B7280;
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #20BA5A;
  --color-telegram: #229ED9;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Premium shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-glow-accent: 0 0 30px rgba(43, 194, 165, 0.2), 0 0 60px rgba(43, 194, 165, 0.1);
  --shadow-glow-cta: 0 0 30px rgba(199, 232, 118, 0.2), 0 0 60px rgba(199, 232, 118, 0.1);
}

/* --- Base Reset Enhancements --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.7;
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: var(--font-display);
}

/* ============================================
   NAVBAR — Glassmorphism + Color Transitions
   ============================================ */

/* Initial state: dark text for subpages with light bg */
#navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

/* Non-hero pages: always show glass background so text is readable */
#navbar:not(.nav-hero-dark) {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#navbar .nav-logo-text {
  color: var(--color-primary);
  transition: color 0.4s ease;
}

#navbar .nav-logo-dot {
  color: var(--color-accent);
  transition: color 0.4s ease;
}

#navbar .nav-link {
  position: relative;
  color: var(--color-muted);
  transition: color 0.3s ease;
  font-weight: 500;
}

#navbar .nav-link:hover,
#navbar .nav-link.active {
  color: var(--color-primary);
}

#navbar .mobile-toggle-icon {
  color: var(--color-primary);
  transition: color 0.4s ease;
}

/* Dark hero variant: WHITE text when over dark hero (homepage) */
#navbar.nav-hero-dark:not(.nav-scrolled) .nav-logo-text {
  color: #FFFFFF;
}

#navbar.nav-hero-dark:not(.nav-scrolled) .nav-logo-dot {
  color: var(--color-cta);
}

#navbar.nav-hero-dark:not(.nav-scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.75);
}

#navbar.nav-hero-dark:not(.nav-scrolled) .nav-link:hover,
#navbar.nav-hero-dark:not(.nav-scrolled) .nav-link.active {
  color: #FFFFFF;
}

#navbar.nav-hero-dark:not(.nav-scrolled) .mobile-toggle-icon {
  color: #FFFFFF;
}

/* Scrolled state: glassmorphism with dark text */
#navbar.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#navbar.nav-scrolled .nav-logo-text {
  color: var(--color-primary);
}

#navbar.nav-scrolled .nav-logo-dot {
  color: var(--color-accent);
}

#navbar.nav-scrolled .nav-link {
  color: var(--color-muted);
}

#navbar.nav-scrolled .nav-link:hover,
#navbar.nav-scrolled .nav-link.active {
  color: var(--color-primary);
}

#navbar.nav-scrolled .mobile-toggle-icon {
  color: var(--color-primary);
}

/* Nav link underline effect */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cta));
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ============================================
   SCROLL ANIMATIONS — Smooth reveals
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  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.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ============================================
   CARDS — Premium hover effects
   ============================================ */
.card-hover {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease;
  box-shadow: var(--shadow-sm);
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-accent);
}

/* Glow card variant */
.card-glow {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-md);
}

.card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-accent), var(--color-cta), var(--color-accent));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.card-glow:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-accent);
}

.card-glow:hover::before {
  opacity: 1;
}

/* ============================================
   HERO — Premium decorative elements
   ============================================ */

/* Animated gradient orbs */
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}

.hero-orb {
  animation: float 20s ease-in-out infinite;
  will-change: transform;
}

.hero-orb-delayed {
  animation: float 25s ease-in-out infinite reverse;
}

/* Grid pattern overlay */
.grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Dot pattern overlay */
.dot-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Gradient line accent */
.gradient-line {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cta));
  border-radius: 2px;
}

.gradient-line-long {
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cta), transparent);
  border-radius: 2px;
}

/* ============================================
   GRADIENT TEXT — Multiple variants
   ============================================ */
.gradient-text {
  background: linear-gradient(135deg, var(--color-cta) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, #3DD4B4 50%, var(--color-cta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   TESTIMONIALS — Infinite scroll columns
   ============================================ */
@keyframes scroll-up {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.testimonials-mask {
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.testimonials-col {
  animation: scroll-up var(--scroll-duration, 25s) linear infinite;
}

.testimonials-col:hover {
  animation-play-state: paused;
}

.testimonial-card {
  background: var(--color-white);
  border: 1px solid #E5E7EB;
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 30px rgba(43, 194, 165, 0.08);
}

/* ============================================
   FAQ ACCORDION — Smooth transitions
   ============================================ */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.is-open .faq-answer {
  max-height: 500px;
}

.faq-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

.faq-item {
  transition: background-color 0.3s ease;
}

.faq-item:hover {
  background-color: rgba(43, 194, 165, 0.02);
}

/* ============================================
   BUTTONS — Premium with glow
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-cta) 0%, #D4ED8C 100%);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 800;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(199, 232, 118, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(199, 232, 118, 0.4);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 1rem 2rem;
  border: 2px solid var(--color-primary);
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 60, 64, 0.2);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-whatsapp) 0%, #2EE370 100%);
  color: var(--color-white);
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

/* ============================================
   MOBILE MENU — Slide panel
   ============================================ */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   WHATSAPP FLOATING — Pulse effect
   ============================================ */
@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4), 0 0 0 12px rgba(37, 211, 102, 0.1); }
}

.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--color-whatsapp), #2EE370);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: whatsapp-pulse 3s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.whatsapp-float:hover {
  transform: scale(1.12);
  animation: none;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

/* ============================================
   SECTION DECORATIONS
   ============================================ */

/* Angled section transition */
.section-angle {
  position: relative;
}

.section-angle::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 80px;
  background: inherit;
  transform: skewY(-2deg);
  transform-origin: top left;
  z-index: 1;
}

/* Section divider */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cta));
  border-radius: 2px;
}

/* Decorative border gradient */
.border-gradient {
  position: relative;
}

.border-gradient::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cta), var(--color-accent));
}

/* Glass card */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dark glass card */
.glass-card-dark {
  background: rgba(15, 36, 38, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   BADGES — Enhanced
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-display);
}

.badge-primary {
  background: linear-gradient(135deg, var(--color-cta), #D4ED8C);
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(199, 232, 118, 0.3);
}

.badge-accent {
  background: rgba(43, 194, 165, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(43, 194, 165, 0.2);
}

.badge-dark {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb .separator {
  margin: 0 0.5rem;
}

/* ============================================
   FORMS — Premium styling
   ============================================ */
.form-input {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1.5px solid #E5E7EB;
  border-radius: 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(43, 194, 165, 0.08);
  background-color: #FAFFFE;
}

.form-input::placeholder {
  color: #9CA3AF;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

/* ============================================
   COMPARISON TABLE — Enhanced
   ============================================ */
.comparison-row {
  transition: background-color 0.2s ease;
}

.comparison-row:hover {
  background-color: rgba(43, 194, 165, 0.03);
}

/* ============================================
   METRIC COUNTER — Scale animation
   ============================================ */
@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.metric-number {
  animation: countUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================
   STAT CARD — For metrics display
   ============================================ */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cta));
}

/* ============================================
   ICON BOX — Stylized icon containers
   ============================================ */
.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.icon-box-accent {
  background: linear-gradient(135deg, rgba(43, 194, 165, 0.12), rgba(43, 194, 165, 0.06));
  border: 1px solid rgba(43, 194, 165, 0.15);
}

.icon-box-cta {
  background: linear-gradient(135deg, rgba(199, 232, 118, 0.15), rgba(199, 232, 118, 0.06));
  border: 1px solid rgba(199, 232, 118, 0.2);
}

/* ============================================
   MARQUEE — For logos or trust elements
   ============================================ */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  animation: marquee 30s linear infinite;
}

/* ============================================
   NOISE OVERLAY — Texture effect
   ============================================ */
.noise-overlay {
  position: relative;
}

.noise-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .animate-on-scroll {
    transform: translateY(20px);
  }

  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 1rem;
    right: 1rem;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .whatsapp-float,
  .mobile-menu,
  .mobile-overlay,
  nav {
    display: none !important;
  }
}

/* ============================================
   SUBPAGE HERO (dark bg with light text)
   ============================================ */
.subpage-hero {
  position: relative;
  overflow: hidden;
}

.subpage-hero .breadcrumb a,
.subpage-hero .breadcrumb .separator,
.subpage-hero .breadcrumb span {
  color: rgba(255, 255, 255, 0.5);
}

.subpage-hero .breadcrumb a:hover {
  color: var(--color-cta);
}

/* ============================================
   PRICING CARD — Featured highlight
   ============================================ */
.pricing-featured {
  position: relative;
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-glow-accent);
}

.pricing-featured::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cta));
  border-radius: 0 0 4px 4px;
}

/* ============================================
   TESTIMONIAL QUOTE
   ============================================ */
.testimonial-quote {
  position: relative;
  padding-left: 1.5rem;
  border-left: 3px solid var(--color-accent);
}

.testimonial-quote::before {
  content: '\201C';
  position: absolute;
  top: -20px;
  left: -5px;
  font-size: 4rem;
  color: var(--color-accent);
  opacity: 0.15;
  font-family: Georgia, serif;
  line-height: 1;
}
