/* ==========================================================
   WeWillExplain — Homepage Styles
   Enqueued via functions.php as 'wwe-front-page'
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600&family=Nunito:wght@400;600;700&display=swap');

/* ----------------------------------------------------------
   FULL-WIDTH BREAKOUT
   Astra wraps page content in .entry-content with a max-width
   and padding. These rules escape that container so every
   section spans the full viewport.
---------------------------------------------------------- */

/* Strip ALL padding/max-width from Astra's wrappers on homepage */
body.home .entry-content,
body.home .ast-article-single,
body.home .ast-article-post,
body.home .post-content,
body.home .page-content,
body.home #primary,
body.home #content .ast-container,
body.home .ast-container {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* The main homepage wrapper fills the full width */
#wwe-homepage {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* prevent horizontal scroll from blobs */
}

/* Every section is full-viewport-width */
#wwe-homepage .wwe-hero,
#wwe-homepage .wwe-featured,
#wwe-homepage .wwe-trust,
#wwe-homepage .wwe-latest,
#wwe-homepage .wwe-why {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Reset any leftover margin from parent containers */
  margin-left: 0;
  margin-right: 0;
}

/* Remove default Astra page padding on homepage */
body.home .ast-container,
body.home .site-content,
body.home #content,
body.home .ast-article-single {
  padding: 0 !important;
  max-width: 100% !important;
}

/* ----------------------------------------------------------
   1. HERO
---------------------------------------------------------- */
.wwe-hero {
  background: #FFFAF3;
  padding: 80px 24px 70px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.wwe-hero::before {
  content: '';
  position: absolute;
  top: -70px; right: -70px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: #F5DFB0;
  opacity: 0.35;
}

.wwe-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -50px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: #EEC97D;
  opacity: 0.2;
}

.wwe-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.wwe-badge {
  display: inline-block;
  background: #FDF0D5;
  color: #B5832A;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 26px;
  border: 1px solid #EEC97D;
}

.wwe-hero h1 {
  font-family: 'Lora', serif;
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 600;
  color: #2C2310;
  line-height: 1.2;
  margin: 0 0 22px;
}

.wwe-hero h1 span {
  color: #D4A054;
}

.wwe-hero p {
  font-size: clamp(15px, 2vw, 18px);
  color: #7A6A52;
  line-height: 1.8;
  margin: 0 auto 38px;
  max-width: 540px;
}

.wwe-hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.wwe-btn-primary {
  background: #D4A054;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 34px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 18px rgba(212,160,84,0.35);
}

.wwe-btn-primary:hover {
  background: #BF8B3A;
  transform: translateY(-2px);
  color: #fff;
}

.wwe-btn-secondary {
  background: transparent;
  color: #D4A054;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 34px;
  border-radius: 50px;
  border: 2px solid #D4A054;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.wwe-btn-secondary:hover {
  background: #FDF0D5;
}

.wwe-hero-illustration {
  margin: 50px auto 0;
  max-width: 500px;
}

.wwe-hero-scroll {
  margin-top: 44px;
  font-size: 12px;
  color: #C4AA84;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.wwe-scroll-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #D4A054;
  animation: wwe-glow 2s ease-in-out infinite;
}

@keyframes wwe-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}

@media (max-width: 520px) {
  .wwe-hero { padding: 60px 16px 50px; }
  .wwe-hero-btns { flex-direction: column; align-items: center; }
  .wwe-btn-primary,
  .wwe-btn-secondary { width: 100%; max-width: 300px; text-align: center; }
}


/* ----------------------------------------------------------
   2. FEATURED PREVIEW
---------------------------------------------------------- */
.wwe-featured {
  background: linear-gradient(180deg, #f0f4f1 0%, #ffffff 100%);
  padding: 90px 20px;
  font-family: 'Nunito', sans-serif;
}

.wwe-featured-wrap {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.wwe-featured-text h2 {
  font-family: 'Lora', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: #2c3e33;
  margin-bottom: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.wwe-featured-text p {
  color: #5a6b5f;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 25px;
}

.wwe-typewriter-box {
  background: #2c3e33;
  border-radius: 16px;
  padding: 30px;
  color: #a7c7b0;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.7;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.wwe-typewriter-box::before {
  content: '>';
  color: #5a8f6e;
  margin-right: 8px;
}

.wwe-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #5a8f6e;
  animation: wwe-blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes wwe-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.wwe-featured-visual {
  position: relative;
}

.wwe-featured-visual img {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  display: block;
}

.wwe-featured-badge {
  position: absolute;
  bottom: -15px;
  left: 20px;
  background: white;
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  font-size: 0.9rem;
  color: #5a8f6e;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
}

@media (max-width: 768px) {
  .wwe-featured-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .wwe-featured-visual { order: -1; }
}


/* ----------------------------------------------------------
   3. TRUST / STATS
---------------------------------------------------------- */
.wwe-trust {
  background: #ffffff;
  padding: 80px 20px;
  font-family: 'Nunito', sans-serif;
}

.wwe-trust-wrap {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.wwe-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.wwe-trust-item {
  padding: 30px 20px;
}

.wwe-trust-number {
  font-size: 3rem;
  font-weight: 800;
  color: #5a8f6e;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.8;
}

.wwe-trust-item h4 {
  color: #2c3e33;
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.wwe-trust-item p {
  color: #7a8b7f;
  font-size: 0.95rem;
  line-height: 1.5;
}


/* ----------------------------------------------------------
   4. LATEST POSTS
---------------------------------------------------------- */
.wwe-latest {
  background: #faf9f6;
  padding: 60px 20px;
  font-family: 'Nunito', sans-serif;
}

.wwe-latest-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.wwe-latest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 15px;
}

.wwe-latest-header h2 {
  font-family: 'Lora', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: #2c3e33;
  font-weight: 600;
  margin: 0;
}

.wwe-latest-header a {
  color: #5a8f6e;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: color 0.2s;
}

.wwe-latest-header a:hover {
  color: #3d6b4f;
}

/* Post cards grid */
.wwx-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

@media (max-width: 580px) {
  .wwx-posts-grid { grid-template-columns: 1fr; }
}

.wwx-card {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wwx-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.11);
  transform: translateY(-3px);
}

.wwx-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #f0f0f0;
}

/* WP outputs <img> directly via the_post_thumbnail() */
.wwx-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.wwx-card:hover .wwx-card-img-wrap img {
  transform: scale(1.04);
}

.wwx-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d4edda 0%, #a8d5b5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a9970;
  font-size: 36px;
}

.wwx-category-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #4caf50;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 20px;
}

.wwx-card-body {
  padding: 22px 22px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wwx-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 16px;
}

.wwx-card-title a {
  color: #1a1a1a;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.wwx-card-title a:hover {
  color: #2e7d32;
  text-decoration-color: #2e7d32;
}

.wwx-read-more {
  display: inline-block;
  color: #2e7d32;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.wwx-read-more:hover { text-decoration: underline; }

.wwx-card-meta {
  margin-top: auto;
  font-size: 12.5px;
  color: #888;
  border-top: 1px solid #f0f0f0;
  padding-top: 14px;
}

.wwx-error {
  text-align: center;
  padding: 32px;
  color: #888;
  font-size: 15px;
}


/* ----------------------------------------------------------
   5. WHY PEOPLE LOVE WEWILLEXPLAIN
---------------------------------------------------------- */
.wwe-why {
  background: #F0F7F4;
  padding: 60px 20px;
  font-family: 'Nunito', sans-serif;
}

.wwe-section-label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3A8C62;
  margin-bottom: 12px;
}

.wwe-section-title {
  font-family: 'Lora', serif;
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 600;
  color: #2C2A26;
  text-align: center;
  margin: 0 0 36px;
}

.wwe-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.wwe-why-item {
  background: #fff;
  border-radius: 18px;
  padding: 24px 20px;
  border: 1.5px solid #D6EAE2;
}

.wwe-why-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.wwe-why-item:nth-child(1) .wwe-why-icon { background: #E1F5EE; }
.wwe-why-item:nth-child(2) .wwe-why-icon { background: #FAEEDA; }
.wwe-why-item:nth-child(3) .wwe-why-icon { background: #E6F1FB; }
.wwe-why-item:nth-child(4) .wwe-why-icon { background: #FBEAF0; }

.wwe-why-title {
  font-size: 16px;
  font-weight: 700;
  color: #2C2A26;
  margin: 0 0 6px;
}

.wwe-why-desc {
  font-size: 14px;
  color: #6B6860;
  line-height: 1.65;
  margin: 0;
}

/* Comparison table */
.wwe-compare {
  max-width: 600px;
  margin: 40px auto 0;
  background: #fff;
  border-radius: 20px;
  border: 1.5px solid #D6EAE2;
  padding: 24px 20px;
}

.wwe-compare-title {
  font-family: 'Lora', serif;
  font-size: 16px;
  font-weight: 600;
  color: #2C2A26;
  margin-bottom: 16px;
  text-align: center;
}

.wwe-compare-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #EAE8E3;
}

.wwe-compare-row:last-child { border-bottom: none; }

.wwe-compare-label {
  color: #4A4843;
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.wwe-badge-no,
.wwe-badge-yes {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.wwe-badge-no  { background: #FAECE7; color: #993C1D; }
.wwe-badge-yes { background: #E1F5EE; color: #0F6E56; }

@media (max-width: 600px) {
  .wwe-why { padding: 50px 16px; }
  .wwe-why-grid { grid-template-columns: 1fr; }

  .wwe-compare-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 0;
  }
  .wwe-compare-label { font-size: 14px; order: 2; padding-left: 2px; }
  .wwe-badge-no  { order: 1; }
  .wwe-badge-yes { order: 3; }
  .wwe-compare { padding: 20px 16px; }
}
