:root {
  --brand-color: #963a5e;
  --brand-light: #fdf5f8;
  --brand-hover: #7a2f4c;
  --card-bg: #ffffff;
  --text-dark: #2d2d2d;
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-soft: 0 10px 30px rgba(150, 58, 94, 0.08);
}

/* Layout */
.page-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px;
}

.home-section {
  margin-bottom: 80px;
}

.category-section {
  padding: 40px 0;
  background-color: #fafafb;
}

/* Headers */
.section-header {
  margin-bottom: 30px;
  position: relative;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 30px;
  display: inline-block;
  position: relative;
}

.title-accent {
  width: 40px;
  height: 4px;
  background: var(--brand-color);
  margin-top: 8px;
  border-radius: 2px;
}

/* Grids */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.recipe-grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Cards */
.custom-nav-card {
  text-decoration: none !important;
  color: var(--text-dark);
  background: var(--card-bg);
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.04);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.custom-nav-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-color);
  box-shadow: var(--shadow-soft);
}

/* Card Inner */
.card-inner {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

/* Icons */
.icon-box {
  width: 64px;
  height: 64px;
  background: var(--brand-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: var(--transition-smooth);
}

.icon-box img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.custom-nav-card:hover .icon-box {
  background: var(--brand-color);
  transform: scale(1.1);
}

.custom-nav-card:hover .icon-box img {
  filter: brightness(0) invert(1);
}

/* Text */
.text-box h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  word-wrap: break-word;
}

/* Tags */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-pill {
  text-decoration: none;
  background: #f8f9fa;
  color: #555;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 500;
  border: 1px solid #eee;
  transition: all 0.3s ease;
}

.tag-pill:hover {
  background: var(--brand-color);
  color: white;
  border-color: var(--brand-color);
  transform: scale(1.05);
}

/* News */
.news-post-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  transition: 0.3s;
}

.news-post-card:hover {
  box-shadow: var(--shadow-soft);
}

.post-thumb img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-post-card:hover .post-thumb img {
  transform: scale(1.05);
}

.post-details {
  padding: 25px;
}

.post-details h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
  line-height: 1.4;
}

.post-details h4:hover {
  color: var(--brand-color);
}

.post-info {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: #888;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #f5f5f5;
}

.post-info i {
  color: var(--brand-color);
}

.view-all-link {
  color: var(--brand-color);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
}

.view-all-link:hover {
  color: var(--brand-hover);
}

/* SEO */
.seo-wrapper {
  margin-top: 100px;
}

.seo-inner {
  padding: 50px;
  background: linear-gradient(145deg, #ffffff, var(--brand-light));
  border-radius: 30px;
  border: 1px solid rgba(150, 58, 94, 0.1);
  line-height: 1.8;
  color: #555;
}

.seo-highlight {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--brand-color);
  margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 992px) {
  .recipe-grid-layout {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.6rem;
  }

  .page-wrapper {
    padding: 30px 15px;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .card-inner {
    padding: 20px 12px;
  }

  .icon-box {
    width: 52px;
    height: 52px;
  }

  .icon-box img {
    width: 32px;
    height: 32px;
  }

  .text-box h5 {
    font-size: 0.95rem;
  }

  .news-post-card .post-thumb img {
    height: 200px;
  }
}

@media (max-width: 650px) {
  .recipe-grid-layout {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Ad styles */
  :root {
      --brand-text: #963a5e;
      --glass-bg: rgba(255, 255, 255, 0.88); 
      --glass-border: rgba(150, 58, 94, 0.2);
  }

  .ad-container {
      text-decoration: none;
      display: block;
      margin: 20px auto;
      max-width: 850px;
  }

  .ad-viewport {
      position: relative;
      min-height: 320px;
      height: auto; 
      border-radius: 20px;
      overflow: hidden;
      display: flex;
      align-items: center; 
      padding: 30px;
      background: #fdfafb;
      transition: transform 0.4s ease;
  }

  .ad-visual {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      z-index: 1;
  }

  .ad-scrim {
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, 
          rgba(255, 255, 255, 0.1) 0%, 
          rgba(150, 58, 94, 0.02) 100%);
      z-index: 2;
  }

  .ad-content-wrapper {
      position: relative;
      z-index: 3;
      width: 100%;
      max-width: 400px;
  }

  .ad-glass-card {
      padding: 24px;
      background: var(--glass-bg);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      border: 1px solid var(--glass-border);
      border-radius: 16px;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  .ad-tag {
      display: inline-block;
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      background: var(--brand-text);
      color: #fff;
      padding: 3px 10px;
      border-radius: 50px;
      margin-bottom: 12px;
  }

  /* Styles preserved for h5 via the .ad-title class */
  .ad-title {
      font-size: 1.6rem;
      font-weight: 800;
      margin: 0 0 8px 0;
      line-height: 1.2;
      color: var(--brand-text);
  }

  .ad-description {
      font-size: 0.95rem;
      line-height: 1.5;
      margin-bottom: 18px;
      color: var(--brand-text);
      opacity: 0.9;
  }

  .ad-button {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-weight: 700;
      font-size: 0.9rem;
      color: var(--brand-text);
  }

  .ad-arrow {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1.5px solid var(--brand-text);
      transition: all 0.3s ease;
  }

  .ad-arrow svg { width: 14px; }

  .ad-container:hover .ad-viewport {
      transform: translateY(-2px);
  }

  .ad-container:hover .ad-glass-card {
      background: rgba(255, 255, 255, 0.95);
      box-shadow: 0 10px 25px rgba(150, 58, 94, 0.12);
  }

  .ad-container:hover .ad-arrow {
      background: var(--brand-text);
      color: #fff;
      transform: translateX(4px);
  }

  @media (max-width: 600px) {
      .ad-viewport { min-height: 280px; padding: 15px; }
      .ad-title { font-size: 1.4rem; }
      .ad-glass-card { padding: 20px; }
  }