/*
Theme Name:   Wendur Editorial Theme
Theme URI:    https://wendur.org
Author:       Wendur Team
Description:  Conscious living, organic farming, herbal remedies, natural buildings, and slow journalism WordPress theme with African regional discovery, digital flip magazine, and community submissions.
Version:      1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License:      GNU General Public License v2 or later
Text Domain:  wendur-theme
*/

:root {
  --wendur-green: #2F5D50;
  --wendur-sand: #E6D8C3;
  --wendur-sand-deep: #D2B892;
  --wendur-soil: #2B2B2B;
  --wendur-paper: #FAF8F4;
  --wendur-linen: #F4EFE6;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--wendur-paper);
  color: var(--wendur-soil);
  font-family: var(--font-sans);
  line-height: 1.65;
}

h1, h2, h3, .font-editorial {
  font-family: var(--font-serif);
  font-weight: 500;
  margin-top: 0;
}

a { color: inherit; text-decoration: none; }

.wendur-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.wendur-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--wendur-soil);
  color: var(--wendur-paper);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wendur-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.wendur-wordmark {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--wendur-sand);
  white-space: nowrap;
}

.wendur-logo-wrap a,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.wendur-logo-wrap img,
.custom-logo,
.wendur-logo-img {
  max-height: 36px;
  width: auto;
  display: block;
}

.wendur-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wendur-nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.wendur-nav a:hover,
.wendur-nav .current-menu-item a {
  color: var(--wendur-sand);
  border-bottom-color: var(--wendur-sand);
}

.wendur-search-trigger {
  border: 1px solid rgba(230, 216, 195, 0.4);
  color: var(--wendur-sand);
  background: transparent;
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Buttons */
.wendur-btn-sand {
  display: inline-block;
  background: var(--wendur-sand);
  color: var(--wendur-soil);
  padding: 11px 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.wendur-btn-sand:hover {
  background: var(--wendur-green);
  color: #fff;
}

.wendur-btn-outline {
  display: inline-block;
  border: 1px solid var(--wendur-soil);
  color: var(--wendur-soil);
  padding: 11px 26px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
}

.wendur-btn-outline:hover {
  background: var(--wendur-soil);
  color: #fff;
}

/* Hero Slider */
.wendur-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wendur-soil);
  overflow: hidden;
  text-align: center;
  color: #fff;
}

.wendur-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.wendur-hero-slide.is-active {
  opacity: 1;
}

.wendur-hero-slide img,
.wendur-hero-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wendur-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.38));
}

.wendur-hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 40px 24px;
}

.wendur-hero-content h1 {
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.12;
  margin-bottom: 18px;
}

/* Grids & Cards */
.wendur-regions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.wendur-region-card {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  text-align: left;
  background: var(--wendur-soil);
}

.wendur-region-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wendur-region-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #fff;
}

.wendur-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.wendur-cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.wendur-story-row {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 28px;
  align-items: center;
  padding-bottom: 36px;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.wendur-story-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.wendur-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
}

.wendur-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.wendur-card-body {
  padding: 20px;
}

.wendur-meta {
  font-size: 12px;
  color: var(--wendur-green);
  margin-bottom: 6px;
}

.drop-cap::first-letter {
  font-family: var(--font-serif);
  font-size: 3.4rem;
  font-weight: 600;
  float: left;
  line-height: 0.85;
  margin-right: 12px;
  color: var(--wendur-green);
}

/* Footer */
.wendur-footer {
  background: var(--wendur-soil);
  color: var(--wendur-paper);
  padding: 64px 0 36px;
}

.wendur-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

@media (max-width: 960px) {
  .wendur-nav { display: none; }
  .wendur-regions-grid { grid-template-columns: repeat(2, 1fr); }
  .wendur-cards-3, .wendur-cards-4, .wendur-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .wendur-story-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .wendur-regions-grid, .wendur-cards-3, .wendur-cards-4, .wendur-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* WooCommerce Affiliate Store Styling */
.wendur-woocommerce-wrap ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.wendur-woocommerce-wrap ul.products li.product {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  padding: 0 0 20px;
  width: 100% !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wendur-woocommerce-wrap ul.products li.product img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 14px;
}
.wendur-woocommerce-wrap ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--wendur-soil);
  padding: 0 18px;
  margin: 0 0 6px;
}
.wendur-woocommerce-wrap ul.products li.product .price {
  padding: 0 18px;
  color: var(--wendur-green);
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 12px;
}
.wendur-woocommerce-wrap ul.products li.product .button,
.wendur-woocommerce-wrap .single_add_to_cart_button.button {
  background: var(--wendur-sand) !important;
  color: var(--wendur-soil) !important;
  border-radius: 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  padding: 11px 18px !important;
  margin: 0 18px;
  text-align: center;
  display: inline-block;
}
.wendur-woocommerce-wrap ul.products li.product .button:hover,
.wendur-woocommerce-wrap .single_add_to_cart_button.button:hover {
  background: var(--wendur-green) !important;
  color: #fff !important;
}
@media (max-width: 960px) {
  .wendur-woocommerce-wrap ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .wendur-woocommerce-wrap ul.products { grid-template-columns: 1fr; }
}

