/* Homepage — mydigitalword.com clone styles */

.home-page {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  padding-top: 72px;
}

@media (min-width: 1024px) {
  .home-page {
    padding-top: 84px;
  }
}

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid #eceef2;
}
.site-header .site-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffb800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px 4px 5px;
  box-sizing: border-box;
}
.site-header .site-logo-mark__text {
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  color: #111827;
  letter-spacing: -0.02em;
}
.site-header .site-logo-mark__line {
  display: block;
  width: 18px;
  height: 2px;
  background: #111827;
  margin-top: 3px;
  border-radius: 1px;
}
.site-header .site-brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
}
.site-header .primary-nav ul {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header .primary-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: #111827;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.site-header .primary-nav a:hover {
  color: #374151;
}
.site-header .search-btn {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: #f3f4f6;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.site-header .search-btn:hover {
  background: #e5e7eb;
}
.site-header.is-sticky {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ---- Search modal ---- */
.search-modal-root {
  position: relative;
}
.search-modal[hidden] {
  display: none !important;
}
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
}
.search-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}
.search-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 700px;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.search-modal__input-wrap {
  position: relative;
}
.search-modal__input {
  width: 100%;
  padding: 1.5rem 3.5rem 1.5rem 1rem;
  border: 0;
  outline: none;
  font-size: 1rem;
  box-sizing: border-box;
}
.search-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.search-modal__close:hover {
  background: #e5e7eb;
}
.search-modal__results-head {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
}
.search-modal__results-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
}
.search-modal__results[hidden],
.search-modal__message[hidden] {
  display: none !important;
}
.search-modal__result {
  padding: 0.875rem 1rem;
}
.search-modal__result:hover {
  background: #f3f4f6;
}
.search-modal__result-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.search-modal__result-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 500;
  color: #15171a;
}
.search-modal__result-excerpt {
  margin: 0;
  font-size: 0.875rem;
  color: #4b5563;
}
.search-modal__message {
  padding: 0.875rem 1rem;
  text-align: center;
  color: #6b7280;
}
body.search-modal-open {
  overflow: hidden;
}

/* ---- Mobile menu toggle (3-line hamburger) ---- */
.mobile-menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.mobile-menu-toggle:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}
.mobile-menu-toggle__icon {
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mobile-menu-toggle__line {
  display: block;
  width: 100%;
  height: 2px;
  background: #111827;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
  transform-origin: center;
}
.mobile-menu-toggle.is-open .mobile-menu-toggle__line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-menu-toggle.is-open .mobile-menu-toggle__line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.is-open .mobile-menu-toggle__line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-panel {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  padding: 1.25rem 1.5rem 1.5rem;
  background: #fff;
  border: 1px solid #eceef2;
  border-top: none;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}
.mobile-menu-panel[hidden] {
  display: none !important;
}
.mobile-menu-panel .primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-menu-panel .primary-nav a {
  display: block;
  padding: 0.75rem 0;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-bottom: 1px solid #f3f4f6;
}
.mobile-menu-panel .primary-nav li:last-child a {
  border-bottom: none;
}

@media (min-width: 1024px) {
  .mobile-menu-toggle,
  .mobile-menu-panel {
    display: none !important;
  }
}

/* ---- Spotlight / hero (mydigitalword.com) ---- */
.home-top-featured {
  margin-bottom: 2.5rem;
}

.home-category-badge {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  background: #f3e8ff;
  color: #7c3aed;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.home-hero-card {
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.home-hero__link {
  display: grid;
  grid-template-columns: 1fr;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 768px) {
  .home-hero__link {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 280px;
  }
}

.home-hero__media {
  overflow: hidden;
  background: #f3f4f6;
  min-height: 220px;
}

@media (min-width: 768px) {
  .home-hero__media {
    min-height: 100%;
    border-right: 1px solid #f3f4f6;
  }
}

.home-hero__media img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

@media (min-width: 768px) {
  .home-hero__media img {
    min-height: 280px;
  }
}

.home-hero__placeholder {
  width: 100%;
  min-height: 220px;
  background: #e5e7eb;
}

.home-hero:hover .home-hero__media img {
  transform: scale(1.02);
}

.home-hero__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1.25rem 1.5rem;
}

@media (min-width: 768px) {
  .home-hero__body {
    padding: 2rem 2rem 2rem 1.75rem;
  }
}

.home-hero__title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.28;
  color: #111827;
  margin: 0.75rem 0 0.65rem;
  transition: color 0.2s;
}

@media (min-width: 768px) {
  .home-hero__title {
    font-size: 1.85rem;
  }
}

.home-hero:hover .home-hero__title {
  color: #374151;
}

.home-hero__excerpt {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #6b7280;
  margin: 0;
}

/* ---- Secondary spotlight row (horizontal mini cards) ---- */
.home-secondary-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .home-secondary-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.home-secondary-card {
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  overflow: hidden;
}

.home-secondary__link {
  display: flex;
  align-items: stretch;
  gap: 0;
  text-decoration: none;
  color: inherit;
  min-height: 118px;
}

.home-secondary__media {
  width: 118px;
  min-width: 118px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f3f4f6;
}

@media (min-width: 768px) {
  .home-secondary__media {
    width: 132px;
    min-width: 132px;
  }
}

.home-secondary__media img {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.home-secondary__placeholder {
  width: 100%;
  height: 100%;
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
}

.home-secondary:hover .home-secondary__media img {
  transform: scale(1.04);
}

.home-secondary__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.875rem 1rem 0.875rem 0;
  flex: 1;
  min-width: 0;
}

@media (min-width: 768px) {
  .home-secondary__body {
    padding: 1rem 1.15rem 1rem 0;
  }
}

.home-secondary__title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
  margin: 0.55rem 0 0;
  transition: color 0.2s;
}

@media (min-width: 768px) {
  .home-secondary__title {
    font-size: 1.05rem;
  }
}

.home-secondary:hover .home-secondary__title {
  color: #374151;
}

/* ---- Section headings (centered) ---- */
.home-section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}
.home-section-head h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 0.35rem;
}
.home-section-head p {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0;
}

/* ---- Category carousel ---- */
.home-category-block {
  margin-bottom: 2rem;
}
.category-carousel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}
.category-pills {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0.25rem 0;
}
.category-pills::-webkit-scrollbar {
  display: none;
}
.category-pill {
  white-space: nowrap;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
}
.category-pill:hover {
  border-color: #9ca3af;
}
.category-pill.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.carousel-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover {
  background: #f9fafb;
}

/* ---- Grid cards (image + title only) ---- */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 640px) {
  .home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .home-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}
.home-grid-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.home-grid-card__media {
  overflow: hidden;
  border-radius: 14px;
  background: #f3f4f6;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.875rem;
}
.home-grid-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.home-grid-card:hover .home-grid-card__media img {
  transform: scale(1.03);
}
.home-grid-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #111827;
  margin: 0;
  transition: color 0.2s;
}
.home-grid-card:hover .home-grid-card__title {
  color: #374151;
}

/* ---- Browse all button (pill outline) ---- */
.home-browse-section {
  display: flex;
  justify-content: center;
  padding: 3rem 0 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .home-browse-section {
    padding-top: 4.375rem;
    margin-top: 2rem;
  }
}

.home-browse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.875rem;
  border: 1px solid #15171a;
  border-radius: 9999px;
  background: #fff;
  color: #15171a;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.home-browse-btn:hover {
  background: #15171a;
  border-color: #15171a;
  color: #fff;
}

/* ---- Load more button (all posts page) ---- */
.home-load-more-section {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0 1rem;
}

.home-load-more-section.hidden {
  display: none !important;
}

.home-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.875rem;
  border: 1px solid #15171a;
  border-radius: 9999px;
  background: #fff;
  color: #15171a;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.home-load-more-btn:hover:not(:disabled) {
  background: #15171a;
  border-color: #15171a;
  color: #fff;
}

.home-load-more-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.home-feed-loading,
.home-feed-empty {
  text-align: center;
  padding: 2.5rem 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.home-feed-loading.hidden,
.home-feed-empty.hidden {
  display: none !important;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: #111827;
  text-decoration: none;
  font-size: 0.875rem;
}
.pagination .page-numbers.current {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.pagination .page-numbers:hover {
  background: #f3f4f6;
}
