/* ================================================================
   news.css — Aqua Laundry · NEWS PAGE
   ================================================================
   ⚠️  ต้องโหลด main.css ก่อนไฟล์นี้เสมอ
   โค้ดที่ซ้ำกันทุกหน้า (hero, breadcrumb, :root tokens,
   utilities, keyframes) ถูกย้ายไปรวมที่ main.css แล้ว
   ================================================================ */

/* :root vars → moved to main.css */

/* ============================================
   NEWS LISTING PAGE
   ============================================ */

.news-page { background: #f8fafc; padding: 48px 0 80px; }

/* Filter bar */
.news-filter-bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 36px;
}

.news-filter-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border: 1.5px solid #e2e8f0;
  border-radius: 50px; background: white;
  font-size: 13px; font-weight: 600; color: #64748b;
  cursor: pointer; transition: all 0.2s; font-family: inherit; white-space: nowrap;
}
.news-filter-btn i { font-size: 12px; }
.news-filter-btn:hover { border-color: var(--aqua-primary); color: var(--aqua-secondary); background: rgba(0,180,216,0.04); }
.news-filter-btn.active { background: var(--aqua-gradient); border-color: transparent; color: white; box-shadow: 0 3px 12px rgba(0,180,216,0.35); }

.news-search-box {
  position: relative; margin-left: auto;
}
.news-search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; color: #94a3b8; pointer-events: none; }
.news-search-input {
  padding: 9px 14px 9px 38px; border: 1.5px solid #e2e8f0; border-radius: 50px;
  font-size: 13px; color: #1e293b; background: white; width: 220px;
  transition: all 0.2s; font-family: inherit;
}
.news-search-input:focus { outline: none; border-color: var(--aqua-primary); box-shadow: 0 0 0 3px rgba(0,180,216,0.1); width: 260px; }
.news-search-input::placeholder { color: #94a3b8; }

/* Layout */
.news-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }

/* Featured article (top) */
.news-featured {
  display: grid; grid-template-columns: 1fr 1fr;
  background: white; border: 1.5px solid #e2e8f0;
  border-radius: 20px; overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 2px 16px rgba(0,119,182,0.07);
  text-decoration: none; color: inherit;
  transition: transform 0.28s, box-shadow 0.28s;
}
.news-featured:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(0,119,182,0.13); }

.news-featured-img {
  position: relative; overflow: hidden; min-height: 260px;
  background: linear-gradient(135deg, #0077B6, #023E8A);
}
.news-featured-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.news-featured:hover .news-featured-img img { transform: scale(1.05); }
.news-featured-badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--aqua-gradient); color: white;
  font-size: 11px; font-weight: 800; padding: 5px 12px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(0,180,216,0.4);
}

.news-featured-body {
  padding: 32px 36px; display: flex; flex-direction: column; justify-content: center;
}
.news-featured-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--aqua-primary); margin-bottom: 12px;
}
.news-featured-title {
  font-family: 'Kanit', sans-serif;
  font-size: 22px; font-weight: 800; color: var(--aqua-dark); margin: 0 0 12px; line-height: 1.35;
  transition: color 0.2s;
}
.news-featured:hover .news-featured-title { color: var(--aqua-secondary); }
.news-featured-excerpt { font-size: 14px; color: #64748b; line-height: 1.75; margin-bottom: 20px; }
.news-featured-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.news-meta-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #94a3b8; }
.news-meta-item i { font-size: 11px; color: var(--aqua-light); }
.news-read-more {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--aqua-primary);
  margin-top: 16px; transition: gap 0.2s;
}
.news-featured:hover .news-read-more { gap: 10px; }
.news-read-more i { font-size: 11px; }

/* Grid cards */
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.news-card {
  background: white; border: 1.5px solid #e2e8f0; border-radius: 16px;
  overflow: hidden; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 2px 10px rgba(0,119,182,0.05);
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(0,119,182,0.12); }

.news-card-img {
  position: relative; height: 180px; overflow: hidden;
  background: linear-gradient(135deg, #caf0f8, #90e0ef);
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.news-card:hover .news-card-img img { transform: scale(1.07); }
.news-card-cat {
  position: absolute; bottom: 12px; left: 14px;
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
  color: white; padding: 4px 10px; border-radius: 50px;
}

.news-card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.news-card-title {
  font-family: 'Kanit', sans-serif;
  font-size: 15px; font-weight: 800; color: var(--aqua-dark);
  margin: 0 0 8px; line-height: 1.4; transition: color 0.2s;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card:hover .news-card-title { color: var(--aqua-secondary); }
.news-card-excerpt {
  font-size: 13px; color: #64748b; line-height: 1.65; margin-bottom: 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid #f1f5f9;
}
.news-card-date { font-size: 11.5px; color: #94a3b8; display: flex; align-items: center; gap: 5px; }
.news-card-date i { font-size: 11px; }
.news-card-arrow { font-size: 12px; color: var(--aqua-primary); transition: transform 0.2s; }
.news-card:hover .news-card-arrow { transform: translateX(4px); }

/* Pagination → ใช้ .products-pagination / .pagination-btn ใน main.css */

/* Sidebar */
.news-sidebar { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 18px; }

.news-sb-card {
  background: white; border: 1.5px solid #e2e8f0; border-radius: 16px;
  padding: 20px; box-shadow: 0 2px 10px rgba(0,119,182,0.05);
}
.news-sb-title {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.7px;
  color: #94a3b8; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; gap: 7px;
}
.news-sb-title i { color: var(--aqua-primary); font-size: 12px; }

/* Recent list */
.news-sb-list { display: flex; flex-direction: column; gap: 12px; }

.news-sb-item {
  display: flex; gap: 12px; text-decoration: none; color: inherit;
  padding-bottom: 12px; border-bottom: 1px solid #f8fafc;
  transition: transform 0.2s;
}
.news-sb-item:last-child { padding-bottom: 0; border-bottom: none; }
.news-sb-item:hover { transform: translateX(3px); }

.news-sb-img {
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #caf0f8, #90e0ef);
}
.news-sb-img img { width: 100%; height: 100%; object-fit: cover; }

.news-sb-body { flex: 1; }
.news-sb-cat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--aqua-primary); letter-spacing: 0.4px; margin-bottom: 3px; }
.news-sb-item-title {
  font-size: 13px; font-weight: 700; color: var(--aqua-dark); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.18s;
}
.news-sb-item:hover .news-sb-item-title { color: var(--aqua-secondary); }
.news-sb-date { font-size: 11px; color: #94a3b8; margin-top: 4px; }

/* Tags */
.news-sb-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.news-sb-tag {
  display: inline-flex; padding: 5px 12px; border-radius: 50px;
  border: 1.5px solid #e2e8f0; background: #f8fafc;
  font-size: 12px; font-weight: 600; color: #64748b;
  text-decoration: none; transition: all 0.18s;
}
.news-sb-tag:hover { border-color: var(--aqua-primary); color: var(--aqua-secondary); background: rgba(0,180,216,0.05); }

/* ============================================
   NEWS DETAIL PAGE
   ============================================ */

.news-detail-page { background: #f8fafc; padding: 48px 0 80px; }

.news-detail-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start;
}

.news-detail-card {
  background: white; border: 1.5px solid #e2e8f0; border-radius: 20px;
  overflow: hidden; box-shadow: 0 2px 16px rgba(0,119,182,0.06);
}

/* Cover image */
.news-detail-cover {
  position: relative; height: 380px; overflow: hidden;
  background: linear-gradient(135deg, #023E8A, #0077B6);
}
.news-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-detail-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(2,62,138,0.6) 0%, transparent 60%);
}
.news-detail-cover-meta {
  position: absolute; bottom: 24px; left: 32px; right: 32px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.news-detail-cat-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--aqua-gradient); color: white;
  font-size: 11px; font-weight: 800; padding: 5px 14px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.news-detail-cover-date {
  font-size: 12px; color: rgba(255,255,255,0.8);
  display: flex; align-items: center; gap: 5px;
}
.news-detail-cover-date i { font-size: 11px; }

/* Article content */
.news-detail-body { padding: 36px 44px; }

.news-detail-title {
  font-family: 'Kanit', sans-serif;
  font-size: 30px; font-weight: 900; color: var(--aqua-dark); line-height: 1.3; margin: 0 0 20px;
}

.news-detail-meta-row {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1.5px solid #f1f5f9; border-bottom: 1.5px solid #f1f5f9;
  margin-bottom: 28px;
}
.news-detail-author { display: flex; align-items: center; gap: 9px; }
.author-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--aqua-gradient); display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: white; font-weight: 800; flex-shrink: 0;
}
.author-name { font-size: 13px; font-weight: 700; color: var(--aqua-dark); }
.author-role { font-size: 11.5px; color: #94a3b8; }
.news-detail-stat { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #94a3b8; }
.news-detail-stat i { font-size: 12px; color: var(--aqua-light); }

/* Article prose */
.news-article-prose {
  font-size: 15px; color: #374151; line-height: 1.9;
}
.news-article-prose h2 {
  font-family: 'Kanit', sans-serif; font-size: 20px; font-weight: 800;
  color: var(--aqua-dark); margin: 32px 0 14px; padding-top: 8px;
  border-top: 2px solid #f1f5f9;
}
.news-article-prose h3 {
  font-family: 'Kanit', sans-serif; font-size: 17px; font-weight: 700;
  color: var(--aqua-secondary); margin: 24px 0 10px;
}
.news-article-prose p { margin: 0 0 18px; }
.news-article-prose p:last-child { margin-bottom: 0; }
.news-article-prose strong { color: var(--aqua-dark); font-weight: 700; }
.news-article-prose a { color: var(--aqua-primary); text-decoration: underline; }
.news-article-prose ul, .news-article-prose ol { margin: 14px 0 18px; padding-left: 22px; }
.news-article-prose li { margin-bottom: 8px; }
.news-article-prose blockquote {
  border-left: 4px solid var(--aqua-primary);
  background: rgba(0,180,216,0.05);
  padding: 16px 20px; margin: 20px 0;
  border-radius: 0 12px 12px 0;
  font-size: 14.5px; color: #475569; font-style: italic;
}
.news-article-prose figure { margin: 24px 0; }
.news-article-prose figure img { width: 100%; border-radius: 12px; }
.news-article-prose figcaption { font-size: 12.5px; color: #94a3b8; text-align: center; margin-top: 8px; }

/* Highlight box */
.news-highlight-box {
  background: linear-gradient(135deg, rgba(0,180,216,0.07), rgba(0,119,182,0.04));
  border: 1px solid rgba(0,180,216,0.2); border-left: 4px solid var(--aqua-primary);
  border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 20px 0;
  font-size: 14.5px; color: #475569; line-height: 1.75;
}

/* Tags + share */
.news-detail-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 44px; flex-wrap: wrap;
  border-top: 1.5px solid #f1f5f9;
  background: #fafcff;
}
.news-detail-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-detail-tags-label { font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.news-detail-tag {
  display: inline-flex; padding: 4px 12px; border-radius: 50px;
  border: 1.5px solid #e2e8f0; background: white;
  font-size: 12px; font-weight: 600; color: #64748b;
  text-decoration: none; transition: all 0.18s;
}
.news-detail-tag:hover { border-color: var(--aqua-primary); color: var(--aqua-secondary); background: rgba(0,180,216,0.05); }

.news-share-btns { display: flex; align-items: center; gap: 8px; }
.news-share-label { font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.news-share-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1.5px solid #e2e8f0;
  background: white; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #64748b; transition: all 0.2s; text-decoration: none;
}
.news-share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.news-share-btn.fb:hover { background: #1877f2; color: white; border-color: #1877f2; }
.news-share-btn.tw:hover { background: #1da1f2; color: white; border-color: #1da1f2; }
.news-share-btn.li:hover { background: #06b6d4; color: white; border-color: #06b6d4; }
.news-share-btn.cp:hover { background: var(--aqua-primary); color: white; border-color: var(--aqua-primary); }

/* Related articles */
.news-related { padding: 32px 44px 36px; border-top: 1.5px solid #f1f5f9; }
.news-related-title {
  font-family: 'Kanit', sans-serif; font-size: 18px; font-weight: 800;
  color: var(--aqua-dark); margin: 0 0 20px;
  display: flex; align-items: center; gap: 10px;
}
.news-related-title i { color: var(--aqua-primary); font-size: 16px; }
.news-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Nav between articles */
.news-detail-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px;
}
.news-nav-item {
  background: white; border: 1.5px solid #e2e8f0; border-radius: 14px;
  padding: 16px 20px; text-decoration: none; color: inherit; transition: all 0.22s;
  box-shadow: 0 2px 8px rgba(0,119,182,0.05);
}
.news-nav-item:hover { border-color: rgba(0,180,216,0.3); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,119,182,0.1); }
.news-nav-item.prev { text-align: left; }
.news-nav-item.next { text-align: right; }
.news-nav-dir { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.news-nav-item.next .news-nav-dir { justify-content: flex-end; }
.news-nav-title { font-size: 13px; font-weight: 700; color: var(--aqua-dark); line-height: 1.4; transition: color 0.18s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-nav-item:hover .news-nav-title { color: var(--aqua-secondary); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .news-layout { grid-template-columns: 1fr 260px; }
  .news-detail-layout { grid-template-columns: 1fr 260px; }
}

@media (max-width: 900px) {
  .news-layout { grid-template-columns: 1fr; }
  .news-detail-layout { grid-template-columns: 1fr; }
  .news-sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .news-featured { grid-template-columns: 1fr; }
  .news-featured-img { min-height: 220px; }
  .news-related-grid { grid-template-columns: repeat(2, 1fr); }
  .news-detail-cover { height: 280px; }
}

@media (max-width: 640px) {
  .news-page { padding: 24px 0 60px; }
  .news-detail-page { padding: 24px 0 60px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-filter-bar { gap: 7px; }
  .news-search-box { margin-left: 0; width: 100%; }
  .news-search-input { width: 100%; }
  .news-search-input:focus { width: 100%; }
  .news-detail-body { padding: 24px 20px; }
  .news-detail-title { font-size: 22px; }
  .news-detail-footer { padding: 16px 20px; }
  .news-related { padding: 22px 20px 24px; }
  .news-related-grid { grid-template-columns: 1fr; }
  .news-detail-nav { grid-template-columns: 1fr; }
  .news-sidebar { grid-template-columns: 1fr; }
}
