/*
Theme Name:   Vegfacts Child
Theme URI:    https://vegfacts.xyz
Description:  Fresh, natural, organic-veggie child theme for vegfacts.xyz, built on Astra.
Author:       Vegfacts
Author URI:   https://vegfacts.xyz
Template:     astra
Version:      1.0.0
Text Domain:  vegfacts-child
*/

/* =========================================================
   1. BRAND VARIABLES
   ========================================================= */
:root {
  --vf-green-900: #1f4d2c;   /* deep forest — headings, header bg */
  --vf-green-700: #2f6b3c;   /* primary green — buttons, links, accents */
  --vf-green-500: #4f9a5a;   /* leaf green — hover states */
  --vf-green-200: #cfe8d2;   /* soft mint — tags, badges, borders */
  --vf-lime-400:  #8bc34a;   /* lime accent — highlights, active states */
  --vf-cream-50:  #faf8f2;   /* warm off-white — page background */
  --vf-cream-100: #f3efe3;   /* card background */
  --vf-brown-700: #5a4632;   /* earthy text accent */
  --vf-text-900:  #24301f;   /* body text, near-black warm green */
  --vf-radius-lg: 18px;
  --vf-radius-md: 12px;
  --vf-radius-sm: 8px;
  --vf-shadow: 0 4px 16px rgba(31, 77, 44, 0.10);
}

/* =========================================================
   2. TYPOGRAPHY
   ========================================================= */
body {
  background-color: var(--vf-cream-50);
  color: var(--vf-text-900);
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
}

h1, h2, h3, h4, h5, h6,
.entry-title, .site-title {
  font-family: "Quicksand", "Nunito Sans", sans-serif;
  font-weight: 700;
  color: var(--vf-green-900);
  letter-spacing: -0.01em;
}

a {
  color: var(--vf-green-700);
  transition: color 0.2s ease;
}
a:hover {
  color: var(--vf-lime-400);
}

/* =========================================================
   3. HEADER / NAVIGATION — sticky top app bar
   ========================================================= */
.ast-primary-header,
.main-header-bar {
  background-color: var(--vf-cream-50);
  border-bottom: 1px solid var(--vf-green-200);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.2s ease;
}
.ast-primary-header.vf-scrolled,
.main-header-bar.vf-scrolled {
  box-shadow: 0 2px 12px rgba(31, 77, 44, 0.12);
}

.site-title a {
  color: var(--vf-green-900) !important;
  font-weight: 800;
}

.main-header-menu .menu-item > a,
.ast-header-navigation-menu a {
  color: var(--vf-text-900);
  font-weight: 600;
  border-radius: var(--vf-radius-sm);
}
.main-header-menu .menu-item > a:hover,
.main-header-menu .current-menu-item > a {
  color: var(--vf-green-700);
}

/* mobile menu toggle */
.ast-mobile-menu-buttons svg,
.ast-button-wrap svg {
  color: var(--vf-green-700);
}

/* =========================================================
   4. BUTTONS
   ========================================================= */
.ast-button,
button,
input[type="submit"],
.wp-block-button__link {
  background-color: var(--vf-green-700) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 0.7em 1.6em !important;
  font-weight: 700;
  box-shadow: var(--vf-shadow);
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.ast-button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
  background-color: var(--vf-lime-400) !important;
  transform: translateY(-1px);
}

/* =========================================================
   5. CARDS — post listings, archive grid
   ========================================================= */
.ast-article-post,
article.post {
  background-color: var(--vf-cream-100);
  border-radius: var(--vf-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--vf-shadow);
  border: 1px solid var(--vf-green-200);
}

.ast-article-post img,
.post-thumb img,
.wp-post-image {
  border-radius: var(--vf-radius-md);
}

.ast-blog-single-element.ast-blog-meta-cat a,
.entry-meta .cat-links a,
.badge, .tag-link {
  background-color: var(--vf-green-200);
  color: var(--vf-green-900);
  border-radius: 999px;
  padding: 0.25em 0.9em;
  font-size: 0.8em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* =========================================================
   6. TABLES — nutrition / data tables read cleanly
   ========================================================= */
table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--vf-radius-md);
  overflow: hidden;
  border: 1px solid var(--vf-green-200);
}
table th {
  background-color: var(--vf-green-700);
  color: #fff;
  padding: 0.75em 1em;
  font-family: "Quicksand", sans-serif;
}
table td {
  padding: 0.65em 1em;
  border-top: 1px solid var(--vf-green-200);
}
table tr:nth-child(even) td {
  background-color: var(--vf-cream-100);
}

/* =========================================================
   7. FOOTER
   ========================================================= */
.ast-small-footer,
footer.site-footer {
  background-color: var(--vf-green-900);
  color: var(--vf-cream-50);
}
.ast-small-footer a,
footer.site-footer a {
  color: var(--vf-green-200);
}
.ast-small-footer a:hover,
footer.site-footer a:hover {
  color: #fff;
}

/* =========================================================
   8. MISC — blockquotes, dividers, widgets
   ========================================================= */
blockquote {
  border-left: 4px solid var(--vf-lime-400);
  background-color: var(--vf-cream-100);
  border-radius: 0 var(--vf-radius-sm) var(--vf-radius-sm) 0;
  padding: 1em 1.5em;
  font-style: italic;
}

hr {
  border-top: 2px dashed var(--vf-green-200);
}

::selection {
  background-color: var(--vf-lime-400);
  color: #fff;
}

/* =========================================================
   9. SINGLE POST LAYOUT
   ========================================================= */
.single .entry-content {
  font-size: 1.08em;
  line-height: 1.75;
  color: var(--vf-text-900);
}
.single .entry-header .entry-title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.5em;
}
.single .entry-meta {
  color: var(--vf-brown-700);
  font-size: 0.9em;
  display: flex;
  gap: 0.75em;
  flex-wrap: wrap;
  margin-bottom: 1.5em;
}
.single .post-thumbnail-image,
.single .featured-image img {
  border-radius: var(--vf-radius-lg);
  box-shadow: var(--vf-shadow);
  margin-bottom: 1.5em;
}
.single .entry-content h2,
.single .entry-content h3 {
  margin-top: 1.6em;
}
.single .entry-content img {
  border-radius: var(--vf-radius-md);
}

/* =========================================================
   10. SIDEBAR WIDGETS
   ========================================================= */
.vf-widget,
.widget {
  background-color: var(--vf-cream-100);
  border: 1px solid var(--vf-green-200);
  border-radius: var(--vf-radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.vf-widget-title,
.widget-title,
.widget .widgettitle {
  font-family: "Quicksand", sans-serif;
  color: var(--vf-green-900);
  font-size: 1.05em;
  margin-bottom: 0.75em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--vf-lime-400);
}
.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.widget ul li {
  padding: 0.4em 0;
  border-bottom: 1px dashed var(--vf-green-200);
}
.widget ul li:last-child {
  border-bottom: none;
}
.widget a {
  color: var(--vf-text-900);
}
.widget a:hover {
  color: var(--vf-green-700);
}

/* =========================================================
   11. MOBILE BOTTOM TAB BAR + DRAWERS
   (mirrors the bottom nav bar / app-shell feel from the
   original Blogspot mobile-app theme)
   ========================================================= */
.vf-bottom-tabbar {
  display: none; /* shown on mobile only, see media query below */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background-color: var(--vf-cream-50);
  border-top: 1px solid var(--vf-green-200);
  box-shadow: 0 -4px 16px rgba(31, 77, 44, 0.10);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: center;
}

.vf-bottom-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 4px 0;
  color: var(--vf-brown-700) !important;
  text-decoration: none !important;
  border-radius: var(--vf-radius-sm);
  transition: color 0.15s ease, transform 0.15s ease;
}
.vf-bottom-tab .vf-tab-icon {
  display: flex;
}
.vf-bottom-tab .vf-tab-label {
  font-size: 0.68rem;
  font-weight: 700;
}
.vf-bottom-tab:hover,
.vf-bottom-tab.vf-active {
  color: var(--vf-green-700) !important;
  transform: translateY(-2px);
}
.vf-tab-top.vf-tab-visible-progress {
  color: var(--vf-lime-400) !important;
}

/* Drawers (Categories / Search) slide up from the bottom tab bar */
.vf-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  background: var(--vf-cream-50);
  border-radius: var(--vf-radius-lg) var(--vf-radius-lg) 0 0;
  box-shadow: 0 -8px 24px rgba(31, 77, 44, 0.18);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-height: 70vh;
  overflow-y: auto;
}
.vf-drawer.vf-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.vf-drawer-inner {
  padding: 1.25rem 1.25rem calc(1.25rem + 64px);
}
.vf-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  color: var(--vf-green-900);
  margin-bottom: 1em;
}
.vf-drawer-close {
  background: var(--vf-green-200) !important;
  color: var(--vf-green-900) !important;
  border-radius: 50% !important;
  width: 32px;
  height: 32px;
  line-height: 1;
  font-size: 1.2rem;
  padding: 0 !important;
  box-shadow: none !important;
}
.vf-drawer-categories-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.vf-drawer-categories-list li {
  border-bottom: 1px solid var(--vf-green-200);
}
.vf-drawer-categories-list a {
  display: block;
  padding: 0.75em 0.25em;
  color: var(--vf-text-900);
  text-decoration: none;
}
#vf-drawer-search .search-form {
  display: flex;
  gap: 0.5em;
}
#vf-drawer-search .search-field {
  flex: 1;
  border: 1px solid var(--vf-green-200);
  border-radius: 999px;
  padding: 0.6em 1.1em;
}

/* =========================================================
   12. RESPONSIVE TWEAKS
   ========================================================= */
@media (max-width: 768px) {
  .ast-article-post, article.post {
    padding: 1rem;
    border-radius: var(--vf-radius-md);
  }

  .vf-bottom-tabbar {
    display: flex;
  }

  /* keep page content clear of the fixed bottom tab bar */
  body {
    padding-bottom: 64px;
  }
}

@media (min-width: 769px) {
  .vf-drawer {
    display: none; /* drawers are a mobile-only affordance */
  }
}
