/* ═══════════════════════════════════════════════════════
   ENBICI NICARAGUA — Main Styles
   Overrides and supplements to design-system.css
   ═══════════════════════════════════════════════════════ */

/* ═══ Preloader ═══ */
.preloader {
  position: fixed;
  inset: 0;
  background-color: var(--color-secondary);
  z-index: var(--z-preloader);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}
.preloader.fade-out { opacity: 0; visibility: hidden; }

.preloader-draw {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawLogo 2.5s ease-in-out forwards;
}
.preloader-logo-text {
  opacity: 0;
  animation: fadeIn 1s 1s ease forwards;
}
.preloader-text {
  margin-top: var(--space-8);
  font-family: var(--font-headings);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  animation: fadeUp 1s 1.5s ease forwards;
}

@keyframes drawLogo { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ═══ Top Bar (cowboy.com rotating banner) ═══ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-nav) + 5);
  background-color: var(--color-dark);
  color: white;
  text-align: center;
  font-size: var(--text-xs);
  padding: 0.75rem var(--section-x);
  overflow: hidden;
  height: 40px;
}
.top-bar-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.top-bar-slide.active {
  opacity: 1;
  transform: translateY(0);
}
.top-bar-slide a {
  color: white;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.top-bar-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.top-bar-close {
  position: absolute;
  right: var(--section-x);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.top-bar-close:hover { opacity: 1; }

/* ═══ Navigation (cowboy.com smart navbar) ═══ */
.nav {
  position: fixed;
  top: 40px; /* below top bar */
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 0.25rem 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.3s ease,
              color 0.3s ease,
              box-shadow 0.3s ease;
  color: white;
}
.nav.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  top: 0;
}
.nav.nav-hidden {
  transform: translateY(-100%);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-x);
  height: var(--nav-height);
}
.nav-logo {
  color: inherit;
  flex-shrink: 0;
}
.nav-menu {
  display: flex;
  gap: var(--space-6);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-link {
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: opacity 0.2s;
  color: inherit;
}
.nav-menu:hover .nav-link { opacity: 0.5; }
.nav-menu:hover .nav-link:hover { opacity: 1; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: inherit;
  transition: opacity 0.2s;
}
.nav-icon:hover { opacity: 0.7; }

.nav-cta {
  font-size: var(--text-xs);
  padding: 0.75rem 1.25rem;
}
.nav.nav-scrolled .nav-cta {
  background-color: var(--color-dark);
  color: white;
}
.nav.nav-scrolled .nav-cta:hover {
  background-color: var(--color-primary);
}

/* Burger */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 26px;
  height: 20px;
  position: relative;
  z-index: calc(var(--z-overlay) + 1);
}
.nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-burger span:nth-child(1) { top: 0; }
.nav-burger span:nth-child(2) { top: 9px; }
.nav-burger span:nth-child(3) { top: 18px; }
.nav-burger.active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background-color: white;
  padding: calc(var(--nav-height) + 40px + var(--space-12)) var(--section-x) var(--space-12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu.active { opacity: 1; pointer-events: auto; }
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
}
.mobile-menu-link {
  font-family: var(--font-headings);
  font-size: 2rem;
  font-weight: 600;
  padding: var(--space-3) 0;
  color: var(--text-primary);
  border-bottom: 1px solid var(--color-border);
}

@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .nav-burger { display: block; }
  .nav-cta { display: none; }
}

/* ═══ Hero Section (cowboy.com full-viewport hero) ═══ */
.hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background-color: var(--color-dark);
  color: white;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay-top {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 40%);
  pointer-events: none;
}
.hero-overlay-bottom {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 40%);
  pointer-events: none;
}
.hero-overlay-mobile {
  display: none;
}
@media (max-width: 1024px) {
  .hero-overlay-mobile {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 60%);
    pointer-events: none;
  }
}
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-top: var(--header-gutter);
}
@media (max-width: 1024px) {
  .hero-content {
    align-items: center;
    text-align: center;
    padding-top: calc(var(--header-gutter) + var(--space-12));
  }
}
.hero-title {
  max-width: 12ch;
}
@media (max-width: 1024px) {
  .hero-title { text-align: center; }
}
.hero-subtitle {
  font-size: var(--text-body-lg);
  color: rgba(255,255,255,0.6);
  max-width: 500px;
  text-wrap: balance;
}
.hero-badge { order: -1; }
.badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
}

/* Hero Stats Bar (cowboy.com bottom stats) */
.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stats-list {
  display: flex;
  padding: var(--space-4) 0;
  gap: var(--space-16);
  overflow-x: auto;
  scrollbar-width: none;
}
.hero-stats-list::-webkit-scrollbar { display: none; }
.hero-stat {
  flex: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-small);
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}
.hero-stat strong { color: white; }
@media (max-width: 1024px) {
  .hero-stats-list { gap: var(--space-10); padding-left: var(--section-x); }
}

/* ═══ Model Sections (cowboy.com bike showcase) ═══ */
.model-section {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.model-content {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.model-header {
  position: relative;
  z-index: 10;
  padding-top: var(--section-y);
}
@media (min-width: 1025px) {
  .model-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding-top: calc(var(--nav-height) + var(--space-8));
  }
}
.model-header-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
@media (max-width: 1024px) {
  .model-header-link { align-items: center; text-align: center; }
}
.model-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  max-width: 380px;
}
@media (max-width: 1024px) {
  .model-pills { justify-content: center; max-width: none; }
}

/* Model Gallery */
.model-gallery {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
}
.model-gallery-inner {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.model-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
  pointer-events: none;
}
.model-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.model-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  padding: var(--space-12) calc(var(--section-x) * 3);
}
@media (min-width: 1025px) {
  .model-slide img {
    object-position: 65% bottom;
  }
}
@media (max-width: 1024px) {
  .model-slide img {
    padding: var(--space-4);
    object-fit: contain;
    max-width: 130%;
    margin-left: -15%;
  }
}
.model-explore-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
@media (min-width: 1025px) {
  .model-gallery-inner:hover .model-explore-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (max-width: 1024px) {
  .model-section {
    min-height: auto;
    height: auto;
    padding-bottom: var(--space-10);
  }
  .model-gallery {
    height: 380px;
    flex: none;
  }
  .model-explore-overlay {
    opacity: 1;
    pointer-events: auto;
    top: auto;
    bottom: var(--space-4);
    right: var(--space-4);
    left: auto;
    transform: none;
  }
}

.model-gallery-controls {
  position: absolute;
  bottom: var(--section-y);
  left: var(--section-x);
  display: flex;
  gap: var(--space-3);
  z-index: 20;
}
@media (min-width: 1025px) {
  .model-gallery-controls {
    bottom: var(--section-x);
  }
}
.gallery-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-dark);
  transition: background-color 0.2s;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 1025px) {
  .gallery-btn { width: 40px; height: 40px; }
}
.gallery-btn:hover { background-color: var(--color-surface); }
.gallery-btn:disabled { opacity: 0.5; cursor: default; }

.model-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ═══ Model Hero (dark video-style sections) ═══ */
.model-hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: white;
}
@media (max-width: 1024px) {
  .model-hero-section { align-items: flex-end; }
}
.model-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.model-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}
.model-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-top: var(--header-gutter);
  padding-bottom: var(--section-y);
}
@media (max-width: 1024px) {
  .model-hero-content {
    align-items: center;
    text-align: center;
    padding-bottom: var(--space-20);
  }
}

/* ═══ Taller Section ═══ */
.taller-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}
@media (max-width: 1024px) {
  .taller-grid { grid-template-columns: 1fr; gap: var(--space-10); }
}
.taller-services {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.taller-service {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.3s;
}
.taller-service:hover { border-color: rgba(255,255,255,0.2); }
.taller-service-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: rgba(var(--color-primary-rgb), 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}
.taller-service div:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.taller-service span {
  display: block;
}

/* ═══ Stats ═══ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-item {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  border-top: 2px solid var(--color-border);
  transition: border-color 0.3s;
}
.stat-item:hover { border-color: var(--color-primary); }
.stat-value {
  font-family: var(--font-headings);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}
.stat-label {
  margin-top: var(--space-2);
  font-size: var(--text-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* ═══ Compare Cards ═══ */
.compare-card {
  background-color: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.compare-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.compare-card-featured {
  border-color: var(--color-primary);
}
.compare-featured-tag {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background-color: var(--color-primary);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  z-index: 5;
}
.compare-card-image {
  padding: var(--space-8) var(--space-6);
  background-color: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
  overflow: hidden;
}
.compare-card-image img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  transition: transform 0.5s ease;
}
.compare-card:hover .compare-card-image img {
  transform: scale(1.05);
}
.compare-card-body {
  padding: var(--space-6);
}
.compare-price {
  font-family: var(--font-headings);
  font-size: 2rem;
  font-weight: 800;
  margin-top: var(--space-4);
  color: var(--text-primary);
}
.compare-currency {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.compare-features {
  margin: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.compare-features li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--text-small);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.compare-features li::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.75rem;
}

/* ═══ Testimonials ═══ */
.testimonials-container {
  overflow: hidden;
  cursor: grab;
  position: relative;
}
.testimonials-container:active { cursor: grabbing; }
.testimonials-track {
  display: flex;
  gap: var(--space-6);
  transition: transform 0.15s ease;
  will-change: transform;
}
.testimonial-card {
  flex: 0 0 380px;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
}
@media (max-width: 480px) {
  .testimonial-card { flex: 0 0 300px; }
}
.testimonial-stars {
  color: var(--color-accent);
  font-size: 1.25rem;
  letter-spacing: 2px;
}
.testimonial-quote {
  font-style: italic;
  font-size: var(--text-body);
  color: var(--text-primary) !important;
  line-height: 1.6;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(var(--color-primary-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-weight: 700;
  font-family: var(--font-headings);
  font-size: var(--text-small);
}
.testimonial-author strong {
  display: block;
  font-size: var(--text-small);
  color: var(--text-primary);
}
.testimonial-author span {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ═══ Blog Cards ═══ */
.blog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 768px) {
  .blog-header { flex-direction: column; gap: var(--space-4); align-items: flex-start; }
}
.blog-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: white;
  border: 1px solid var(--color-border-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.blog-card-image {
  height: 220px;
  overflow: hidden;
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}
.blog-card-body {
  padding: var(--space-6);
}
.blog-card-date {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
}
.blog-card-link {
  display: inline-block;
  margin-top: var(--space-4);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-primary);
  transition: gap 0.2s;
}
.blog-card-link:hover { text-decoration: underline; }

/* ═══ CTA Section ═══ */
.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══ Footer (cowboy.com mega-footer) ═══ */
.footer {
  background-color: var(--color-secondary);
  color: rgba(255,255,255,0.65);
  padding: var(--space-20) 0 var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: span 3; margin-bottom: var(--space-8); }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: span 2; }
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-desc {
  font-size: var(--text-small);
  max-width: 300px;
  line-height: 1.6;
}
.footer-social {
  display: flex;
  gap: var(--space-2);
}
.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.footer-social-link:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}
.footer-column-title {
  font-family: var(--font-headings);
  font-size: var(--text-xs);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: white;
  margin-bottom: var(--space-4);
}
.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-column a {
  font-size: var(--text-small);
  color: rgba(255,255,255,0.6);
  transition: color 0.2s, padding-left 0.2s;
}
.footer-column a:hover {
  color: var(--color-primary);
  padding-left: 4px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
}
.footer-bottom-links {
  display: flex;
  gap: var(--space-6);
}
.footer-bottom-links a { color: rgba(255,255,255,0.4); }
.footer-bottom-links a:hover { color: white; }
