/* Ann Slater Organics — static rebuild of the WordPress/The7 site */

:root {
  --accent: #bf4444;
  --rose: #d63259;
  --header: #abc892;
  --nav: #717c37;
  --text: #85868c;
  --heading: #333333;
  --muted: #b4b5bb;
  --link: #1ebbf0;
  --boxes: #f7f7f7;
  --footer: #1a1c20;
  --box: 1140px;
  --gutter: 70px;
  --font: "Roboto", Helvetica, Arial, Verdana, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 25px;
  color: var(--text);
  background: #f7f7f7 url("../images/bgtest.jpg") left top / cover no-repeat fixed;
}

img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { text-decoration: none; }

h1, h2, h3, h4 { color: var(--heading); font-weight: 700; margin: 0 0 10px; }
h1 { font-size: 44px; line-height: 54px; }
h2 { font-size: 34px; line-height: 44px; }
h3 { font-size: 24px; line-height: 34px; }
h4 { font-size: 20px; line-height: 30px; }
p { margin: 0 0 10px; }
ul { margin: 0 0 10px; padding-left: 20px; }

.center { text-align: center; }
.inline-center { display: block; margin: 0 auto; }
.accent { color: var(--rose); }

/* ---------- Boxed page ---------- */
.page {
  max-width: var(--box);
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.12);
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header (logo centred, menu bar below) ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--header);
  box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.07);
}

.branding { display: flex; justify-content: center; }
.logo { display: block; line-height: 0; }
.logo img { width: 786px; height: auto; }

.navigation { background: var(--nav); }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  margin: 18px 14px;
  padding: 4px;
  color: var(--heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 21px;
  text-decoration: none;
}

.main-nav li:first-child a { margin-left: 0; }
.main-nav li:last-child a { margin-right: 0; }

/* The7 "underline, left to right" menu decoration */
.main-nav a span { position: relative; display: block; }

.main-nav a span::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.85;
  transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.main-nav a:hover span::after,
.main-nav a:focus-visible span::after,
.main-nav .act span::after { width: 100%; }

/* ---------- Mobile menu ---------- */
.menu-toggle {
  display: none;
  position: absolute;
  right: 20px;
  top: 50%;
  width: 26px;
  height: 22px;
  margin-top: -11px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin-bottom: 6px;
  background: #fff;
  border-radius: 2px;
  transition: width 0.3s;
}

.menu-toggle span:last-child { margin-bottom: 0; }
.menu-toggle:hover span:nth-child(2) { width: 70%; margin-left: auto; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: 300px;
  max-width: 85vw;
  padding: 45px 15px 30px 30px;
  background: var(--header);
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.13, 0.62, 0.11, 0.99), visibility 0.5s;
}

.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { border-top: 1px solid rgba(51, 51, 51, 0.12); }
.mobile-menu li:first-child { border-top: 0; }

.mobile-menu a {
  display: block;
  padding: 11px 0;
  color: var(--heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-menu a:hover,
.mobile-menu .act a { color: var(--accent); }

/* Close button sits outside the panel, like The7's "outside menu" close icon */
.mobile-menu-close {
  position: fixed;
  top: 0;
  right: min(300px, 85vw);
  z-index: 210;
  width: 30px;
  height: 30px;
  padding: 0;
  background: var(--accent);
  border: 0;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.mobile-menu-close span {
  position: absolute;
  top: 14px;
  left: 7px;
  width: 16px;
  height: 2px;
  background: #fff;
  transform: rotate(45deg);
  transition: transform 0.3s;
}

.mobile-menu-close span + span { transform: rotate(-45deg); }
.mobile-menu-close:hover span { transform: rotate(135deg); }
.mobile-menu-close:hover span + span { transform: rotate(45deg); }

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { transform: translateX(0); visibility: visible; }
body.menu-open .menu-overlay,
body.menu-open .mobile-menu-close { opacity: 1; visibility: visible; }

/* ---------- Home slideshow (Revolution Slider replacement) ---------- */
.slideshow {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #fff;
}

.slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active { opacity: 1; z-index: 1; }

/* First slide fades in on load, like the slider's "Fade In" layer timeline */
.slide:first-child.active { animation: slideIn 1s ease-in-out both; }

@keyframes slideIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Page title bar ---------- */
.page-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 25px var(--gutter) 20px;
  background: var(--boxes);
  text-align: center;
}

.page-title h1 {
  margin: 0;
  color: var(--heading);
  font-size: 30px;
  line-height: 40px;
  text-transform: uppercase;
}

.breadcrumbs {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 23px;
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 7px; opacity: 0.6; }

/* ---------- Main content ---------- */
.main { padding: 70px 0; }
.main::after { content: ""; display: block; clear: both; }

/* The content "boxes": 880px + 20px padding with a double rose rule underneath */
.box {
  max-width: 920px;
  margin: 5px;
  padding: 20px;
  border-bottom: 4px double var(--rose);
}

.box::after { content: ""; display: block; clear: both; }
.box-plain { border-bottom: 0; }
.box-photos { padding: 15px; }

/* Home quote */
.quote-panel {
  padding: 0 0 10px;
  background: var(--boxes);
  overflow: hidden;
}

.quote-panel .box { margin: 5px; }

.fb-link { margin: 10px 0 0; text-align: center; font-weight: 700; }
.fb-link a { color: var(--heading); }
.fb-link a:hover { color: var(--accent); }

/* About */
.about-intro { display: flex; gap: 10px; align-items: flex-start; }
.about-photo { flex: 0 0 320px; padding: 10px; margin: 5px; }
.about-photo img { display: block; }
.about-text { flex: 0 1 540px; padding: 10px; margin: 5px; }
.box-inner { padding: 20px; margin: 5px; }

/* Market photos */
.photo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 293px));
}

.photo-row a,
.box-plain .lightbox { display: block; line-height: 0; }
.photo-row img { display: block; width: 100%; }
.link-list a { line-height: 25px; }

/* Image hover (The7 rollover) */
.lightbox, .rollover { position: relative; display: block; overflow: hidden; }

.lightbox img, .rollover img { transition: opacity 0.4s, transform 0.6s; }
.lightbox:hover img { opacity: 0.85; }

.rollover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(191, 68, 68, 0.2);
  opacity: 0;
  transition: opacity 0.4s;
}

.rollover:hover::after { opacity: 1; }

/* Vegetable forecast */
.forecast-chart { width: 650px; }

/* Squash */
.squash-list { padding-left: 13px; }
.squash-list li { margin-bottom: 10px; }
.squash-list p { margin: 0; }

/* ---------- Recipes (blog list + sidebar) ---------- */
.with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
}

.content-col { padding-right: 50px; border-right: 1px solid rgba(0, 0, 0, 0.06); }
.sidebar { padding-left: 50px; }

.post-card {
  display: grid;
  grid-template-columns: 30% 70%;
  padding: 25px;
  background: var(--boxes);
}

.post-media { padding-right: 30px; }
.post-media img { display: block; width: 100%; }

.post-card .entry-title { margin: 0 0 5px; font-size: 20px; line-height: 30px; }
.post-card .entry-title a { color: var(--heading); text-decoration: none; transition: color 0.2s; }
.post-card .entry-title a:hover { color: var(--accent); }

.entry-meta { margin-bottom: 10px; color: var(--muted); font-size: 12px; line-height: 20px; }
.entry-meta > * + *::before { content: "\2022"; margin: 0 6px; }

.details {
  position: relative;
  display: inline-block;
  padding: 0 12px 4px 0;
  color: var(--heading);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-decoration: none;
}

.details::before {
  content: "";
  position: absolute;
  right: 0;
  top: 5px;
  border: 4px solid transparent;
  border-left-color: currentColor;
  border-right-width: 0;
  transition: transform 0.3s;
}

.details::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
}

.details:hover::after { width: 100%; }
.details[aria-expanded="true"]::before { transform: rotate(90deg); }

.recipe { grid-column: 1 / -1; }
.recipe-inner { padding-top: 25px; }
.recipe h2 { font-size: 24px; line-height: 34px; }

/* Collapsed with JS; expands with a height animation (see main.js) */
.js .recipe { height: 0; overflow: hidden; transition: height 0.5s ease; }
.js .recipe.open { height: auto; }

.widget-title { margin-bottom: 15px; color: var(--heading); font-size: 16px; font-weight: 700; line-height: 26px; }

.recent-posts { list-style: none; margin: 0; padding: 0; }
.recent-posts li { display: flex; gap: 15px; font-size: 13px; line-height: 23px; }
.recent-posts .mini-img { flex: 0 0 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.recent-posts .mini-img img { display: block; width: 40px; height: 40px; transition: opacity 0.3s; }
.recent-posts .mini-img:hover img { opacity: 0.7; }
.recent-posts a { color: var(--heading); text-decoration: none; }
.recent-posts a:hover { color: var(--accent); }
.recent-posts time { color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 360px 495px;
  gap: 10px;
  margin-top: 10px;
}

.contact-grid > div { padding: 20px; margin: 5px; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  display: block;
  width: 100%;
  height: 38px;
  padding: 5px 15px;
  background: #fdfdfd;
  border: 1px solid rgba(51, 51, 51, 0.12);
  border-radius: 1px;
  color: #8b8d94;
  font: 14px/25px var(--font);
  transition: border-color 0.2s;
}

.contact-form textarea { height: auto; min-height: 174px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .invalid { border-color: #dc3232 !important; }
.contact-form p { margin-bottom: 10px; }
.contact-form label { display: block; }

.btn {
  display: inline-block;
  padding: 12px 18px;
  background: var(--accent);
  border: 0;
  border-radius: 1px;
  color: #fff;
  font: 700 14px/16px var(--font);
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover { background: #23aadd; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

.form-status {
  margin-top: 10px;
  padding: 10px 15px;
  border: 2px solid #46b450;
  color: var(--heading);
}

.form-status.error { border-color: #dc3232; }

.map { display: inline-block; max-width: 100%; border: 0; }
.map-link { color: #0000ff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #fff; }

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 20px;
  min-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 13px;
  line-height: 23px;
  font-weight: 500;
}

.footer-bar .credit { font-size: 9px; }
.footer-bar .credit a { color: #ccc; font-size: 8px; text-decoration: none; }
.footer-bar .credit a:hover { text-decoration: underline; }

/* ---------- Scroll-to-top button ---------- */
.scroll-top {
  position: fixed;
  right: -45px;
  bottom: 10px;
  z-index: 109;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 1px;
  opacity: 0;
  transition: all 0.4s ease;
}

.scroll-top.on { right: 10px; opacity: 1; }
.scroll-top:hover { background: rgba(0, 0, 0, 0.5); }
.scroll-top svg { width: 24px; fill: #fff; }

/* ---------- Lightbox (PhotoSwipe replacement) ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 60px;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.3s;
}

.lb.on { opacity: 1; }

.lb img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease, opacity 0.2s;
}

.lb.on img { transform: scale(1); }

.lb button {
  position: absolute;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.3);
  border: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.lb button:hover { opacity: 1; }
.lb .lb-close { top: 0; right: 0; }
.lb .lb-prev { left: 5px; top: 50%; margin-top: -22px; }
.lb .lb-next { right: 5px; top: 50%; margin-top: -22px; }
.lb .lb-count { position: absolute; top: 12px; left: 16px; color: #fff; font-size: 13px; opacity: 0.75; }

@media (prefers-reduced-motion: reduce) {
  .slide, .slide:first-child.active, .main-nav a span::after, .mobile-menu, .lb, .lb img, .js .recipe, .scroll-top {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .slideshow { height: auto; aspect-ratio: 1140 / 500; }
}

@media (max-width: 1050px) {
  /* The7 "first switch": compact header with hamburger */
  .branding { position: relative; align-items: center; height: 80px; padding: 0 60px; }
  .logo img { width: auto; max-height: 66px; }
  .navigation { display: none; }
  .menu-toggle { display: block; }
  .site-header { box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.07); }
}

@media (max-width: 990px) {
  :root { --gutter: 30px; }
  .with-sidebar { grid-template-columns: 1fr; }
  .content-col { padding-right: 0; border-right: 0; }
  .sidebar { padding: 50px 0 0; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 778px) {
  :root { --gutter: 20px; }
  h1 { font-size: 32px; line-height: 40px; }
  h2 { font-size: 26px; line-height: 34px; }
  .page-title { min-height: 80px; padding-top: 15px; padding-bottom: 15px; }
  .page-title h1 { font-size: 24px; line-height: 30px; }
  .breadcrumbs { display: none; }
  .main { padding: 50px 0; }
  .box { margin: 5px 0; padding: 15px 0; }
  .box-inner, .about-text { padding: 10px 0; margin: 5px 0; }
  .about-intro { flex-direction: column; gap: 0; }
  .about-photo { flex: none; padding: 10px 0; margin: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-grid > div { padding: 15px 0; margin: 0; }
  .map { width: 100%; height: 300px; }
  .photo-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-bar { flex-direction: column; justify-content: center; text-align: center; gap: 0; }
}

@media (max-width: 560px) {
  .photo-row { grid-template-columns: 1fr; gap: 10px; }
  .post-card { grid-template-columns: 1fr; padding: 20px; }
  .post-media { padding: 0 0 20px; }
  .lb { padding: 50px 10px; }
}
