/* ============================================
   Articles Page Styles — Redesigned
   ============================================ */

/* Featured Articles Carousel */
.featured-articles {
  background: var(--white);
  padding: 80px 0;
}

.featured-articles .section-title h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.featured-articles .section-title h2 svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
  fill: var(--gold);
  stroke: var(--gold);
}

.featured-slider {
  position: relative;
  overflow: hidden;
}

.featured-track {
  display: flex;
  gap: 16px;
  transition: transform 0.5s ease;
}

.featured-card {
  flex: 0 0 calc((100% - 48px) / 4);
  min-width: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(11,46,89,0.1);
  border: 1px solid rgba(11,46,89,0.06);
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: inherit;
}

.featured-card:hover {
  box-shadow: 0 12px 36px rgba(11,46,89,0.16);
  transform: translateY(-6px);
}

.featured-card .card-image {
  height: 200px;
  overflow: hidden;
}

.featured-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-card:hover .card-image img {
  transform: scale(1.06);
}

.featured-card .card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.featured-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card p {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.featured-card .btn-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  align-self: flex-start;
}

.featured-card .btn-read:hover {
  background: var(--navy-dark);
}

.featured-card .btn-read svg {
  width: 14px;
  height: 14px;
}

/* Card Meta — วันที่/ปุ่มซ้าย · วิว+แชร์ขวา (บรรทัดเดียวกัน) */
.card-meta,
.article-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}

.featured-card .card-meta {
  margin-top: auto;
}

.card-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--gray-400);
  font-weight: 500;
}

.card-views svg {
  width: 14px;
  height: 14px;
}

.stat-pair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 500;
  white-space: nowrap;
}

.stat-item svg {
  width: 14px;
  height: 14px;
  color: var(--navy);
  opacity: 0.7;
}

.stat-item .view-num,
.stat-item .share-num {
  color: var(--navy);
  font-weight: 700;
}

.card-meta .btn-read,
.article-card-footer .btn-read {
  flex-shrink: 0;
  margin: 0;
  align-self: center;
}

.card-meta .card-share,
.article-card-footer .card-share {
  display: none;
}

.card-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.card-share-btn:hover,
.card-share-btn[aria-expanded="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.card-share-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 140px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-share-menu[hidden] {
  display: none !important;
}

.card-share-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--navy);
  text-decoration: none;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.card-share-item:hover {
  background: var(--gray-50);
}

.detail-stats-inline {
  display: inline-flex;
  margin-left: 8px;
}

.detail-stats-inline .stat-pair {
  gap: 12px;
}

.card-share svg {
  width: 14px;
  height: 14px;
}

.card-share:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* Featured Nav — dots only */
.featured-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

.featured-dots {
  display: flex;
  gap: 8px;
}

.featured-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  opacity: 0.3;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.featured-dots button.active {
  background: var(--navy);
  opacity: 1;
  width: 28px;
  border-radius: 5px;
}

/* ========== Articles Main — Sidebar + Grid ========== */
.articles-main {
  background: var(--white);
  padding: 80px 0;
}

.articles-main .section-title {
  margin-bottom: 40px;
}

.articles-main .section-title h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.articles-main .section-title p {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin: 0;
}

.articles-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.articles-sidebar {
  position: sticky;
  top: calc(var(--header-height, 64px) + 24px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px 20px;
}

.articles-sidebar .sidebar-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-100);
}

.articles-sidebar .sidebar-filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.articles-sidebar .sidebar-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--gray-600);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.articles-sidebar .sidebar-filter:hover {
  color: var(--navy);
  background: var(--gray-50);
}

.articles-sidebar .sidebar-filter.active {
  color: var(--white);
  background: var(--navy);
  font-weight: 600;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Article Card */
.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(11,46,89,0.1);
  border: 1px solid rgba(11,46,89,0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.article-card:hover {
  box-shadow: 0 12px 36px rgba(11,46,89,0.16);
  transform: translateY(-6px);
}

.article-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-card-img img {
  transform: scale(1.06);
}

.article-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 50px;
  letter-spacing: 0.01em;
}

.article-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-body p {
  font-size: 0.84rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px 12px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
  margin-top: auto;
}

.article-card-footer .article-date {
  margin-right: 0;
  flex-shrink: 0;
}

.article-card-footer .stat-pair {
  margin-left: auto;
}

.article-card-footer .btn-read {
  margin-left: 0;
  flex-shrink: 0;
}

.article-date {
  font-size: 0.78rem;
  color: var(--gray-400);
  font-weight: 500;
}

.article-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--gray-400);
  font-weight: 500;
}

.article-views svg {
  width: 14px;
  height: 14px;
}

.article-share {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.article-share svg {
  width: 13px;
  height: 13px;
}

.article-share:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ========== Downloads & Newsletter ========== */
.downloads-newsletter {
  background: var(--gray-50);
  padding: 80px 0;
}

.dn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.downloads-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.download-card {
  background: var(--white);
  border: 1px solid rgba(11,46,89,0.08);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(11,46,89,0.04);
}

.download-card:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 20px rgba(11,46,89,0.1);
  transform: translateY(-2px);
}

.download-card .dl-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: rgba(11,46,89,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}

.download-card .dl-icon svg {
  width: 26px;
  height: 26px;
}

.download-card span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.4;
}

.download-card .btn {
  padding: 8px 16px;
  font-size: 0.82rem;
  width: 100%;
}

/* Newsletter */
.newsletter-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid rgba(11,46,89,0.08);
  box-shadow: 0 4px 20px rgba(11,46,89,0.1);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.newsletter-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.newsletter-content p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 20px;
}

.newsletter-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.newsletter-form input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.newsletter-form input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11,46,89,0.08);
}

.newsletter-form .btn {
  width: 100%;
  padding: 14px;
}

.newsletter-illustration {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  opacity: 0.12;
}

.newsletter-illustration svg {
  width: 80px;
  height: 80px;
}

.newsletter-success {
  display: none;
  color: var(--line-green);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 12px;
}

.newsletter-success.show {
  display: block;
}

/* Video Section - Client Stories */
.video-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.video-section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
}

.videos-section-subtitle {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  max-width: 36rem;
}

.video-readmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.video-readmore-btn:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
}

.video-readmore-btn svg {
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  padding: 2px;
}

.video-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.video-card {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
}

.video-card-thumb {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.video-card-play {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 48px;
  height: 48px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(11,46,89,0.4);
  transition: all 0.3s ease;
  z-index: 2;
}

.video-card-play svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
  fill: #fff;
  stroke: #fff;
}

.video-card:hover .video-card-play {
  background: var(--gold);
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(200,155,60,0.5);
}

.video-card-duration {
  position: absolute;
  bottom: 24px;
  right: 16px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 2;
}

.video-card-body {
  padding: 18px 4px 0;
}

.video-card-quote {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.55;
  margin-bottom: 14px;
}

.video-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.video-card-location {
  font-size: 0.8rem;
  color: #888;
}

@media (max-width: 1024px) {
  .video-cards-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .video-cards-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .video-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* Articles Search */
.articles-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  transition: border-color 0.2s;
  min-width: 240px;
}

.articles-search:focus-within {
  border-color: var(--navy);
}

.articles-search svg {
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  flex-shrink: 0;
}

.articles-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: 'BetterTogether', sans-serif;
  font-size: 0.88rem;
  color: var(--navy);
  width: 100%;
}

.articles-search input::placeholder {
  color: var(--gray-400);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .featured-card {
    flex: 0 0 calc(50% - 18px);
  }

  .articles-layout {
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }

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

  .dn-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-section {
    grid-template-columns: 1fr;
  }

  .newsletter-illustration {
    display: none;
  }
}

@media (max-width: 768px) {
  .featured-articles,
  .articles-main,
  .downloads-newsletter {
    padding: 56px 0;
  }

  .featured-card {
    flex: 0 0 100%;
    margin: 0;
  }

  .articles-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .articles-sidebar {
    position: static;
  }

  .articles-sidebar .sidebar-filter-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .articles-sidebar .sidebar-filter {
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .downloads-grid-full {
    grid-template-columns: 1fr;
  }
}

/* Customer Services Cards */
.cs-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cs-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--gray-100);
  text-decoration: none;
  transition: all 0.3s ease;
}

.cs-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(11,46,89,0.12);
  border-color: var(--navy);
}

.cs-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), #1a4a7a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.cs-card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--white);
  stroke: var(--white);
}

.cs-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.cs-card p {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.cs-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  transition: color 0.2s, gap 0.2s;
}

.cs-card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.cs-card:hover .cs-card-link {
  color: var(--gold);
  gap: 8px;
}

.cs-card:hover .cs-card-link svg {
  transform: translateX(2px);
}

@media (max-width: 1024px) {
  .cs-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cs-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Download Step Cards */
.dl-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.dl-step-card {
  text-align: center;
  padding: 32px 24px 28px;
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dl-step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(11,46,89,0.12);
}

.dl-step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-step-icon {
  width: 64px;
  height: 64px;
  background: rgba(11,46,89,0.06);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--navy);
}

.dl-step-icon svg {
  width: 28px;
  height: 28px;
}

.dl-step-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.dl-step-card p {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 16px;
}

.dl-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  transition: all 0.2s;
  margin-top: auto;
}

.dl-step-btn svg {
  width: 14px;
  height: 14px;
}

.dl-step-card:hover .dl-step-btn {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

@media (max-width: 1024px) {
  .dl-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dl-steps-grid {
    grid-template-columns: 1fr;
  }
}
