/* ===== YMC GROUP — SHARED STYLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Source Sans 3', sans-serif; background: #fff; color: #1a1a2e; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }

/* ── YMC BRAND TOKENS ── */
:root {
  --navy: #1f2b6b;
  --navy-dark: #0e1530;
  --red: #8b1a1a;
  --red-light: #a82020;
  --gold: #c9a84c;
  --off: #f5f4f0;
  --muted: #6b6b80;
  --border: rgba(31,43,107,0.12);

  /* Agriculture tokens */
  --agri-green: #5a9216;
  --agri-green-dark: #3d6610;
  --agri-green-light: #6aaa1a;
  --agri-earth: #2c3a1e;
  --agri-off: #f4f7ef;
}

/* ── DIAGONAL BRAND DIVIDER ── */
.brand-divider {
  width: 100%;
  height: 28px;
  position: relative;
  overflow: hidden;
  background: transparent;
}
.brand-divider svg { width: 100%; height: 100%; display: block; }

/* ── SHARED NAV ── */
.ymc-nav {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 72px;
  border-bottom: 3px solid var(--red);
}
.ymc-nav.navy-nav { background: #ffffff; border-bottom: 3px solid var(--red); }
.ymc-nav.agri-nav { background: #ffffff; border-bottom: 3px solid var(--agri-green); }

.nav-logo { display: flex; align-items: center; gap: 14px; }
.nav-logo img { height: 64px; width: auto; object-fit: contain; }
.nav-logo-text .brand-name { font-family: 'Source Sans 3', sans-serif; font-size: 14px; font-weight: 700; color: var(--navy); letter-spacing: 0.05em; letter-spacing: 0.05em; }
.nav-logo-text .brand-sub  { font-size: 10px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--navy); font-size: 13px; letter-spacing: 0.04em; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--red); }

.lang-toggle { display: flex; background: rgba(31,43,107,0.08); border: 1px solid rgba(31,43,107,0.2); border-radius: 20px; overflow: hidden; }
.lang-btn { padding: 5px 13px; font-size: 12px; color: var(--navy); cursor: pointer; transition: all .2s; user-select: none; }
.lang-btn.active { background: var(--red); color: #fff; }
.agri-nav .lang-btn.active { background: var(--agri-green); color: #fff; }

.nav-cta-btn { padding: 8px 22px; border: none; border-radius: 3px; font-size: 13px; letter-spacing: 0.05em; cursor: pointer; font-family: 'Source Sans 3', sans-serif; }
.nav-cta-btn.red-btn { background: var(--red); color: #fff; }
.nav-cta-btn.green-btn { background: var(--agri-green); color: #fff; }

/* Mobile nav toggle */
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: rgba(255,255,255,0.8); border-radius: 2px; }

/* ── HERO ── */
.ymc-hero {
  min-height: 580px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 80px 5%;
  text-align: center;
}
.ymc-hero.navy-hero { background: var(--navy-dark); }
.ymc-hero.agri-hero { background: var(--agri-earth); }

.hero-stripe {
  position: absolute; top: 0; right: 0; width: 42%; height: 100%;
  background: repeating-linear-gradient(-55deg, transparent, transparent 26px, rgba(255,255,255,0.04) 26px, rgba(255,255,255,0.04) 28px);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-eyebrow { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 18px; }
.navy-hero .hero-eyebrow { color: var(--gold); }
.agri-hero  .hero-eyebrow { color: var(--agri-green-light); }

.hero-title { font-family: 'Playfair Display', serif; font-size: 58px; color: #fff; line-height: 1.1; font-weight: 700; margin-bottom: 20px; }
.hero-title .accent { color: var(--red-light); }
.agri-hero .hero-title .accent { color: var(--agri-green-light); }

.hero-subtitle { font-size: 16px; color: rgba(255,255,255,0.55); margin-bottom: 10px; }
.hero-since { display: inline-block; font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: 0.12em; text-transform: uppercase; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 12px; margin-top: 14px; margin-bottom: 42px; }

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary-red  { background: var(--red); color: #fff; border: none; padding: 14px 36px; border-radius: 3px; font-size: 14px; letter-spacing: 0.06em; cursor: pointer; font-family: 'Source Sans 3', sans-serif; transition: background .2s; }
.btn-primary-red:hover  { background: var(--red-light); }
.btn-primary-green { background: var(--agri-green); color: #fff; border: none; padding: 14px 36px; border-radius: 3px; font-size: 14px; letter-spacing: 0.06em; cursor: pointer; font-family: 'Source Sans 3', sans-serif; transition: background .2s; }
.btn-primary-green:hover { background: var(--agri-green-light); }
.btn-outline-white { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 14px 36px; border-radius: 3px; font-size: 14px; letter-spacing: 0.06em; cursor: pointer; font-family: 'Source Sans 3', sans-serif; transition: border-color .2s; }
.btn-outline-white:hover { border-color: rgba(255,255,255,0.7); }

/* ── STATS BAR ── */
.stats-bar { display: flex; justify-content: center; flex-wrap: wrap; }
.stats-bar.red-bar   { background: var(--red); }
.stats-bar.green-bar { background: var(--agri-green-dark); }
.stat-item { padding: 22px 44px; text-align: center; border-right: 1px solid rgba(255,255,255,0.15); }
.stat-item:last-child { border-right: none; }
.stat-num   { font-family: 'Playfair Display', serif; font-size: 30px; color: #fff; font-weight: 700; }
.stat-label { font-size: 11px; color: rgba(255,255,255,0.65); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }

/* ── SECTION CHROME ── */
.section { padding: 80px 5%; }
.section-white  { background: #fff; }
.section-off    { background: var(--off); }
.section-navy   { background: var(--navy-dark); }
.section-agri   { background: var(--agri-off); }
.section-agri-dark { background: var(--agri-earth); }

.section-label {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.section-label.red-label   { color: var(--red); }
.section-label.green-label { color: var(--agri-green); }
.section-label.red-label::before   { content: ''; display: block; width: 28px; height: 1px; background: var(--red); }
.section-label.green-label::before { content: ''; display: block; width: 28px; height: 1px; background: var(--agri-green); }

.section-title { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700; margin-bottom: 10px; }
.section-title.dark  { color: var(--navy-dark); }
.section-title.light { color: #fff; }
.section-title.green { color: var(--agri-earth); }

.section-desc { font-size: 15px; color: var(--muted); max-width: 580px; line-height: 1.75; }
.section-desc.light { color: rgba(255,255,255,0.6); }
.section-desc.green-muted { color: #5a6b4a; }

/* ── CARDS ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 48px; }
.card {
  background: #fff; border-radius: 6px;
  border: 1px solid var(--border); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(26,36,86,0.12); }
.card-top { height: 160px; display: flex; align-items: flex-end; padding: 22px; position: relative; overflow: hidden; }
.card-top-icon { position: absolute; right: -8px; top: 50%; transform: translateY(-50%); font-size: 80px; opacity: 0.07; color: #fff; }
.card-tag  { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 5px; }
.card-name { font-family: 'Playfair Display', serif; font-size: 20px; color: #fff; font-weight: 700; }
.card-body { padding: 18px 22px 22px; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.65; margin-bottom: 14px; }
.card-link { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.card-link.red-link   { color: var(--red); }
.card-link.green-link { color: var(--agri-green); }
.card-link::after { content: '→'; }
.badge { display: inline-block; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; margin-bottom: 8px; }
.badge-active   { background: #e8f5e9; color: #2e7d32; }
.badge-done     { background: #f5f5f5; color: #888; }

/* ── TIMELINE (navy bg) ── */
.timeline { display: flex; flex-direction: column; gap: 20px; }
.tl-item  { display: flex; gap: 18px; align-items: flex-start; }
.tl-year  { font-size: 13px; font-weight: 700; min-width: 42px; padding-top: 2px; font-family: 'Source Sans 3', sans-serif; }
.tl-dot   { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.tl-text  { font-size: 13px; line-height: 1.5; }
.red-tl .tl-year  { color: var(--gold); }
.red-tl .tl-dot   { background: var(--red); }
.red-tl .tl-text  { color: rgba(255,255,255,0.65); }
.green-tl .tl-year { color: var(--agri-green-light); }
.green-tl .tl-dot  { background: var(--agri-green); }
.green-tl .tl-text { color: rgba(255,255,255,0.65); }

/* ── TWO-COL SPLIT ── */
.split { display: flex; gap: 72px; align-items: center; flex-wrap: wrap; }
.split-left, .split-right { flex: 1; min-width: 280px; }

/* ── PRODUCT GRID ── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-top: 36px; }
.product-item { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 22px 14px; text-align: center; }
.product-item i { font-size: 30px; color: var(--red); margin-bottom: 10px; }
.product-item.green-product i { color: var(--agri-green); }
.product-item p { font-size: 13px; color: var(--navy-dark); font-weight: 600; }

/* ── TRUSTED BY LOGOS ── */
.logos-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin-top: 36px; }
.logos-grid img { height: 44px; width: auto; object-fit: contain; filter: grayscale(100%); opacity: 0.6; transition: opacity .2s, filter .2s; }
.logos-grid img:hover { opacity: 1; filter: grayscale(0%); }

/* ── CONTACT SECTION ── */
.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item  { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon  { width: 40px; height: 40px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.contact-icon.red-icon   { background: #f9eaea; color: var(--red); }
.contact-icon.green-icon { background: #eaf3df; color: var(--agri-green); }
.contact-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2px; }
.contact-label.muted { color: var(--muted); }
.contact-val   { font-size: 14px; color: var(--navy-dark); }

/* ── FOOTER ── */
.ymc-footer { padding: 36px 5%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.ymc-footer.dark-footer { background: #080d1a; }
.ymc-footer.agri-footer { background: #1a2410; }
.footer-copy  { font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,0.3); transition: color .2s; }
.footer-links a:hover { color: rgba(255,255,255,0.7); }
.footer-parent { font-size: 11px; color: rgba(255,255,255,0.2); letter-spacing: 0.1em; text-transform: uppercase; }
.footer-parent a { color: rgba(255,255,255,0.4); }
.footer-parent a:hover { color: rgba(255,255,255,0.8); }

/* ── SERVICES CARDS ── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; margin-top: 48px; }
.service-card { border-radius: 6px; padding: 32px 28px; border: 1px solid var(--border); background: #fff; }
.service-card i { font-size: 36px; margin-bottom: 16px; }
.service-card.red-svc i   { color: var(--red); }
.service-card.green-svc i { color: var(--agri-green); }
.service-card h3 { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--navy-dark); margin-bottom: 10px; }
.service-card.green-svc h3 { color: var(--agri-earth); }
.service-card p  { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ── ARABIC RTL ── */
html[dir="rtl"] body { font-family: 'Noto Kufi Arabic', sans-serif; }
html[dir="rtl"] .section-label::before { display: none; }
html[dir="rtl"] .section-label::after  { content: ''; display: block; width: 28px; height: 1px; }
html[dir="rtl"] .section-label.red-label::after   { background: var(--red); }
html[dir="rtl"] .section-label.green-label::after { background: var(--agri-green); }
html[dir="rtl"] .hero-title { font-family: 'Noto Serif Arabic', serif; }
html[dir="rtl"] .section-title { font-family: 'Noto Serif Arabic', serif; }
html[dir="rtl"] .card-name { font-family: 'Noto Serif Arabic', serif; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero-title   { font-size: 38px; }
  .section      { padding: 56px 5%; }
  .stat-item    { padding: 18px 24px; }
  .split        { gap: 40px; }
  .nav-links, .lang-toggle, .nav-cta-btn { display: none; }
  .nav-hamburger { display: flex; }
  .ymc-nav.mobile-open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--navy-dark); padding: 20px 5%;
    gap: 18px; z-index: 300;
  }
}

/* Agriculture white nav overrides */
.agri-nav .nav-logo-text .brand-name { color: var(--agri-green-dark); }
.agri-nav .nav-logo-text .brand-sub  { color: #5a6b4a; }
.agri-nav .nav-links a               { color: var(--agri-earth); }
.agri-nav .nav-links a:hover         { color: var(--agri-green); }
.agri-nav .lang-toggle               { background: rgba(90,146,22,0.1); border-color: rgba(90,146,22,0.3); }
.agri-nav .lang-btn                  { color: var(--agri-earth); }
.agri-nav .nav-cta-btn.green-btn     { background: var(--agri-green); color: #fff; }

/* ===== FULL MOBILE OVERHAUL ===== */
@media (max-width: 768px) {

  /* NAV */
  .ymc-nav {
    padding: 0 4%;
    height: 64px;
    flex-wrap: nowrap;
  }
  .nav-logo img { height: 40px !important; }
  .nav-logo-text .brand-name { font-size: 12px; }
  .nav-logo-text .brand-sub  { display: none; }
  .nav-links, .lang-toggle, .nav-cta-btn { display: none !important; }
  .nav-hamburger {
    display: flex !important;
    z-index: 400;
  }
  .nav-hamburger span { background: #555; }
  .navy-nav .nav-hamburger span,
  .agri-nav .nav-hamburger span { background: #333; }

  /* Mobile open menu */
  .ymc-nav.mobile-open .nav-links {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: #ffffff;
    padding: 20px 6%;
    gap: 16px;
    z-index: 350;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-top: 1px solid rgba(0,0,0,0.08);
  }
  .ymc-nav.mobile-open .nav-links a {
    font-size: 15px;
    color: #1a1a2e !important;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .navy-nav.mobile-open .nav-links { background: #0e1530; }
  .navy-nav.mobile-open .nav-links a { color: rgba(255,255,255,0.85) !important; border-bottom-color: rgba(255,255,255,0.1); }

  /* HERO */
  .ymc-hero { min-height: auto; padding: 60px 5% 50px; }
  .hero-title { font-size: 34px !important; }
  .hero-eyebrow { font-size: 10px; }
  .hero-since { font-size: 10px; margin-bottom: 28px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .hero-btns button { width: 100%; max-width: 280px; }

  /* STATS */
  .stats-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .stat-item { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.15); padding: 16px 10px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 10px; }

  /* SECTIONS */
  .section { padding: 48px 5%; }
  .section-title { font-size: 26px; }
  .section-desc { font-size: 14px; }

  /* SPLIT — stack vertically */
  .split { flex-direction: column; gap: 36px; }
  .split-left, .split-right { min-width: 100%; }

  /* CARDS */
  .cards-grid { grid-template-columns: 1fr; gap: 16px; }
  .services-grid { grid-template-columns: 1fr; gap: 16px; }

  /* PRODUCT GRID */
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .prod-item p { font-size: 11px; }

  /* LOGOS */
  .sup-logos { gap: 16px; }
  .sup-logos img { height: 36px !important; }
  .client-logos { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .client-logos img { height: 44px !important; }
  .logos-grid img { height: 32px; }

  /* FOOTER */
  .ymc-footer { flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px 5%; }
  .footer-links { flex-wrap: wrap; gap: 14px; }

  /* BRAND DIVIDER — hide on mobile to avoid overlap */
  .brand-divider { display: none; }
  .pdiv { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 28px !important; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .client-logos { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 14px 8px; }
}
