/**
 * ACCASI NEWS Feed Styles
 * Custom responsive styling for newspaper articles, press clippings, and interactive lightbox.
 */

:root {
  --nf-primary: #FFA33E;
  --nf-primary-dark: #e88d25;
  --nf-secondary: #003471;
  --nf-accent-green: #35AC4A;
  --nf-dark: #0f172a;
  --nf-light-bg: #f8fafc;
  --nf-paper-bg: #fdfbf7;
  --nf-border: #e2e8f0;
  --nf-paper-border: #e5dfd3;
  --nf-text: #334155;
  --nf-text-muted: #64748b;
}

.newsfeed-container {
  font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--nf-text);
  background-color: var(--nf-light-bg);
  padding-bottom: 80px;
  width: 100%;
  overflow-x: hidden;
}

/* Hero Banner */
.newsfeed-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 52, 113, 0.90) 0%, rgba(15, 23, 42, 0.85) 100%),
              url('https://accasi.org/wp-content/uploads/2024/06/Artboard-4.jpg') center center/cover no-repeat;
  padding: 130px 20px 110px;
  text-align: center;
  color: #ffffff;
}

.newsfeed-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.newsfeed-breadcrumbs {
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.newsfeed-breadcrumbs a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s;
}

.newsfeed-breadcrumbs a:hover {
  color: var(--nf-primary);
}

.newsfeed-hero-title {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 15px;
  color: #ffffff;
  text-transform: uppercase;
}

.newsfeed-hero-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: rgba(255, 255, 255, 0.9);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 300;
}

/* Admin Instructions / Guide Box */
.newsfeed-guide-box {
  max-width: 1160px;
  margin: -40px auto 40px;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px 30px;
  box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.08);
  border-left: 5px solid var(--nf-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 10;
}

.newsfeed-guide-text h4 {
  margin: 0 0 6px;
  font-family: 'Kanit', sans-serif;
  font-size: 18px;
  color: var(--nf-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.newsfeed-guide-text p {
  margin: 0;
  font-size: 14px;
  color: var(--nf-text-muted);
  line-height: 1.5;
}

.newsfeed-guide-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.newsfeed-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.newsfeed-btn-primary {
  background: var(--nf-primary);
  color: #ffffff !important;
}

.newsfeed-btn-primary:hover {
  background: var(--nf-primary-dark);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 163, 62, 0.35);
}

.newsfeed-btn-outline {
  background: transparent;
  color: var(--nf-secondary) !important;
  border: 1px solid var(--nf-border);
}

.newsfeed-btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Main Gallery Section */
.newsfeed-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.newsfeed-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
  gap: 15px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e2e8f0;
}

.newsfeed-section-heading {
  margin: 0;
  font-family: 'Kanit', sans-serif;
  font-size: 26px;
  color: var(--nf-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.newsfeed-badge-count {
  background: var(--nf-secondary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: 'Ubuntu', sans-serif;
}

.newsfeed-filter-hint {
  font-size: 14px;
  color: var(--nf-text-muted);
}

/* Newspaper Cards Grid */
.newsfeed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}

/* Single Newspaper Card */
.newspaper-card {
  background: var(--nf-paper-bg);
  border: 1px solid var(--nf-paper-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
}

.newspaper-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
}

/* Newspaper Header Strip on the card */
.newspaper-card-header {
  background: #f4ede2;
  border-bottom: 1px solid #e0d7c7;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #786c5a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.newspaper-source-badge {
  color: var(--nf-secondary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.newspaper-date-badge {
  color: #8c7e6b;
  font-weight: 500;
}

/* Newspaper Image Viewer Wrapper */
.newspaper-image-wrap {
  position: relative;
  background: #f1ede4;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newspaper-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}

.newspaper-card:hover .newspaper-img {
  transform: scale(1.03);
}

/* Hover Overlay */
.newspaper-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 52, 113, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #ffffff;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(2px);
}

.newspaper-card:hover .newspaper-overlay {
  opacity: 1;
}

.newspaper-zoom-icon {
  width: 48px;
  height: 48px;
  background: var(--nf-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.newspaper-overlay span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Newspaper Details */
.newspaper-card-body {
  padding: 18px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.newspaper-card-title {
  font-family: 'Kanit', sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 8px;
  color: var(--nf-dark);
}

.newspaper-card-desc {
  font-size: 13px;
  color: var(--nf-text-muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.newspaper-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}

.newspaper-read-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--nf-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.newspaper-read-btn:hover {
  color: var(--nf-primary-dark);
  text-decoration: underline;
}

/* Placeholder / Upload Slot Card */
.newspaper-card-placeholder {
  background: #fdfbf7;
  border: 2px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  min-height: 480px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.newspaper-card-placeholder:hover {
  border-color: var(--nf-primary);
  background: #fff9f0;
  transform: translateY(-4px);
}

.placeholder-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--nf-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  transition: transform 0.3s;
}

.newspaper-card-placeholder:hover .placeholder-icon {
  transform: scale(1.1);
  background: #fff;
  box-shadow: 0 4px 15px rgba(255, 163, 62, 0.2);
}

.placeholder-title {
  font-family: 'Kanit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--nf-dark);
  margin: 0 0 8px;
}

.placeholder-desc {
  font-size: 13px;
  color: var(--nf-text-muted);
  max-width: 260px;
  line-height: 1.5;
  margin: 0 0 20px;
}

/* Press Contact Block */
.newsfeed-press-contact {
  background: linear-gradient(135deg, #003471 0%, #0c2340 100%);
  border-radius: 12px;
  padding: 35px 40px;
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 40px;
}

.newsfeed-press-text h3 {
  margin: 0 0 8px;
  font-family: 'Kanit', sans-serif;
  font-size: 22px;
  color: #ffffff;
}

.newsfeed-press-text p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  line-height: 1.5;
}

.newsfeed-press-contact .newsfeed-btn {
  white-space: nowrap;
}

/* Fullscreen Interactive Lightbox Modal */
.nf-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 25, 0.94);
  z-index: 999999;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nf-lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.nf-lightbox-topbar {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
}

.nf-lightbox-title {
  font-family: 'Kanit', sans-serif;
  font-size: 18px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

.nf-lightbox-controls {
  display: flex;
  gap: 12px;
}

.nf-ctrl-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.nf-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.nf-ctrl-btn.close-btn:hover {
  background: #ef4444;
}

.nf-lightbox-stage {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.nf-lightbox-img-wrapper {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  cursor: grab;
}

.nf-lightbox-img-wrapper:active {
  cursor: grabbing;
}

.nf-lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.nf-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.nf-nav-btn:hover {
  background: var(--nf-primary);
}

.nf-nav-prev { left: 24px; }
.nf-nav-next { right: 24px; }

.nf-lightbox-bottombar {
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

@media (max-width: 768px) {
  .newsfeed-hero {
    padding: 100px 16px 80px;
  }
  .newsfeed-grid {
    grid-template-columns: 1fr;
  }
  .newsfeed-guide-box {
    flex-direction: column;
    align-items: flex-start;
    margin-top: -20px;
    padding: 20px;
  }
  .nf-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .nf-nav-prev { left: 10px; }
  .nf-nav-next { right: 10px; }
}
