/* Storefront Posts Page Styles (Ported from frontend/index.css) */
.posts-landing-hero {
  padding: 3rem 0 2rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.posts-back-link {
  margin-bottom: 1.5rem;
}

.posts-back-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--brand-900);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.posts-back-link a:hover {
  color: var(--brand-800);
}

.posts-back-link a i {
  font-size: 0.8rem;
}

.posts-hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 240px;
  align-items: center;
  gap: 2rem;
}

.posts-hero-copy {
  display: grid;
  max-width: 720px;
  gap: 0.85rem;
}

.posts-hero-copy .eyebrow {
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0;
}

.posts-hero-copy h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.posts-hero-copy h1 span.highlight-gold {
  color: #b45309;
  display: inline;
}

.posts-hero-copy > p:last-child {
  max-width: 580px;
  margin: 0;
  color: #475569;
  font-size: 1rem;
  line-height: 1.55;
}

.posts-hero-art {
  display: flex;
  min-width: 0;
  margin: 0;
  align-self: flex-end;
  justify-content: flex-end;
}

.posts-hero-art img {
  width: min(100%, 420px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(var(--brand-900-rgb), 0.08));
}

.posts-content-section {
  padding: 2.5rem 0 5rem;
  background-color: #ffffff;
}

/* Horizontal Filters Panel */
.post-filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  padding: 0.5rem 1.25rem;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.post-filter-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  padding: 0.5rem 0.25rem;
}

.post-filter-search i {
  color: #94a3b8;
  font-size: 1.05rem;
}

.post-filter-search input {
  border: none;
  outline: none;
  font-size: 0.95rem;
  width: 100%;
  color: #0f172a;
  background: transparent;
}

.post-filter-category {
  display: flex;
  align-items: center;
  border-left: 1.5px solid #e2e8f0;
  padding-left: 1.5rem;
  width: 260px;
}

.post-filter-category select {
  border: none;
  outline: none;
  background: #ffffff;
  font-size: 0.95rem;
  width: 100%;
  color: #0f172a;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.1em;
  padding-right: 1.75rem;
}

.posts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem;
  align-items: start;
}

.posts-main-column {
  display: grid;
  min-width: 0;
  gap: 2.5rem;
}

/* Custom left-line for section headings */
.posts-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.posts-section-heading > div {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.posts-section-heading > div > span {
  width: 16px;
  height: 3px;
  background: #b45309;
  border-radius: 2px;
}

.posts-section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.posts-section-heading p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
}

/* Featured Posts Grid */
.post-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.post-feature-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.post-feature-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f8fafc;
}

.post-feature-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-feature-card:hover .post-feature-card-media img {
  transform: scale(1.04);
}

.post-feature-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.5rem 0;
  color: #0f172a;
}

.post-feature-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.post-feature-card h3 a:hover {
  color: var(--brand-800);
}

.post-feature-card-body > p {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 1.25rem 0;
  flex: 1;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.post-card-footer span {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.post-card-footer time {
  color: #94a3b8;
}

/* Latest Posts List */
.post-latest-list {
  display: flex;
  flex-direction: column;
}

.post-latest-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.post-latest-item:first-child {
  padding-top: 0;
}

.post-latest-media {
  display: block;
  width: 130px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  flex-shrink: 0;
}

.post-latest-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-latest-item:hover .post-latest-media img {
  transform: scale(1.04);
}

.post-latest-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.post-latest-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  margin: 0;
}

.post-latest-item h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.post-latest-item h3 a:hover {
  color: var(--brand-800);
}

.post-latest-copy > p {
  font-size: 0.86rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-latest-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  font-size: 0.78rem;
}

.post-latest-meta span {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.post-latest-meta time {
  color: #94a3b8;
}

.posts-sidebar {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 1.5rem;
}

/* Sidebar Categories Panel */
.post-category-panel {
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.post-category-panel h2 {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#post-category-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#post-category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

#post-category-list a:hover, #post-category-list a.active {
  background-color: var(--surface-soft);
  color: var(--brand-800);
}

.post-advice-panel {
  padding: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-800) 100%);
  color: #ffffff;
  border: 1px solid var(--brand-800);
  box-shadow: 0 10px 25px rgba(var(--brand-900-rgb), 0.15);
}

.post-advice-panel h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fbbf24;
}

.post-advice-panel p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.post-advice-panel a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #b45309;
  color: #ffffff;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.post-advice-panel a:hover {
  background: #d97706;
}

/* Storefront Clean Pagination Styling */
.storefront-pagination {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: flex-end !important;
  gap: 0.65rem !important;
  width: 100% !important;
  margin-top: 2rem !important;
}

.storefront-pagination-info {
  font-size: 0.85rem !important;
  color: #64748b !important;
  text-align: right !important;
}

.storefront-pagination-info strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.storefront-pagination-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.35rem !important;
}

.page-nav {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 0.75rem !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #1e293b !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.page-nav:hover:not(.disabled) {
  background-color: var(--surface-soft) !important;
  color: var(--brand-800) !important;
  border-color: var(--brand-800) !important;
}

.page-nav.active {
  background-color: var(--brand-900) !important;
  color: #ffffff !important;
  border-color: var(--brand-900) !important;
}

.page-nav.disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  background: #f8fafc !important;
}

@media (max-width: 991px) {
  .posts-hero-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .posts-hero-art {
    justify-content: center;
  }
  .posts-layout {
    grid-template-columns: 1fr;
  }
  .post-featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .post-featured-grid {
    grid-template-columns: 1fr;
  }
  .post-latest-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .post-latest-media {
    width: 100%;
    height: 180px;
  }
  .post-latest-meta {
    align-items: flex-start;
    flex-direction: row;
  }
  .post-filter-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .post-filter-category {
    border-left: none;
    border-top: 1.5px solid #e2e8f0;
    padding-left: 0;
    padding-top: 0.5rem;
    width: 100%;
  }
}
