/* WCA Import Exports — Custom Styles */

:root {
  --navy: #071120;
  --navy-light: #0d1a2d;
  --emerald: #0F9D58;
  --emerald-light: #12b868;
  --gold: #D4AF37;
  --gold-light: #e8c85a;
  --gray-light: #f4f6f8;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--navy);
  color: #e2e8f0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', system-ui, sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--emerald); border-radius: 4px; }

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-dark {
  background: rgba(7, 17, 32, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 157, 88, 0.15);
}

.glass-light {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 157, 88, 0.12);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--emerald-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gold-text {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section backgrounds */
.section-gradient {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy) 100%);
}

.section-light {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  color: #475569;
}

/* Tailwind custom color fallbacks (pages without tailwind.config) */
.text-navy { color: var(--navy); }
.text-emerald { color: var(--emerald); }
.text-gold { color: var(--gold); }
.bg-navy { background-color: var(--navy); }
.bg-emerald { background-color: var(--emerald); }
.bg-gold { background-color: var(--gold); }
.bg-navy-light { background-color: var(--navy-light); }
.border-emerald\/10 { border-color: rgba(15, 157, 88, 0.1); }
.border-emerald\/20 { border-color: rgba(15, 157, 88, 0.2); }
.border-emerald\/30 { border-color: rgba(15, 157, 88, 0.3); }
.border-emerald\/40 { border-color: rgba(15, 157, 88, 0.4); }
.border-gold\/20 { border-color: rgba(212, 175, 55, 0.2); }
.hover\:text-emerald:hover { color: var(--emerald); }

/* Blog cards & prose — readable text on light backgrounds */
.blog-card {
  color: #64748b;
}
.blog-card h3,
.blog-card .font-heading {
  color: var(--navy);
}
.blog-card a.font-heading {
  color: var(--navy);
}
.blog-card a.font-heading:hover {
  color: var(--emerald);
}

.section-light .product-card {
  color: #64748b;
}
.section-light .product-card h3 {
  color: var(--navy);
}

/* Hero overlay */
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(7, 17, 32, 0.92) 0%,
    rgba(7, 17, 32, 0.75) 40%,
    rgba(15, 157, 88, 0.25) 100%
  );
}

/* Navbar scrolled state */
#navbar.scrolled {
  background: rgba(7, 17, 32, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(15, 157, 88, 0.2);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--emerald) 0%, #0a7a45 100%);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(15, 157, 88, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(15, 157, 88, 0.5);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #b8962e 100%);
  color: var(--navy);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.45);
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}
.btn-outline:hover {
  border-color: var(--emerald);
  background: rgba(15, 157, 88, 0.15);
  transform: translateY(-2px);
}

/* Card hover glow */
.card-glow {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-glow:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15, 157, 88, 0.2), 0 0 0 1px rgba(15, 157, 88, 0.3);
}

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
.animate-float { animation: float 5s ease-in-out infinite; }
.animate-float-delay { animation: float 5s ease-in-out 1.5s infinite; }
.animate-float-slow { animation: float 7s ease-in-out 0.8s infinite; }

/* Pulse ring */
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}
.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--emerald);
  animation: pulse-ring 2s ease-out infinite;
}

/* Trade route animation */
@keyframes dash {
  to { stroke-dashoffset: 0; }
}
.trade-route {
  stroke-dasharray: 8 6;
  stroke-dashoffset: 100;
  animation: dash 3s linear infinite;
}

/* World map dots */
.map-dot {
  animation: map-pulse 2s ease-in-out infinite;
}
@keyframes map-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* Product filter tabs */
.filter-tab.active {
  background: linear-gradient(135deg, var(--emerald) 0%, #0a7a45 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(15, 157, 88, 0.4);
}

/* Testimonial slider */
.testimonial-track {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form validation */
.form-input.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
.form-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Back to top */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Lazy load fade — .loaded added by app.js (including dynamic grids) */
img[loading="lazy"]:not(.loaded) {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
  opacity: 1;
}

/* Mobile menu */
#mobile-menu.open {
  transform: translateX(0);
}

/* Site logo */
.site-logo {
  display: block;
  width: auto;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.site-logo-nav {
  height: 44px;
  max-width: min(200px, 55vw);
}
@media (min-width: 640px) {
  .site-logo-nav {
    height: 52px;
    max-width: 220px;
  }
}
.site-logo-footer {
  height: 52px;
  max-width: 220px;
}
@media (min-width: 640px) {
  .site-logo-footer {
    height: 60px;
    max-width: 240px;
  }
}
a:hover .site-logo {
  opacity: 0.92;
}

/* Footer bottom bar */
.footer-bottom.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-copyright-text a {
  font-weight: 500;
}
.footer-copyright-logo img {
  display: block;
  max-height: 48px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}
.footer-copyright-logo a:hover img {
  opacity: 1;
}

/* FAQ Accordion */
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-item.active .faq-panel {
  max-height: 200px;
}
.faq-panel p {
  padding-bottom: 1.25rem;
}

/* Gallery */
.gallery-item {
  position: relative;
  cursor: pointer;
}
.gallery-item img {
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 17, 32, 0.5) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.gallery-item:hover::after {
  opacity: 1;
}

/* Page banner */
.page-banner {
  position: relative;
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, rgba(15, 157, 88, 0.2) 100%);
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/banner.jpg') center/cover no-repeat;
  opacity: 0.25;
}
.page-banner .banner-inner {
  position: relative;
  z-index: 1;
}
.page-banner h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: #fff;
}
.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Quote badge */
.quote-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--gold);
  color: var(--navy);
  border-radius: 9999px;
  margin-left: 0.25rem;
}
.quote-badge--mobile {
  min-width: 1.5rem;
  height: 1.5rem;
  font-size: 0.75rem;
}

/* Quote toast */
.quote-toast {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: #fff;
  border: 1px solid rgba(15, 157, 88, 0.4);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.quote-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.quote-toast--success {
  border-color: var(--emerald);
}
.btn-outline-sm {
  transition: all 0.2s ease;
}
.btn-quote-added {
  background: rgba(15, 157, 88, 0.15) !important;
  border-color: var(--emerald) !important;
  color: var(--emerald) !important;
}

/* Gallery masonry page */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .gallery-masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}
.gallery-masonry-item {
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
  text-align: left;
}
.gallery-masonry-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 32, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-masonry-item:hover .gallery-masonry-overlay {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(7, 17, 32, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox--open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 0.5rem;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(15, 157, 88, 0.5);
}
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #94a3b8;
  font-size: 0.875rem;
  text-align: center;
  max-width: 90%;
}

/* Blog prose */
.prose-blog {
  color: #475569;
}
.prose-blog p {
  color: #475569;
  margin-bottom: 1rem;
}
.prose-blog h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--navy);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.prose-blog ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: #475569;
}
.prose-blog li {
  margin-bottom: 0.5rem;
  color: #475569;
}
.prose-blog strong {
  color: var(--navy);
}

.blog-post-full {
  scroll-margin-top: 7rem;
}

/* Values grid */
.value-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.value-card:hover {
  transform: translateY(-4px);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Reveal helper — GSAP handles visibility */
.reveal {
  visibility: hidden;
}

/* Industry icon ring */
.icon-ring {
  background: linear-gradient(135deg, rgba(15, 157, 88, 0.2) 0%, rgba(212, 175, 55, 0.15) 100%);
}

/* Stat counter */
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  border-radius: 2px;
}

/* Hero floating cards */
.hero-float-card {
  animation: float 6s ease-in-out infinite;
}

/* Section divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 157, 88, 0.4), transparent);
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}
