/*
Theme Name: Below Farm Replica
Theme URI: https://www.below.farm/
Author: Fyzen
Description: Lightweight Elementor-friendly WordPress theme styled to match the Below Farm site shell, with an editable WordPress navigation header, cream canvas, and custom Below Farm footer.
Version: 1.4.1
Text Domain: below-farm-replica
*/

:root {
  --bf-cream: #fffDED;
  --bf-ink: #191007;
  --bf-body: #2c2c2c;
  --bf-link: #a56a35;
  --bf-circle: #f8f9fa;
  --bf-circle-border: #efeee6;
}

html {
  margin: 0;
  padding: 0;
  background: var(--bf-cream);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bf-cream);
  color: var(--bf-body);
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after {
  box-sizing: border-box;
}

a {
  color: var(--bf-link);
  text-decoration: none;
}

a:hover,
a:focus {
  color: #875126;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------
   BELOW FARM HEADER
--------------------------------------------------------- */
.bf-site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  height: 62px;
  margin: 0;
  background: var(--bf-cream);
  border-top: 2px solid #242424;
  border-bottom: 1px solid rgba(25, 16, 7, .04);
}

.bf-header__inner {
  position: relative;
  width: min(1228px, calc(100% - 44px));
  height: 60px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 28px;
}

.bf-header__brand {
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.bf-header__brand .custom-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.bf-header__brand .custom-logo {
  display: block;
  width: auto;
  max-width: 34px;
  height: 34px;
  max-height: 34px;
  object-fit: contain;
}

.bf-header__logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #987249;
}

.bf-header__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border: 1px solid #d8c8a5;
  border-radius: 50%;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 10px;
  font-weight: 700;
}

.bf-header__nav {
  min-width: 0;
}

.bf-header__menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 38px;
}

.bf-header__menu li {
  position: relative;
  margin: 0;
  padding: 0;
}

.bf-header__menu a {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  color: #6d6a65;
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: color .16s ease;
}

.bf-header__menu a:hover,
.bf-header__menu a:focus,
.bf-header__menu .current-menu-item > a,
.bf-header__menu .current_page_item > a,
.bf-header__menu .current-menu-ancestor > a {
  color: #111;
}

.bf-header__menu .sub-menu {
  position: absolute;
  left: -16px;
  top: calc(100% - 4px);
  min-width: 200px;
  margin: 0;
  padding: 10px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  border: 1px solid #ece7d7;
  border-radius: 8px;
  background: var(--bf-cream);
  box-shadow: 0 10px 30px rgba(25,16,7,.08);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.bf-header__menu li:hover > .sub-menu,
.bf-header__menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bf-header__menu .sub-menu a {
  min-height: 0;
  width: 100%;
  padding: 9px 10px;
  font-size: 13px;
}

.bf-header__actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
}

.bf-header__search-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  margin: 0 7px 0 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #f4f0df;
  color: #111;
  cursor: pointer;
}

.bf-header__search-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.bf-header__search-panel {
  position: absolute;
  top: 51px;
  right: 245px;
  width: 300px;
  padding: 10px;
  border: 1px solid #ece7d7;
  border-radius: 9px;
  background: var(--bf-cream);
  box-shadow: 0 10px 30px rgba(25,16,7,.09);
}

.bf-header__search-panel[hidden] {
  display: none !important;
}

.bf-header__search-form {
  display: flex;
  gap: 7px;
}

.bf-header__search-form label {
  flex: 1;
}

.bf-header__search-form input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #ded8c8;
  border-radius: 6px;
  background: #fffef7;
  color: #222;
  font: inherit;
  font-size: 13px;
}

.bf-header__search-form button {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #ded8c8;
  border-radius: 6px;
  background: #fffef7;
  color: #222;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.bf-header__socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bf-header__social {
  width: 20px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bf-header__social svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.bf-header__social--facebook { color: #3159a0; }
.bf-header__social--linkedin { color: #2a71a8; }
.bf-header__social--instagram { color: #dc4f77; }


.bf-header__menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: #f4f0df;
}

.bf-header__menu-toggle > span:not(.screen-reader-text) {
  display: block;
  width: 20px;
  height: 1.5px;
  margin: 4px auto;
  background: #222;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bf-site,
.bf-site-main,
.bf-page-content {
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--bf-cream);
}

/* Prevent classic WordPress content wrappers from introducing gutters. */
.bf-page-content > *:first-child {
  margin-top: 0;
}

.bf-page-content > *:last-child {
  margin-bottom: 0;
}


@media (max-width: 1050px) {
  .bf-header__inner {
    width: min(100% - 30px, 1228px);
    grid-template-columns: 42px minmax(0, 1fr) auto;
    column-gap: 20px;
  }

  .bf-header__menu { gap: 24px; }
  .bf-header__menu a { font-size: 14px; }
  .bf-header__socials { gap: 11px; }
  .bf-header__search-toggle { margin-right: 2px; }
}

@media (max-width: 850px) {
  .bf-site-header { height: 64px; }

  .bf-header__inner {
    height: 62px;
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .bf-header__brand { grid-column: 1; grid-row: 1; }

  .bf-header__menu-toggle {
    display: inline-block;
    grid-column: 2;
    grid-row: 1;
  }

  .bf-header__nav {
    position: absolute;
    top: 62px;
    left: -15px;
    right: -15px;
    display: none;
    padding: 12px 20px 18px;
    border-top: 1px solid #ece7d7;
    border-bottom: 0;
    background: var(--bf-cream);
  }

  .bf-header__nav.is-open { display: block; }

  .bf-header__menu {
    display: block;
  }

  .bf-header__menu li { display: block; }

  .bf-header__menu a {
    width: 100%;
    min-height: 0;
    padding: 11px 0;
  }

  .bf-header__menu .sub-menu {
    position: static;
    min-width: 0;
    padding: 0 0 0 16px;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    box-shadow: none;
  }

  .bf-header__actions {
    position: absolute;
    top: calc(62px + var(--bf-mobile-nav-height, 0px));
    left: -15px;
    right: -15px;
    display: none;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0 20px 18px;
    border-bottom: 1px solid #ece7d7;
    background: var(--bf-cream);
    box-shadow: 0 8px 20px rgba(25,16,7,.06);
    pointer-events: none;
  }

  .bf-header__nav.is-open + .bf-header__actions {
    display: flex;
    pointer-events: auto;
  }

  .bf-header__search-panel {
    top: calc(100% - 10px);
    left: 20px;
    right: auto;
  }
}

@media (max-width: 520px) {
  .bf-header__socials { gap: 9px; }
  .bf-header__search-panel { width: min(300px, calc(100vw - 40px)); }
}

/* ---------------------------------------------------------
   BELOW FARM FOOTER
--------------------------------------------------------- */
.bf-footer {
  width: 100%;
  margin: 0;
  background: var(--bf-cream);
  color: var(--bf-body);
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
}

.bf-footer__inner {
  width: min(1228px, calc(100% - 48px));
  min-height: 334px;
  margin: 0 auto;
  padding: 51px 0 16px;
  display: flex;
  flex-direction: column;
}

.bf-footer__grid {
  display: grid;
  grid-template-columns: 136px 540px 300px;
  column-gap: 70px;
  align-items: start;
}

.bf-footer__title,
.bf-footer__statement {
  margin: 0;
  color: var(--bf-ink);
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 700;
}

.bf-footer__title {
  font-size: 23px;
  line-height: 1.05;
  margin-bottom: 17px;
}

.bf-footer__statement {
  font-size: 27px;
  line-height: 1.05;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  margin: 38px 0 12px;
}

.bf-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bf-footer__links li {
  margin: 0 0 5px;
  padding: 0;
  line-height: 1.25;
}

.bf-footer__links a,
.bf-footer__contact-row,
.bf-footer__copy,
.bf-footer__description {
  font-size: 14px;
}

.bf-footer__links a {
  color: var(--bf-link);
  transition: opacity .18s ease;
}

.bf-footer__links a:hover,
.bf-footer__links a:focus {
  opacity: .72;
}

.bf-footer__description {
  max-width: 520px;
  margin: 0;
  color: #2d2d2d;
  line-height: 1.65;
}

.bf-footer__connect {
  padding-top: 1px;
}

.bf-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 3px;
}

.bf-footer__contact-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--bf-link);
  line-height: 1.2;
}

.bf-footer__contact-row svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: var(--bf-ink);
}

.bf-footer__socials {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 21px;
}

.bf-footer__social {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--bf-circle-border);
  background: var(--bf-circle);
  box-shadow: 0 2px 5px rgba(25, 16, 7, .05);
  transition: transform .18s ease, box-shadow .18s ease;
}

.bf-footer__social:hover,
.bf-footer__social:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 9px rgba(25, 16, 7, .08);
}

.bf-footer__social svg {
  width: 16px;
  height: 16px;
  display: block;
}

.bf-footer__social--facebook svg { fill: #4267a9; }
.bf-footer__social--linkedin svg { fill: #1478b7; }
.bf-footer__social--instagram svg { fill: #df477d; }
.bf-footer__social--whatsapp svg { fill: #39d365; }

.bf-footer__copy {
  margin-top: auto;
  padding-top: 28px;
  color: #77736d;
  line-height: 1.2;
}

/* Elementor / WordPress shell cleanup */
body.elementor-page .site,
body.elementor-page .site-content,
body.elementor-page .content-area,
body.elementor-page main,
body.elementor-page article {
  margin: 0;
  padding: 0;
}

@media (max-width: 1120px) {
  .bf-footer__grid {
    grid-template-columns: 150px minmax(320px, 1fr) 260px;
    column-gap: 44px;
  }
}

@media (max-width: 900px) {
  .bf-footer__inner {
    min-height: 0;
    padding: 48px 0 28px;
  }

  .bf-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 42px 50px;
  }

  .bf-footer__about {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .bf-footer__statement {
    margin-top: 0;
  }

  .bf-footer__links-col {
    grid-column: 1;
    grid-row: 2;
  }

  .bf-footer__connect {
    grid-column: 2;
    grid-row: 2;
  }

  .bf-footer__copy {
    margin-top: 45px;
  }
}

@media (max-width: 620px) {
  .bf-footer__inner {
    width: min(100% - 36px, 1228px);
    padding-top: 40px;
  }

  .bf-footer__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .bf-footer__about,
  .bf-footer__links-col,
  .bf-footer__connect {
    grid-column: 1;
    grid-row: auto;
  }

  .bf-footer__about { order: 1; }
  .bf-footer__links-col { order: 2; }
  .bf-footer__connect { order: 3; }

  .bf-footer__statement {
    font-size: 25px;
  }

  .bf-footer__copy {
    margin-top: 38px;
  }
}
