/* ==========================================================================
   INDOAGROTRADE - PREMIUM B2B DESIGN SYSTEM & STYLES (style.css)
   Adopting & Recreating misefa.com with UI/UX Pro Max & 21first.dev Aesthetics
   ========================================================================== */

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

/* Core Custom Properties */
:root {
  /* Color Palette - NextLevelBuilder Pro HSL System */
  --bg-onyx: hsl(140, 20%, 4%);
  --bg-card: hsl(140, 15%, 8%);
  --bg-card-hover: hsl(140, 15%, 12%);
  --primary: hsl(142, 72%, 29%);
  --primary-light: hsl(142, 70%, 45%);
  --accent: hsl(45, 93%, 47%);
  --accent-glow: hsla(45, 93%, 47%, 0.15);
  --text-primary: hsl(210, 20%, 98%);
  --text-secondary: hsl(210, 10%, 75%);
  --text-muted: hsl(210, 8%, 55%);
  --border-color: hsla(140, 15%, 20%, 0.4);
  --border-glow: hsla(142, 72%, 29%, 0.3);
  
  /* Fonts */
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transitions & Shadows */
  --transition-spring: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  --transition-smooth: all 0.3s ease;
  --shadow-premium: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 30px hsla(142, 72%, 29%, 0.25);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Base Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-onyx);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background Grid Overlay - 21first.dev style */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
}

/* Glassmorphism Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(6, 13, 8, 0.75);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 0.85rem 2rem;
  background-color: rgba(6, 13, 8, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.nav-brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-btn {
  background-color: var(--primary);
  color: var(--text-primary);
  border: 1px solid var(--primary-light);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-spring);
}

.nav-btn:hover {
  background-color: var(--accent);
  color: var(--bg-onyx);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

/* Hero Section with Interactive Particles */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, hsla(142, 72%, 29%, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(80px);
}

.badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(251, 191, 36, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.1);
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 900px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary-light) 70%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  max-width: 650px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Bento Grid System */
.bento-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  z-index: 2;
  position: relative;
}

.bento-card {
  grid-column: span 12;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-spring);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-premium), var(--shadow-glow);
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(16, 185, 129, 0.08), transparent 40%);
  pointer-events: none;
  z-index: 3;
}

/* Bento Sizing Templates */
.col-4 { grid-column: span 4; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

@media (max-width: 991px) {
  .col-4, .col-8, .col-6 {
    grid-column: span 12;
  }
}

/* Product Cards Carousel / Grid inside Bento */
.products-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin-top: 2rem;
}

.product-item {
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition-spring);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--accent);
}

.product-badge {
  align-self: flex-start;
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Landed Cost Calculator - Premium Feature */
.calc-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .calc-container {
    grid-template-columns: 1fr;
  }
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group select, .form-group input {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-group select:focus, .form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
  background-color: rgba(255, 255, 255, 0.05);
}

.calc-results {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row span:first-child {
  color: var(--text-secondary);
}

.result-row span:last-child {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}

.result-highlight {
  color: var(--accent) !important;
}

/* Shipping Route Map (SVG Animation) */
.map-wrapper {
  width: 100%;
  height: 350px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  margin-top: 1.5rem;
  border: 1px solid var(--border-color);
}

/* Interactive Tabs for Map/Logistics */
.map-tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.map-tab {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.map-tab:hover, .map-tab.active {
  background-color: var(--primary);
  border-color: var(--primary-light);
  color: var(--text-primary);
}

/* Animated SVG Map Path */
.route-path {
  stroke-dasharray: 10;
  animation: dash 30s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -1000;
  }
}

.pulse-dot {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    r: 4;
    opacity: 1;
  }
  100% {
    r: 12;
    opacity: 0;
  }
}

/* Contact & Inquiry Layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Footer styling */
footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem 2rem;
  background-color: rgba(0, 0, 0, 0.4);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Arabic Translation Right-to-Left (RTL) helper */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

/* ==========================================================================
   21FIRST.DEV & NEXTLEVELBUILDER AESTHETICS - EXTRA FX
   ========================================================================== */

/* Custom Spring Cursor Glow */
.cursor-glow {
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent);
  background-color: transparent;
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  box-shadow: 0 0 15px var(--accent-glow);
  mix-blend-mode: difference;
  opacity: 0;
}

body:hover .cursor-glow {
  opacity: 1;
}

/* Interactive Floating Background Blobs */
.blob {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.08;
  pointer-events: none;
  animation: float-blobs 30s infinite alternate ease-in-out;
}

.blob-1 {
  background-color: var(--primary-light);
  top: 10%;
  left: -15%;
}

.blob-2 {
  background-color: var(--accent);
  bottom: 20%;
  right: -15%;
  animation-delay: -7s;
}

.blob-3 {
  background-color: hsl(200, 70%, 40%);
  top: 50%;
  left: 30%;
  animation-delay: -14s;
  width: 450px;
  height: 450px;
}

@keyframes float-blobs {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(120px, 90px) scale(1.15) rotate(180deg);
  }
  100% {
    transform: translate(-60px, 160px) scale(0.9) rotate(360deg);
  }
}

/* Bento Card 3D Setup */
.bento-container {
  perspective: 1500px;
}

.bento-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s ease-out, border-color 0.3s, box-shadow 0.3s;
}

/* 21st.dev Style Infinite Marquee Slider */
.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.01);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  display: flex;
  position: relative;
  z-index: 10;
}

.marquee-content {
  display: flex;
  gap: 4rem;
  white-space: nowrap;
  animation: marquee-scroll 25s linear infinite;
}

.marquee-content span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.marquee-content span:hover {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* FAQ Accordion Styling */
.faq-item.active {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-color: var(--border-glow) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.faq-item.active .faq-trigger i {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-content p {
  padding-bottom: 1.25rem;
  line-height: 1.6;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE FIXES
   ========================================================================== */
@media (max-width: 768px) {
  /* Navbar adjustments */
  .navbar {
    padding: 0.75rem 1rem !important;
  }
  
  .nav-links {
    display: none !important; /* Hide desktop menu links */
  }
  
  #lang-btn {
    display: none !important; /* Hide lang toggle on mobile to save space */
  }
  
  .nav-brand {
    font-size: 1rem !important;
  }
  
  .nav-brand svg {
    width: 28px !important;
    height: 28px !important;
  }
  
  .nav-brand div span:first-child {
    font-size: 1rem !important;
  }
  
  .nav-brand div span:last-child {
    font-size: 0.5rem !important;
  }
  
  .nav-btn {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
  }
  
  /* Hero adjustments */
  .hero {
    padding: 6rem 1rem 3rem !important;
    min-height: auto !important;
  }
  
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }
  
  .hero-subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 1.5rem !important;
    padding: 0 0.5rem !important;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  
  .hero-cta .nav-btn {
    width: 100% !important;
    text-align: center;
    justify-content: center;
  }
  
  /* Bento general padding */
  .bento-card {
    padding: 1.5rem !important;
  }
  
  /* Map & Calculator */
  .calc-container {
    grid-template-columns: 1fr !important;
  }
  
  .map-wrapper {
    height: 250px !important;
  }
  
  /* Contact Form */
  #inquiry-form {
    grid-template-columns: 1fr !important;
  }
  
  #inquiry-form > div {
    grid-column: span 1 !important;
  }
  
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
  
  .contact-grid > div:last-child {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--border-color) !important;
    padding-top: 2rem !important;
  }
}



