/* -------------------------------------------------------------
 * ferula.uz - Premium Agro-Industrial Design System
 * ------------------------------------------------------------- */

:root {
  --primary: #0C3825;
  --primary-dark: #072216;
  --primary-light: #165338;
  --accent: #D4AF37;
  --accent-light: #F3C54E;
  --accent-dark: #A9861E;
  --bg-sand: #FAF7F0;
  --bg-card: #FFFFFF;
  --text-main: #1C2826;
  --text-muted: #5C6B64;
  --text-light: #F0F4F2;
  --border: #E2DBD0;
  --shadow-sm: 0 4px 12px rgba(12, 56, 37, 0.05);
  --shadow-md: 0 10px 30px rgba(12, 56, 37, 0.08);
  --shadow-lg: 0 20px 45px rgba(12, 56, 37, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-sand);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* RTL Support for Dari / Persian */
html[dir="rtl"] {
  text-align: right;
}
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .lang-selector,
html[dir="rtl"] .features-list,
html[dir="rtl"] .product-meta {
  direction: rtl;
}
html[dir="rtl"] .floating-messengers {
  left: 20px;
  right: auto;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(12, 56, 37, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding: 14px 0;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.brand-logo .logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #FFFFFF;
}

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
}

.nav-menu a {
  color: #E2ECE7;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--accent);
}

/* Language Switcher */
.lang-selector {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 6px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lang-btn {
  background: none;
  border: none;
  color: #FFFFFF;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active, .lang-btn:hover {
  background: var(--accent);
  color: var(--primary-dark);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(7, 34, 22, 0.92) 0%, rgba(12, 56, 37, 0.85) 100%),
              url('../img/hero.jpg') center/cover no-repeat;
  color: #FFFFFF;
}

.hero-content {
  max-width: 780px;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 46px;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(212, 175, 55, 0.4);
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: #D2DFD8;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.45);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #FFFFFF;
}

/* Stats Row */
.stats-bar {
  background: #FFFFFF;
  margin-top: -40px;
  position: relative;
  z-index: 10;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat-card:last-child {
  border-right: none;
}

.stat-val {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Section Common */
.section {
  padding: 90px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px auto;
}

.section-badge {
  display: inline-block;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 16px;
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-img-wrap img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.feat-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #FFFFFF;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.feat-icon {
  width: 44px;
  height: 44px;
  background: rgba(12, 56, 37, 0.08);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.feat-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.feat-info p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Products Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.product-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.product-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.product-body p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
  flex-grow: 1;
}

.product-specs {
  list-style: none;
  background: var(--bg-sand);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.product-specs li {
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 6px;
}
.product-specs li:last-child { margin-bottom: 0; }

/* Investment Section */
.investment-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 70px 50px;
}

.investment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.inv-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.inv-step-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 20px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.inv-step-card h4 {
  color: var(--accent-light);
  font-size: 17px;
  margin-bottom: 6px;
}

.inv-step-card p {
  color: #D2DFD8;
  font-size: 14px;
}

/* Calculator Box */
.calc-box {
  background: #FFFFFF;
  color: var(--text-main);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.calc-slider-wrap {
  margin: 24px 0;
}

.calc-slider-wrap label {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
}

.calc-slider {
  width: 100%;
  height: 8px;
  background: #DDD;
  border-radius: 4px;
  outline: none;
  accent-color: var(--primary);
}

.calc-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.calc-result-card {
  background: var(--bg-sand);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
}

.calc-result-val {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 6px;
}

.calc-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Contact & RFQ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.messenger-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.btn-messenger {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 12px;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s ease;
}

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

.btn-whatsapp { background: #25D366; }
.btn-telegram { background: #0088CC; }
.btn-phone { background: var(--primary); }

.rfq-form-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 56, 37, 0.1);
}

/* Floating Messengers Pill */
.floating-messengers {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  font-size: 24px;
  transition: transform 0.2s ease;
}

.float-btn:hover {
  transform: scale(1.1);
}

.float-wa { background: #25D366; }
.float-tg { background: #0088CC; }

/* Footer */
.footer {
  background: var(--primary-dark);
  color: #A0B2AA;
  padding: 50px 0 25px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  font-size: 13px;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
  .hero h1 { font-size: 34px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .investment-grid, .contact-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .nav-menu { display: none; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
  .hero { min-height: auto; padding: 50px 0 70px 0; }
  .calc-results { grid-template-columns: 1fr; }
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  height: 280px;
  background: #000;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px;
  background: linear-gradient(to top, rgba(7, 34, 22, 0.9) 0%, rgba(7, 34, 22, 0) 100%);
  color: #FFFFFF;
}

.gallery-overlay h4 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

@media (max-width: 992px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card { height: 240px; }
}

/* 6-item Gallery Layout */
.gallery-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-grid-6 .gallery-card {
  height: 290px;
}

@media (max-width: 992px) {
  .gallery-grid-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .gallery-grid-6 { grid-template-columns: 1fr; }
  .gallery-grid-6 .gallery-card { height: 250px; }
}
