/* ── Page wrapper ── */
.custom-blog-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Hero ── */
.blog-hero {
  text-align: center;
  padding: 80px 20px 40px;
}
.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 14px;
  line-height: 1.2;
  font-family: 'Rubik';
}
.blog-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin: 0;
}

/* ── Search ── */
.blog-search-section {
  display: flex;
  justify-content: center;
  padding: 0 20px 50px;
}
.blog-search-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
}
.blog-search-wrap input {
  width: 100%;
  padding: 14px 22px;
  border: 2px solid #e5e5e5;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s;
}
.blog-search-wrap input:focus {
  border-color: #4F46E5;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  overflow: hidden;
  z-index: 999;
}
.search-dropdown a {
  display: block;
  padding: 12px 20px;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: background .15s;
}
.search-dropdown a:hover {
  background: #f5f5f5;
}
.search-dropdown a:last-child {
  border-bottom: none;
}

/* ── 6 Tiles ── */
.blog-tiles-section {
  padding: 0 0 60px;
}
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.blog-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  text-align: center;
}
.blog-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  color: black;
}

/* ── Categories grid ── */
.blog-categories-section {
  padding: 0 0 60px;
}
.blog-categories-section h2,
.all-posts-section h2 {
  font-size: 1.8rem;
  margin-bottom: 28px;
  font-family: 'Rubik';
  text-align: center;
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cat-card {
  text-decoration: none;
  display: block;
  border-radius: 12px;
  overflow: hidden;
}
.cat-img-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.cat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.cat-card:hover .cat-img-wrap img {
  transform: scale(1.05);
}
.cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.1) 55%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.cat-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .01em;
}

/* ── All posts grid ── */
.all-posts-section {
  padding: 0 0 80px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}
.post-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.post-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.post-info {
  padding: 16px;
}
.post-cat {
  font-size: 0.75rem;
  color: #4F46E5;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.post-info h3 {
  font-size: 0.95rem;
  margin: 6px 0 8px;
  line-height: 1.4;
  color: #111;
  font-family: 'Rubik';
}
.post-info p {
  font-size: 0.82rem;
  color: #666;
  margin: 0 0 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-date {
  font-size: 0.78rem;
  color: #999;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .tiles-grid { grid-template-columns: repeat(3, 1fr); }
  .posts-grid  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .tiles-grid       { grid-template-columns: repeat(2, 1fr); }
  .categories-grid  { grid-template-columns: 1fr; }
  .posts-grid       { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tiles-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-hero h1 { font-size: 1.8rem; }
}

/* ── Subscribe section ── */
.blog-subscribe-section {
  margin: 40px 0 80px;
  background: #B256BD;
  border-radius: 20px;
  padding: 60px 50px;
  overflow: hidden;
}
.subscribe-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.subscribe-text {
  flex: 1;
  max-width: 520px;
}
.subscribe-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 12px;
  color: white;
  font-family: 'Rubik';
}
.subscribe-text > p {
  color: white;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 24px;
}
.subscribe-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 14px 20px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
.subscribe-form input[type="email"]:focus {
  border-color: #D97706;
}
.subscribe-form button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  background: #E93F87;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .2s;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.subscribe-form button:hover {
  background: #b45309;
  transform: translateY(-2px);
}
.subscribe-note {
  font-size: 0.8rem;
  color: #999;
  margin: 12px 0 0;
}
.subscribe-note a {
  color: white;
  text-decoration: underline;
}
.subscribe-success {
  color: #059669;
  font-weight: 600;
  margin: 10px 0 0;
}

/* Subscribe decorative cards */
.subscribe-visual {
  position: relative;
  width: 260px;
  height: 180px;
  flex-shrink: 0;
}
.subscribe-card {
  background: transparent;
  position: absolute;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
  width: 300px;
}
.subscribe-card--back {
  top: 0;
  right: 0;
  transform: rotate(4deg);
  opacity: .85;
}
.subscribe-card--front {
  bottom: 0;
  left: 0;
  transform: rotate(-10deg);
  display: none;
}
.subscribe-card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #D97706;
  display: block;
  margin-bottom: 6px;
}
.subscribe-card p {
  font-size: 0.85rem;
  color: #333;
  margin: 0 0 6px;
  line-height: 1.4;
}
.subscribe-card strong {
  font-size: 0.8rem;
  color: #059669;
}

.subscribe-card img {
	width: 100%;
    border-radius: 8px;
}

/* ── Responsive subscribe ── */
@media (max-width: 768px) {
  .subscribe-inner { flex-direction: column; }
  .subscribe-visual { display: none; }
  .blog-subscribe-section { padding: 40px 24px; }
}

/* =========================================
   Custom Blog Page — new styles
   (search button + category filter button)
   Add this to your theme's stylesheet
   ========================================= */

/* --- Search button --- */
.blog-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.blog-search-wrap #category-search {
  flex: 1;
  padding-right: 48px;
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: #4F46E5;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-btn:hover {
  background: #3730a3;
}

/* --- Clear filter button (shown after clicking a category tile) --- */
.clear-filter-btn {
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 6px 14px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.875rem;
}

.clear-filter-btn:hover {
  background: #e5e7eb;
}

/* --- "No posts found" message --- */
.no-posts-msg {
  text-align: center;
  padding: 2rem 0;
  color: #6b7280;
}