/* ═══════════════════════════════════════════════════════════

   Agrovaru Firmast v1.0

   Design: clean industrial, Jungheinrich brand palette

═══════════════════════════════════════════════════════════ */



/* Fonte laeb Divi teema — eraldi import pole vaja */



:root {

  --af-orange:   #ffcc02;

  --af-orange-d: #e6b800;

  --af-dark:     #111418;

  --af-mid:      #2d3340;

  --af-muted:    #6b7280;

  --af-border:   #e4e7ec;

  --af-surface:  #ffffff;

  --af-bg:       #f5f6f8;

  --af-radius:   12px;

  --af-shadow:   0 2px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);

  --af-shadow-h: 0 12px 40px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);

  --af-font:      inherit;

  --af-font-head: inherit;

  --af-container: 1160px;

}



/* ── BASE ──────────────────────────────────────────────── */

.af-page {

  font-family: var(--af-font);

  color: var(--af-dark);

  line-height: 1.6;

}

.af-container {

  max-width: var(--af-container);

  margin: 0 auto;

  padding: 0 32px;

}

@media (max-width: 600px) { .af-container { padding: 0 18px; } }

/* Divi rea/veeru laius mobiilis ei lähe 100%-le nii nagu builderis
   seadistatud — jääb ~80% peale, mis lisab .af-container 18px
   paddingule veel omalt poolt kitsenduse peale (topelt ääreruum).
   Sundida see rida/veerg tegelikult täislaiuseks, et .af-container
   enda padding jääks ainsaks ääreruumiks, nii nagu disainitud. */
@media (max-width: 980px) {
  .et_pb_row:has(.af-page),
  .et_pb_row:has(.af-page) > .et_pb_column {
    width: 100% !important;
    max-width: 100% !important;
  }
}



/* ── ADMIN BAR ─────────────────────────────────────────── */

/* ── SECTION LABEL ─────────────────────────────────────── */

.af-section-label {

  display: flex;

  align-items: center;

  gap: 14px;

  margin-bottom: 36px;

}

.af-section-label--center { justify-content: center; }

.af-section-label__line {

  height: 2px;

  flex: 1;

  background: linear-gradient(90deg, var(--af-orange), transparent);

  border-radius: 2px;

}

.af-section-label--center .af-section-label__line:last-child {

  background: linear-gradient(270deg, var(--af-orange), transparent);

}

.af-section-label__text {

  font-family: var(--af-font-head);

  font-size: 13px;

  font-weight: 700;

  letter-spacing: .14em;

  text-transform: uppercase;

  color: var(--af-orange);

  white-space: nowrap;

}



/* ══════════════════════════════════════════════════════════

   HERO

══════════════════════════════════════════════════════════ */

.af-hero {

  position: relative;

  background: var(--af-surface);

  border-bottom: 1px solid var(--af-border);

  padding: 80px 0 72px;

  overflow: hidden;

}

.af-hero__bg {

  position: absolute;

  inset: 0;

  background:

    radial-gradient(ellipse 60% 80% at 100% 50%, rgba(255,204,2,.07) 0%, transparent 60%);

}

.af-hero__bg::after {

  content: '';

  position: absolute;

  inset: 0;

  background: repeating-linear-gradient(

    90deg,

    transparent,

    transparent 79px,

    rgba(0,0,0,.015) 79px,

    rgba(0,0,0,.015) 80px

  );

}

.af-hero .af-container {

  position: relative;

  z-index: 1;

  max-width: 800px;

}

.af-hero__eyebrow {

  font-size: 13px;

  font-weight: 700;

  letter-spacing: .18em;

  text-transform: uppercase;

  color: var(--af-orange);

  margin: 0 0 16px;

  display: flex;

  align-items: center;

  gap: 12px;

}

.af-hero__eyebrow::before {

  content: '';

  display: inline-block;

  width: 36px;

  height: 2px;

  background: var(--af-orange);

  flex-shrink: 0;

}

.af-hero__title {

  font-size: clamp(30px, 4.5vw, 54px);

  font-weight: 900;

  line-height: 1.1;

  letter-spacing: -.01em;

  text-transform: uppercase;

  color: var(--af-dark);

  margin: 0 0 24px;

}

.af-hero__lead {

  font-size: clamp(15px, 1.6vw, 17px);

  line-height: 1.7;

  color: var(--af-muted);

  margin: 0;

  max-width: 580px;

}

.af-hero__scroll-hint { display: none; }



/* ══════════════════════════════════════════════════════════

   STATISTIKA

══════════════════════════════════════════════════════════ */

.af-stats {

  background: var(--af-orange);

  padding: 48px 0;

}

.af-stats__grid {

  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 0;

}

.af-stats__item {

  display: flex;

  flex-direction: column;

  align-items: center;

  text-align: center;

  padding: 12px 24px;

  position: relative;

}

.af-stats__item + .af-stats__item::before {

  content: '';

  position: absolute;

  left: 0;

  top: 20%;

  height: 60%;

  width: 1px;

  background: rgba(255,255,255,.3);

}

.af-stats__num {

  font-size: clamp(28px, 4vw, 44px);

  font-weight: 900;

  color: #111;

  line-height: 1;

  display: block;

}

.af-stats__label {

  font-size: 13px;

  font-weight: 400;

  color: #111;

  margin-top: 6px;

  text-transform: uppercase;

  letter-spacing: .06em;

  display: block;

}

@media (max-width: 680px) {

  .af-stats__grid { grid-template-columns: repeat(2, 1fr); }

  .af-stats__item:nth-child(3)::before { display: none; }

}



/* ══════════════════════════════════════════════════════════

   LUGU

══════════════════════════════════════════════════════════ */

.af-story {

  background: var(--af-surface);

  padding: 96px 0;

}

.af-story__inner {

  display: grid;

  grid-template-columns: 1fr 420px;

  gap: 80px;

  align-items: start;

}

.af-story__body p {

  font-size: 16px;

  line-height: 1.75;

  color: #3a3f47;

  margin: 0 0 20px;

}

.af-story__body p:last-child { margin-bottom: 0; }



/* Ajajoon-kaardid */

.af-story__visual {

  position: relative;

  display: flex;

  flex-direction: column;

  gap: 16px;

  padding-top: 8px;

}

.af-story__accent {

  position: absolute;

  left: 30px;

  top: 20px;

  bottom: 20px;

  width: 3px;

  background: linear-gradient(180deg, var(--af-orange) 0%, rgba(255,204,2,.1) 100%);

  border-radius: 2px;

}

.af-story__card {

  background: var(--af-bg);

  border: 1px solid var(--af-border);

  border-radius: var(--af-radius);

  padding: 20px 20px 20px 60px;

  position: relative;

  transition: transform .25s, box-shadow .25s;

}

.af-story__card:hover {

  transform: translateX(6px);

  box-shadow: var(--af-shadow);

}

.af-story__card::before {

  content: '';

  position: absolute;

  left: 30px;

  top: 50%;

  transform: translate(-50%, -50%);

  width: 12px;

  height: 12px;

  background: var(--af-orange);

  border-radius: 50%;

  border: 3px solid #fff;

  box-shadow: 0 0 0 2px var(--af-orange);

}

.af-story__card-year {

  font-family: var(--af-font-head);

  font-size: 22px;

  font-weight: 800;

  color: var(--af-orange);

  line-height: 1;

  margin-bottom: 4px;

}

.af-story__card-text {

  font-size: 14px;

  color: var(--af-mid);

  font-weight: 500;

}

@media (max-width: 900px) {

  .af-story__inner { grid-template-columns: 1fr; }

  .af-story__visual { order: -1; flex-direction: row; overflow-x: auto; padding-bottom: 8px; }

  .af-story__accent { display: none; }

  .af-story__card { min-width: 180px; padding: 16px 16px 16px 16px; }

  .af-story__card::before { display: none; }

}



/* ══════════════════════════════════════════════════════════

   BRÄNDID

══════════════════════════════════════════════════════════ */

.af-brands {

  background: var(--af-bg);

  padding: 80px 0;

}

.af-brands__grid {

  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 20px;

}

.af-brand-card {

  background: var(--af-surface);

  border: 1px solid var(--af-border);

  border-radius: var(--af-radius);

  padding: 28px 24px;

  text-decoration: none;

  color: var(--af-dark);

  display: flex;

  flex-direction: column;

  gap: 10px;

  position: relative;

  overflow: hidden;

  transition: transform .25s cubic-bezier(.22,.68,0,1.2), box-shadow .25s;

}

.af-brand-card:hover {

  transform: translateY(-6px);

  box-shadow: var(--af-shadow-h);

}

.af-brand-card__accent {

  position: absolute;

  top: 0; left: 0; right: 0;

  height: 3px;

  background: var(--af-orange);

  transform: scaleX(0);

  transform-origin: left;

  transition: transform .3s ease;

}

.af-brand-card:hover .af-brand-card__accent { transform: scaleX(1); }

.af-brand-card__name {

  font-family: var(--af-font-head);

  font-size: 22px;

  font-weight: 800;

  letter-spacing: .03em;

  text-transform: uppercase;

  margin: 0;

  color: var(--af-dark);

}

.af-brand-card__desc {

  font-size: 13px;

  color: var(--af-muted);

  line-height: 1.5;

  margin: 0;

  flex: 1;

}

.af-brand-card__arrow {

  font-size: 18px;

  color: var(--af-orange);

  align-self: flex-end;

  transition: transform .2s;

}

.af-brand-card:hover .af-brand-card__arrow { transform: translateX(4px); }

.af-brands__edit-note {

  text-align: center;

  margin-top: 20px;

  font-size: 12px;

}

.af-brands__edit-note a { color: var(--af-orange); text-decoration: none; }

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

@media (max-width: 500px)  { .af-brands__grid { grid-template-columns: 1fr; } }



/* ══════════════════════════════════════════════════════════

   LISASEKTSIOONID

══════════════════════════════════════════════════════════ */

.af-custom-section {

  background: var(--af-bg);

  padding: 72px 0;

  border-top: 1px solid var(--af-border);

}

.af-custom-section__body p {

  font-size: 16px;

  line-height: 1.75;

  color: #3a3f47;

  margin: 0 0 18px;

  max-width: 800px;

}

.af-custom-section__body p:last-child { margin-bottom: 0; }



.af-sections-admin-hint {

  text-align: center;

  padding: 20px;

  background: #fffbea;

  border-top: 1px dashed #e6c800;

}

.af-sections-admin-hint a {

  font-size: 13px;

  color: var(--af-orange);

  text-decoration: none;

  font-weight: 600;

}



/* ══════════════════════════════════════════════════════════

   KATVUS & KONTAKT

══════════════════════════════════════════════════════════ */

.af-coverage {

  background: var(--af-surface);

  padding: 80px 0;

}

.af-coverage__inner {

  display: grid;

  grid-template-columns: 1fr 340px;

  gap: 64px;

  align-items: start;

}

.af-coverage__body p {

  font-size: 16px;

  line-height: 1.75;

  color: #3a3f47;

  margin: 0 0 18px;

}

.af-coverage__body p:last-child { margin-bottom: 0; }



/* Kontaktinfo kaart */

.af-coverage__contact {

  background: var(--af-bg);

  border: 1px solid var(--af-border);

  border-radius: var(--af-radius);

  padding: 28px 24px;

  display: flex;

  flex-direction: column;

  gap: 18px;

}

.af-contact-item {

  display: flex;

  gap: 14px;

  align-items: flex-start;

}

.af-contact-item__icon {

  font-size: 18px;

  line-height: 1.4;

  flex-shrink: 0;

}

.af-contact-item__val {

  font-size: 15px;

  line-height: 1.55;

  color: var(--af-mid);

  font-style: normal;

}

a.af-contact-item__val--link {

  color: var(--af-mid);

  text-decoration: none;

  transition: color .15s;

}

a.af-contact-item__val--link:hover { color: var(--af-dark); }



@media (max-width: 860px) {

  .af-coverage__inner { grid-template-columns: 1fr; gap: 32px; }

}



/* ══════════════════════════════════════════════════════════

   CTA

══════════════════════════════════════════════════════════ */

.af-cta {

  background: var(--af-surface);

  border-top: 3px solid var(--af-orange);

  padding: 72px 0;

}

.af-cta::before { display: none; }

.af-cta__inner {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 48px;

}

.af-cta__title {

  font-size: clamp(24px, 3vw, 38px);

  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: .03em;

  color: var(--af-dark);

  margin: 0 0 10px;

}

.af-cta__body {

  font-size: 16px;

  color: var(--af-muted);

  margin: 0;

  max-width: 500px;

}

.af-cta__btn {

  display: inline-flex;

  align-items: center;

  gap: 12px;

  background: var(--af-orange);

  color: #fff;

  text-decoration: none;

  font-family: var(--af-font-head);

  font-size: 15px;

  font-weight: 700;

  letter-spacing: .08em;

  text-transform: uppercase;

  padding: 16px 36px;

  border-radius: 8px;

  white-space: nowrap;

  transition: background .2s, transform .15s, box-shadow .2s;

  flex-shrink: 0;

  box-shadow: 0 4px 20px rgba(255,204,2,.35);

}

.af-cta__btn:hover {

  background: var(--af-orange-d);

  transform: translateY(-2px);

  box-shadow: 0 8px 32px rgba(255,204,2,.45);

}

.af-cta__btn-arrow { font-size: 18px; transition: transform .2s; }

.af-cta__btn:hover .af-cta__btn-arrow { transform: translateX(4px); }

@media (max-width: 760px) {

  .af-cta__inner { flex-direction: column; text-align: center; }

  .af-cta__btn { align-self: center; }

}



/* ── Admin vihjed frontendis ── */

.af-admin-edit-hint {

  display: inline-flex;

  align-items: center;

  gap: 6px;

  font-size: 11px;

  color: #888;

  text-decoration: none;

  background: rgba(255,204,2,.1);

  border: 1px dashed rgba(255,204,2,.4);

  border-radius: 4px;

  padding: 5px 10px;

  transition: background .15s;

}

.af-admin-edit-hint:hover { background: rgba(255,204,2,.2); color: #555; }



/* Redigeeri-nupp */

.af-edit-trigger {

  position: absolute;

  top: -10px;

  right: -10px;

  width: 28px;

  height: 28px;

  background: var(--af-orange);

  color: #fff;

  border: none;

  border-radius: 50%;

  font-size: 12px;

  cursor: pointer;

  display: flex;

  align-items: center;

  justify-content: center;

  box-shadow: 0 2px 8px rgba(0,0,0,.2);

  opacity: 0;

  transition: opacity .15s;

  z-index: 100;

}

.af-editable:hover .af-edit-trigger { opacity: 1; }



/* Modal */

.af-edit-modal {

  position: fixed;

  inset: 0;

  background: rgba(0,0,0,.6);

  z-index: 99999;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 20px;

  backdrop-filter: blur(4px);

}

.af-edit-modal__box {

  background: #fff;

  border-radius: 12px;

  padding: 28px;

  width: 100%;

  max-width: 600px;

  box-shadow: 0 24px 80px rgba(0,0,0,.25);

}

.af-edit-modal__title {

  font-family: var(--af-font-head);

  font-size: 18px;

  font-weight: 700;

  margin: 0 0 16px;

  text-transform: uppercase;

  letter-spacing: .04em;

}

.af-edit-modal__input {

  width: 100%;

  border: 1px solid #ddd;

  border-radius: 6px;

  padding: 10px 14px;

  font-family: var(--af-font);

  font-size: 15px;

  resize: vertical;

  min-height: 80px;

  box-sizing: border-box;

  outline: none;

  transition: border-color .15s;

}

.af-edit-modal__input:focus { border-color: var(--af-orange); }

.af-edit-modal__label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #888; margin: 0 0 6px; }
.af-edit-modal__label + .af-edit-modal__input { margin-bottom: 16px; }
.af-tl-modal-year { min-height: 0 !important; resize: none; }

/* Ajajoone lohistamise käepide ja -olek */
.af-tl-drag {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255,185,0,.95);
  color: #1a1a1a;
  font-size: 14px;
  cursor: grab;
  z-index: 5;
}
.af-edit-active .af-tl-drag { display: flex; }
.af-tl-drag:active { cursor: grabbing; }
.af-edit-active .af-story__card--editable { cursor: pointer; }
.af-edit-active .af-story__card--editable:hover { outline: 2px dashed var(--af-orange); outline-offset: 2px; }
.af-tl-placeholder {
  background: #fffbee;
  border: 2px dashed #ffb900 !important;
  border-radius: var(--af-radius);
  visibility: visible !important;
}
.af-tl-placeholder * { opacity: 0; }
.ui-sortable-helper { opacity: .92; box-shadow: 0 12px 32px rgba(0,0,0,.25) !important; }

.af-edit-modal__actions {

  display: flex;

  gap: 10px;

  margin-top: 16px;

  justify-content: flex-end;

}

.af-edit-modal__save {

  background: var(--af-orange);

  color: #fff;

  border: none;

  border-radius: 6px;

  padding: 10px 24px;

  font-family: var(--af-font-head);

  font-size: 14px;

  font-weight: 700;

  letter-spacing: .06em;

  text-transform: uppercase;

  cursor: pointer;

  transition: background .18s;

}

.af-edit-modal__save:hover { background: var(--af-orange-d); }

.af-edit-modal__cancel {

  background: transparent;

  border: 1px solid #ddd;

  border-radius: 6px;

  padding: 10px 20px;

  font-size: 14px;

  cursor: pointer;

  color: #555;

}

.af-edit-modal__hint {

  font-size: 12px;

  color: #999;

  margin-top: 8px;

}

.af-edit-toast {

  position: fixed;

  bottom: 24px;

  right: 24px;

  background: #111;

  color: #fff;

  padding: 12px 20px;

  border-radius: 8px;

  font-size: 14px;

  z-index: 100000;

  display: flex;

  align-items: center;

  gap: 10px;

  box-shadow: 0 4px 20px rgba(0,0,0,.3);

  opacity: 0;

  transform: translateY(8px);

  transition: opacity .25s, transform .25s;

}

.af-edit-toast.af-toast--show { opacity: 1; transform: translateY(0); }

.af-edit-toast.af-toast--ok   { border-left: 4px solid #2ecc71; }

.af-edit-toast.af-toast--err  { border-left: 4px solid #e74c3c; }



/* ── MUUTMISREŽIIM (af-edit-active) ───────────────────── */

.af-edit-active .af-editable {

  position: relative;

  cursor: text;

  border-radius: 4px;

  outline: 1px dashed transparent;

  transition: outline .15s, background .15s;

}

.af-edit-active .af-editable:hover {

  outline: 1px dashed rgba(255,204,2,.55);

  background: rgba(255,204,2,.04);

}

.af-edit-active .af-editable.af-editing {

  outline: 2px solid var(--af-orange);

}

.af-edit-active .af-editable-richlink {

  position: relative;

  cursor: pointer;

  border-radius: 4px;

  outline: 1px dashed transparent;

  transition: outline .15s, background .15s;

}

.af-edit-active .af-editable-richlink:hover {

  outline: 1px dashed rgba(60,70,75,.55);

  background: rgba(60,70,75,.05);

}

.af-edit-active .af-editable-richlink:hover::after {

  content: "✏️ Muuda wp-admin lehel";

  position: absolute;

  top: -26px;

  left: 0;

  background: #3c464b;

  color: #fff;

  font-size: 11px;

  font-weight: 700;

  padding: 3px 8px;

  border-radius: 4px;

  white-space: nowrap;

  z-index: 5;

}


/* ── Tekstiplokkide taustavärvi eelvalikud (Hero juhtlause, Loo tekst,
 * Katvuse kirjeldus, CTA tekst, Lisasektsioonid) — sama palett, mis
 * agrovaru-teenindus pluginas, et kujundus oleks kogu saidil ühtne. ── */
.af-taust-hall,
.af-taust-sinakashall,
.af-taust-kreemikas,
.af-taust-kollane,
.af-taust-kuldne,
.af-taust-punane,
.af-taust-valge-raamiga,
.af-taust-tume,
.af-taust-tumepunane {
  padding: 20px 22px;
  border-radius: 10px;
}
.af-taust-hall          { background: #f8f8f6; }
.af-taust-sinakashall   { background: #eef0f1; }
.af-taust-kreemikas     { background: #faf8f3; }
.af-taust-kollane       { background: #fff6d9; }
.af-taust-kuldne        { background: #ffcc02; }
.af-taust-punane        { background: #fdeaea; }
.af-taust-valge-raamiga { background: #ffffff; border: 2px solid #ffb900; }
.af-taust-tume {
  background: #3c464b;
  color: #f2f2f0;
}
.af-taust-tume a       { color: #ffcc02; }
.af-taust-tume strong,
.af-taust-tume b       { color: #ffffff; }
.af-taust-tumepunane {
  background: #ca0101;
  color: #fff0f0;
}
.af-taust-tumepunane a     { color: #ffcc02; }
.af-taust-tumepunane strong,
.af-taust-tumepunane b     { color: #ffffff; }
