/* ================================================================
   CULTIVATE BLOCKS - Frontend CSS
   Inspired by CultivateWP agency design patterns
   ================================================================ */

/* ---- Global Resets & Base ---- */
.cb-hero-banner,
.cb-category-grid-section,
.cb-newsletter-signup,
.cb-stats-bar,
.cb-about-section,
.cb-testimonial,
.cb-image-text-split,
.cb-cta-banner,
.cb-recipe-card,
.cb-post-carousel,
.cb-post-grid-section {
  box-sizing: border-box;
}

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

/* ---- Shared Buttons ---- */
.cb-btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.cb-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.cb-btn-primary { color: #fff; }
.cb-btn-secondary { background: transparent; border: 2px solid currentColor; }

/* ---- Shared Section Title ---- */
.cb-section-title {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  color: #222;
  margin-bottom: 36px;
  letter-spacing: -0.5px;
}

/* ==============================================================
   BLOCK 1: HERO BANNER
   ============================================================== */
.cb-hero-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cb-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cb-hero-content {
  position: relative;
  z-index: 1;
  padding: 60px 24px;
  max-width: 820px;
  width: 100%;
}

.cb-hero-title {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 18px;
  letter-spacing: -1px;
}

.cb-hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.6;
  margin-bottom: 36px;
  opacity: 0.92;
}

.cb-hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .cb-hero-buttons { flex-direction: column; align-items: flex-start; }
  .cb-hero-content { padding: 48px 20px; }
}

/* ==============================================================
   BLOCK 2: CATEGORY GRID
   ============================================================== */
.cb-category-grid-section {
  padding: 60px 20px;
}

.cb-category-grid {
  display: grid;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.cb-category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}
.cb-category-item:hover { transform: translateY(-4px); }
.cb-category-item:hover .cb-category-img-wrap { box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

.cb-category-img-wrap {
  overflow: hidden;
  margin-bottom: 10px;
  transition: box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f0eb;
}

.cb-category-emoji {
  font-size: 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.cb-category-label {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .cb-category-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 480px) {
  .cb-category-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ==============================================================
   BLOCK 3: FEATURED POSTS
   ============================================================== */
.cb-featured-posts-section {
  padding: 60px 20px;
}

.cb-featured-grid {
  display: grid;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.cb-post-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 16px rgba(0,0,0,0.07);
  transition: transform 0.22s, box-shadow 0.22s;
}
.cb-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.12);
}

.cb-post-img-link { display: block; overflow: hidden; }
.cb-post-img-wrap { position: relative; overflow: hidden; }
.cb-post-img-wrap img { transition: transform 0.4s; }
.cb-post-card:hover .cb-post-img-wrap img { transform: scale(1.04); }

.cb-post-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.cb-post-card-body { padding: 18px; }
.cb-post-date { font-size: 12px; color: #999; margin-bottom: 6px; display: block; }

.cb-post-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
  color: #222;
}

.cb-post-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cb-read-more {
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.cb-read-more:hover { gap: 8px; }

@media (max-width: 900px) {
  .cb-featured-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .cb-featured-grid { grid-template-columns: 1fr !important; }
}

/* ==============================================================
   BLOCK 4: NEWSLETTER SIGNUP
   ============================================================== */
.cb-newsletter-signup {
  padding: 70px 20px;
}

.cb-newsletter-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  gap: 36px;
  align-items: center;
}
.cb-newsletter-inner.centered {
  flex-direction: column;
  text-align: center;
}
.cb-newsletter-inner.horizontal {
  flex-direction: row;
}

.cb-newsletter-icon {
  font-size: 64px;
  flex-shrink: 0;
  line-height: 1;
}

.cb-newsletter-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.25;
}
.cb-newsletter-subtitle {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  opacity: 0.85;
}

.cb-newsletter-form .cb-form-row {
  display: flex;
  max-width: 480px;
}
.cb-newsletter-inner.centered .cb-form-row { margin: 0 auto; }

.cb-email-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 15px;
  border: 2px solid #ddd;
  border-right: none;
  outline: none;
  color: #333;
  font-family: inherit;
}
.cb-email-input:focus { border-color: #aaa; }

.cb-submit-btn {
  color: #fff;
  padding: 14px 24px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.cb-submit-btn:hover { opacity: 0.87; }

.cb-privacy-note {
  font-size: 12px;
  margin-top: 8px;
  opacity: 0.6;
}

@media (max-width: 700px) {
  .cb-newsletter-inner.horizontal { flex-direction: column; text-align: center; }
  .cb-newsletter-form .cb-form-row { margin: 0 auto; max-width: 100%; }
  .cb-email-input, .cb-submit-btn { font-size: 14px; padding: 12px 16px; }
}

/* ==============================================================
   BLOCK 5: STATS BAR
   ============================================================== */
.cb-stats-bar {
  padding: 48px 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.cb-stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
}

.cb-stat-emoji { font-size: 32px; margin-bottom: 6px; }

.cb-stat-number {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  display: block;
  letter-spacing: -1px;
}

.cb-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
  margin-top: 6px;
  display: block;
}

@media (max-width: 600px) {
  .cb-stats-bar { padding: 32px 16px; }
  .cb-stat-item { padding: 12px 16px; }
  .cb-stat-number { font-size: 32px; }
}

/* ==============================================================
   BLOCK 6: ABOUT SECTION
   ============================================================== */
.cb-about-section {
  padding: 70px 20px;
}

.cb-about-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 56px;
}

.cb-about-section.cb-about-image-right .cb-about-inner { flex-direction: row-reverse; }
.cb-about-section.cb-about-centered .cb-about-inner { flex-direction: column; text-align: center; }
.cb-about-section.cb-about-centered .cb-about-divider { margin: 0 auto 20px; }

.cb-about-image { flex-shrink: 0; }
.cb-about-image img, .cb-about-img-placeholder {
  width: 300px;
  height: 300px;
  object-fit: cover;
}
.cb-about-img-placeholder {
  background: #f0e8e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.cb-about-content { flex: 1; }
.cb-about-content h2 { font-size: 38px; font-weight: 800; margin-bottom: 16px; color: #222; }
.cb-about-divider { width: 52px; height: 4px; border-radius: 2px; margin-bottom: 20px; }
.cb-about-content p { font-size: 17px; line-height: 1.8; color: #555; margin-bottom: 20px; }
.cb-about-signature { font-style: italic; font-size: 22px; margin-bottom: 20px; }

@media (max-width: 768px) {
  .cb-about-inner { flex-direction: column !important; text-align: center; }
  .cb-about-divider { margin: 0 auto 20px !important; }
  .cb-about-image img, .cb-about-img-placeholder { width: 220px; height: 220px; }
}

/* ==============================================================
   BLOCK 7: TESTIMONIAL
   ============================================================== */
.cb-testimonial {
  padding: 50px 20px;
}

.cb-testimonial-inner {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}

.cb-testimonial-card .cb-testimonial-inner {
  background: #fff;
  border-radius: 12px;
  padding: 44px 48px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.09);
}

.cb-testimonial-pullquote .cb-testimonial-inner {
  padding: 0 48px;
}

.cb-stars { color: #f5a623; font-size: 24px; margin-bottom: 16px; letter-spacing: 2px; }
.cb-quote-mark { font-size: 60px; line-height: 0.8; margin-bottom: 16px; font-family: Georgia, serif; }
.cb-quote-text { font-size: 20px; font-style: italic; line-height: 1.7; color: #444; margin-bottom: 28px; }

.cb-testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.cb-author-img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.cb-author-name { font-size: 15px; font-weight: 700; color: #333; display: block; }
.cb-author-title { font-size: 13px; color: #999; }

/* ==============================================================
   BLOCK 8: IMAGE + TEXT SPLIT
   ============================================================== */
.cb-image-text-split { overflow: hidden; }

.cb-split-inner {
  display: flex;
  min-height: 460px;
}

.cb-split-image-right .cb-split-inner { flex-direction: row-reverse; }

.cb-split-image {
  flex: 1;
  position: relative;
  min-height: 320px;
  background: #f5f0eb;
  overflow: hidden;
}

.cb-split-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.cb-image-text-split:hover .cb-split-image img { transform: scale(1.03); }

.cb-split-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 2;
}

.cb-split-content {
  flex: 1;
  padding: 64px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cb-eyebrow {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 14px;
  display: block;
}

.cb-split-title {
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 18px;
  line-height: 1.2;
  color: #222;
}

.cb-accent-line {
  width: 52px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 22px;
}

.cb-split-body {
  font-size: 17px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 28px;
}

/* Split ratios */
.cb-split-60-40 .cb-split-image { flex: 3 0 0; }
.cb-split-60-40 .cb-split-content { flex: 2 0 0; }
.cb-split-40-60 .cb-split-image { flex: 2 0 0; }
.cb-split-40-60 .cb-split-content { flex: 3 0 0; }

@media (max-width: 768px) {
  .cb-split-inner { flex-direction: column !important; }
  .cb-split-image { min-height: 280px; }
  .cb-split-content { padding: 40px 28px; }
  .cb-split-title { font-size: 28px; }
}

/* ==============================================================
   BLOCK 9: POST GRID
   ============================================================== */
.cb-post-grid-section {
  padding: 60px 20px;
}

.cb-post-grid-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 26px;
}

.cb-grid-card { border-radius: 10px; overflow: hidden; background: #fff; }
.cb-grid-card.cb-card-shadow { box-shadow: 0 3px 16px rgba(0,0,0,0.08); }
.cb-grid-card.cb-card-border { border: 1px solid #e8e8e8; }
.cb-grid-card { transition: transform 0.2s, box-shadow 0.2s; }
.cb-grid-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,0.12); }

.cb-grid-img-wrap { position: relative; overflow: hidden; }
.cb-grid-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; display: block; }
.cb-grid-card:hover .cb-grid-img-wrap img { transform: scale(1.05); }

.cb-grid-card-body { padding: 16px 18px 18px; }
.cb-grid-card-body h3 { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; color: #222; }
.cb-grid-date { font-size: 12px; color: #aaa; margin-bottom: 6px; display: block; }
.cb-grid-excerpt { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 10px; }
.cb-grid-read-more { font-size: 13px; font-weight: 700; text-decoration: none; transition: gap 0.2s; }

.cb-post-grid-cta { text-align: center; margin-top: 40px; }
.cb-post-grid-cta .cb-btn { background: transparent; border: 2px solid currentColor; }

@media (max-width: 900px) { .cb-post-grid-inner { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { .cb-post-grid-inner { grid-template-columns: 1fr !important; } }

/* ==============================================================
   BLOCK 10: CTA BANNER
   ============================================================== */
.cb-cta-banner {
  position: relative;
  overflow: hidden;
}

.cb-cta-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cb-cta-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.cb-cta-banner[style*="text-align:center"] .cb-cta-content { margin: 0 auto; }

.cb-cta-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.cb-cta-subtitle {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 30px;
  opacity: 0.85;
}

.cb-cta-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.cb-cta-banner[style*="text-align:center"] .cb-cta-buttons { justify-content: center; }

/* ==============================================================
   BLOCK 11: RECIPE CARD
   ============================================================== */
.cb-recipe-card {
  border: 2px solid #eaeaea;
  border-radius: 12px;
  overflow: hidden;
  max-width: 780px;
  margin: 36px auto;
  font-family: inherit;
  background: #fff;
}

.cb-recipe-header {
  padding: 30px 36px;
  color: #fff;
}

.cb-recipe-header h2 { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.cb-recipe-header p { font-size: 15px; opacity: 0.9; line-height: 1.6; color: #fff; }

.cb-recipe-img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  display: block;
}

.cb-recipe-meta {
  display: flex;
  background: #faf8f6;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}

.cb-meta-item {
  flex: 1;
  min-width: 90px;
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cb-meta-item:last-child { border-right: none; }
.cb-meta-item span:first-child { font-size: 22px; }
.cb-meta-item strong { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.cb-meta-item span:last-child { font-size: 14px; font-weight: 700; color: #333; }

.cb-recipe-body {
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.cb-recipe-body h3 {
  font-size: 17px;
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 3px solid;
  color: #333;
}

.cb-recipe-ingredients, .cb-recipe-instructions {
  font-size: 15px;
  line-height: 2;
  color: #444;
  white-space: pre-line;
}

.cb-recipe-notes {
  margin: 0 36px 32px;
  background: #fdf6f0;
  border: 1px solid;
  border-radius: 8px;
  padding: 16px 22px;
  font-size: 14px;
  color: #555;
}
.cb-recipe-notes strong { text-transform: uppercase; letter-spacing: 0.5px; font-size: 13px; }

@media (max-width: 640px) {
  .cb-recipe-body { grid-template-columns: 1fr; padding: 24px 20px; }
  .cb-recipe-header { padding: 22px 20px; }
  .cb-recipe-notes { margin: 0 20px 24px; }
  .cb-meta-item { min-width: 70px; padding: 12px 8px; }
}

/* ==============================================================
   BLOCK 12: POST CAROUSEL / TABS
   ============================================================== */
.cb-post-carousel {
  padding: 60px 20px;
}

.cb-carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.cb-carousel-title {
  font-size: 28px;
  font-weight: 800;
  color: #222;
  margin: 0;
}

.cb-carousel-arrows { display: flex; gap: 10px; }
.cb-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cb-arrow-next { color: #fff !important; }
.cb-arrow-prev:hover { background: var(--accent, #e07b54); color: #fff !important; border-color: var(--accent, #e07b54) !important; }

.cb-carousel-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #eee;
  margin-bottom: 28px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.cb-carousel-tabs::-webkit-scrollbar { display: none; }

.cb-tab-btn {
  padding: 12px 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #777;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  font-family: inherit;
}
.cb-tab-btn.active, .cb-tab-btn:hover {
  color: var(--accent, #e07b54);
  border-bottom-color: var(--accent, #e07b54);
}

.cb-carousel-posts {
  display: grid;
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
}

.cb-loading-msg { text-align: center; color: #999; padding: 40px; font-size: 16px; }

.cb-carousel-card { border-radius: 10px; overflow: hidden; box-shadow: 0 3px 16px rgba(0,0,0,0.08); background: #fff; transition: transform 0.2s; }
.cb-carousel-card:hover { transform: translateY(-4px); }
.cb-carousel-card-img { position: relative; overflow: hidden; }
.cb-carousel-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.cb-carousel-card:hover .cb-carousel-card-img img { transform: scale(1.05); }
.cb-carousel-card-body { padding: 14px 16px; }
.cb-carousel-card-body h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; color: #222; }

/* ================================================================
   RESPONSIVE HELPERS
   ================================================================ */
@media (max-width: 480px) {
  .cb-hero-title { font-size: 32px; }
  .cb-section-title { font-size: 24px; }
  .cb-cta-title { font-size: 26px; }
  .cb-cta-banner { padding: 50px 16px !important; }
  .cb-stats-bar { gap: 12px; }
  .cb-category-grid-section { padding: 40px 16px; }
}

/* Print */
@media print {
  .cb-hero-buttons, .cb-newsletter-signup, .cb-cta-banner { display: none; }
}
