/* ============================================
   CARRIROAD COMPONENTS — Kinetic Precision
   Navbar, Cards, Buttons, Footer
   ============================================ */

/* ====== NAVBAR ====== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--duration-normal) var(--ease-out);
}

.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cr-glass-bg);
  backdrop-filter: var(--cr-glass-blur) saturate(180%);
  -webkit-backdrop-filter: var(--cr-glass-blur) saturate(180%);
  border-bottom: 1px solid var(--cr-glass-border);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.navbar.scrolled::before {
  opacity: 1;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
  z-index: 1;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--cr-white);
  text-decoration: none;
}

.navbar__logo-symbol {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: transform var(--duration-normal) var(--ease-out),
              filter var(--duration-normal) var(--ease-out);
}

.navbar__logo:hover .navbar__logo-symbol {
  transform: scale(1.08);
  filter: drop-shadow(0 0 8px rgba(161, 251, 0, 0.4));
}

.navbar__logo-text {
  font-family: 'Archivo', var(--font-heading);
  font-weight: 300;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--cr-white);
}

.navbar__logo-accent {
  color: var(--cr-lime);
  font-weight: 700;
}

.navbar__logo-full {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: transform var(--duration-normal) var(--ease-out),
              filter var(--duration-normal) var(--ease-out);
}

.navbar__logo:hover .navbar__logo-full {
  transform: scale(1.03);
  filter: drop-shadow(0 0 8px rgba(161, 251, 0, 0.3));
}

.footer__logo-symbol {
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin-right: var(--space-sm);
}

.navbar__logo span {
  color: var(--cr-lime);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar__link {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--cr-on-surface);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--duration-normal) var(--ease-out);
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cr-gradient-neon);
  border-radius: var(--radius-full);
  transition: width var(--duration-normal) var(--ease-out);
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--cr-white);
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

/* ====== LANGUAGE SELECTOR ====== */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--cr-surface-high);
  border: 1px solid var(--cr-glass-border);
  border-radius: var(--radius-full);
  padding: 2px;
  margin-left: var(--space-md);
}

.lang-selector__btn {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
  color: var(--cr-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-selector__btn--active {
  background: var(--cr-lime);
  color: var(--cr-on-primary);
}

.lang-selector__btn:hover:not(.lang-selector__btn--active) {
  color: var(--cr-white);
  background: rgba(255, 255, 255, 0.08);
}

.navbar__cta {
  margin-left: var(--space-lg);
}

/* Mobile menu toggle */
.navbar__toggle,
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
  background: none;
  border: none;
}

.navbar__toggle span,
.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cr-white);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out);
}

.navbar__toggle.open span:nth-child(1),
.navbar__hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle.open span:nth-child(2),
.navbar__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.open span:nth-child(3),
.navbar__hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ====== BUTTONS (Kinetic Precision: pill-shape primary) ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn--primary {
  background: var(--cr-lime);
  color: var(--cr-on-primary);
  border: none;
  box-shadow: var(--shadow-neon);
}

.btn--primary:hover {
  background: var(--cr-lime-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon-strong);
  filter: brightness(1.1);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--cr-lime);
  border: 1px solid rgba(161, 251, 0, 0.3);
}

.btn--ghost:hover {
  background: var(--cr-lime-glow);
  border-color: var(--cr-lime);
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
}

.btn--ghost:active {
  transform: translateY(0);
}

.btn--sm {
  padding: 10px 22px;
  font-size: var(--fs-xs);
}

.btn--lg {
  padding: 18px 42px;
  font-size: var(--fs-body);
}

.btn__arrow {
  transition: transform var(--duration-normal) var(--ease-out);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* ====== CARDS (Tonal Layering — no borders, depth via surfaces) ====== */
.card {
  background: var(--cr-gradient-card);
  border: 1px solid var(--cr-glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cr-gradient-neon);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: rgba(161, 251, 0, 0.12);
  transform: translateY(-4px);
  box-shadow: var(--shadow-neon);
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  width: 56px;
  height: 56px;
  background: var(--cr-lime-glow);
  border: 1px solid rgba(161, 251, 0, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: var(--cr-lime);
  font-size: 1.5rem;
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover .card__icon {
  background: var(--cr-lime-glow-strong);
  border-color: rgba(161, 251, 0, 0.3);
  box-shadow: 0 0 20px var(--cr-neon-pulse);
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  color: var(--cr-white);
  margin-bottom: var(--space-md);
}

.card__text {
  font-size: var(--fs-small);
  color: var(--cr-on-surface);
  line-height: var(--lh-relaxed);
}

.card__tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--cr-lime);
  background: var(--cr-lime-glow);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-top: var(--space-md);
  letter-spacing: 0.04em;
}

/* ====== STATS ====== */
.stat {
  text-align: center;
  padding: var(--space-lg);
}

.stat__number {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--cr-lime);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-xs);
}

.stat__label {
  font-size: var(--fs-small);
  color: var(--cr-on-surface);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ====== SECTION HEADERS ====== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header__tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cr-lime);
  background: var(--cr-lime-glow);
  border: 1px solid rgba(161, 251, 0, 0.15);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
}

.section-header h2 {
  color: var(--cr-white);
  margin-bottom: var(--space-md);
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--cr-on-surface);
}

/* ====== FOOTER ====== */
.footer {
  background: var(--cr-surface-dim);
  border-top: var(--border-ghost);
  padding: var(--space-4xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

@keyframes footerLogoBreath {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(161,251,0,0.15)); opacity:0.92; }
  50% { filter: drop-shadow(0 0 10px rgba(161,251,0,0.4)) drop-shadow(0 0 20px rgba(161,251,0,0.1)); opacity:1; }
}

.footer__brand .navbar__logo-full {
  height: 54px !important;
  animation: footerLogoBreath 4s ease-in-out infinite;
}

.footer__brand p {
  color: rgba(255,255,255,0.88);
  font-size: var(--fs-small);
  margin-top: var(--space-md);
  max-width: 300px;
  line-height: var(--lh-relaxed);
  letter-spacing: 0.01em;
}

.footer__title {
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  color: var(--cr-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.footer__link {
  display: block;
  font-size: var(--fs-small);
  color: var(--cr-on-surface);
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__link:hover {
  color: var(--cr-lime);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--fs-small);
  color: var(--cr-on-surface);
  margin-bottom: var(--space-md);
}

.footer__contact-icon {
  color: var(--cr-lime);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 1.4em; /* match first line height of adjacent text */
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: var(--border-ghost);
}

.footer__copyright {
  font-size: var(--fs-xs);
  color: var(--cr-text-muted);
}

.footer__legal {
  display: flex;
  gap: var(--space-lg);
}

.footer__legal a {
  font-size: var(--fs-xs);
  color: var(--cr-text-muted);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__legal a:hover {
  color: var(--cr-lime);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

@media (max-width: 768px) {
  /* Mobile navigation */
  .navbar__links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(19, 19, 19, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2xl);
    padding: var(--space-2xl);
  }

  .navbar__links.open {
    display: flex;
  }

  .navbar__link {
    font-size: var(--fs-body-lg);
  }

  .navbar__toggle,
  .navbar__hamburger {
    display: flex;
  }

  .navbar__cta {
    margin-left: 0;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer__legal {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ====== STAT ICONS ====== */
.stat__icon {
  width: 48px;
  height: 48px;
  background: var(--cr-lime-glow);
  border: 1px solid rgba(161, 251, 0, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  color: var(--cr-lime);
  transition: all var(--duration-normal) var(--ease-out);
}

.stat:hover .stat__icon {
  background: var(--cr-lime-glow-strong);
  border-color: rgba(161, 251, 0, 0.3);
  box-shadow: 0 0 20px var(--cr-neon-pulse);
  transform: translateY(-2px);
}

/* ====== WHATSAPP FLOTANTE ====== */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35),
              0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5),
              0 4px 16px rgba(0, 0, 0, 0.4);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

/* Pulse animation */
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.3);
  animation: whatsapp-pulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes whatsapp-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0; }
}

/* Tooltip */
.whatsapp-float__tooltip {
  position: absolute;
  right: 72px;
  background: var(--cr-surface-mid);
  color: var(--cr-text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: all var(--duration-normal) var(--ease-out);
  pointer-events: none;
  box-shadow: var(--shadow-md);
  border: var(--border-ghost);
}

.whatsapp-float__tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--cr-surface-mid);
}

.whatsapp-float:hover .whatsapp-float__tooltip {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }

  .whatsapp-float__tooltip {
    display: none;
  }
}

/* ====== COOKIE CONSENT BANNER ====== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: rgba(19, 19, 19, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(161, 251, 0, 0.15);
  padding: 20px 0;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.cookie-banner__text {
  flex: 1;
  font-size: var(--fs-small);
  color: var(--cr-on-surface);
  line-height: var(--lh-relaxed);
}

.cookie-banner__text a {
  color: var(--cr-lime);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner__btn {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  border: none;
}

.cookie-banner__btn--accept {
  background: var(--cr-lime);
  color: var(--cr-on-primary);
}

.cookie-banner__btn--accept:hover {
  background: var(--cr-lime-hover);
  box-shadow: 0 0 20px rgba(161, 251, 0, 0.3);
}

.cookie-banner__btn--reject {
  background: transparent;
  color: var(--cr-on-surface);
  border: 1px solid var(--cr-outline);
}

.cookie-banner__btn--reject:hover {
  border-color: rgba(161, 251, 0, 0.3);
  color: var(--cr-white);
}

.cookie-banner__btn--config {
  background: transparent;
  color: var(--cr-text-muted);
  border: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__btn--config:hover {
  color: var(--cr-lime);
}

@media (max-width: 768px) {
  .cookie-banner__inner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner__actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-banner__btn {
    width: 100%;
  }
}

/* ====== FAQ ACCORDION ====== */
.faq-item {
  background: var(--cr-gradient-card);
  border: 1px solid var(--cr-glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item[open] {
  border-color: rgba(161, 251, 0, 0.2);
}

.faq-item__q {
  padding: var(--space-lg) var(--space-xl);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--cr-white);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  transition: color 0.3s ease;
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__q::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--cr-lime);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-item__q::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-item__q:hover {
  color: var(--cr-lime);
}

.faq-item__a {
  padding: 0 var(--space-xl) var(--space-lg);
  font-size: var(--fs-body);
  color: var(--cr-on-surface);
  line-height: 1.7;
  animation: faqSlide 0.3s ease;
}

@keyframes faqSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== BACK TO TOP BUTTON ====== */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--cr-surface-high);
  border: 1px solid var(--cr-glass-border);
  color: var(--cr-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  backdrop-filter: blur(10px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--cr-lime);
  color: var(--cr-on-primary);
  border-color: var(--cr-lime);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(161, 251, 0, 0.2);
}

/* ====== CARD HOVER MICRO-ANIMATIONS ====== */
.card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(161, 251, 0, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card__icon {
  transition: transform 0.3s ease;
}

.card:hover .card__icon {
  transform: scale(1.1);
}

/* ====== BREADCRUMBS ====== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  color: var(--cr-text-muted);
  margin-bottom: var(--space-lg);
}

.breadcrumb a {
  color: var(--cr-on-surface);
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--cr-lime);
}

.breadcrumb__sep {
  color: var(--cr-glass-border);
  font-size: 0.7rem;
}

.breadcrumb__current {
  color: var(--cr-lime);
  font-weight: 500;
}
