:root {
  --accent: #0037ff;
  --muted: #666;
  --card: #fff;
  --radius: 12px;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.news-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  box-sizing: border-box;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  margin-bottom: 14px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-left h1 { margin: 0; }

.hero-right img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
  flex-wrap: wrap;
}

.section-head h2 { margin: 0; }

.section-view-all {
  background: transparent;
  border: 0;
  color: var(--accent);
  cursor: pointer;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.news-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.news-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #000;
  display: block;
}

.news-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-title {
  margin: 0;
  font-size: 1rem;
  color: #110f01;
}

.news-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.3;
}

.news-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 14px;
  border-radius: 28px;
  width: fit-content;
  background: linear-gradient(90deg, var(--accent), #333);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 55, 255, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.news-read-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 55, 255, 0.22);
  filter: brightness(1.03);
}

.section-controls { text-align: center; margin-top: 12px; }

.load-more {
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(90deg, var(--accent), #0037ff);
  color: #fff;
  cursor: pointer;
}

.news-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  padding: 12px;
  box-sizing: border-box;
}

.news-modal-inner {
  width: min(900px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  position: relative;
  box-sizing: border-box;
}

.news-modal .close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: transparent;
  border: 0;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
}

.news-modal-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 12px 0 16px;
  width: 100%;
}

.news-modal-gallery img {
  width: 100%;
  max-width: 640px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.news-modal .post-content {
  line-height: 1.6;
  margin-top: 12px;
  text-align: left;
}

.news-modal .post-content p { margin: 0 0 12px; }

.news-modal .post-content a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-word;
}

.news-modal .post-content a:hover { opacity: 0.85; }

.news-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, #f4f7ff 0%, #fff 100%);
  border: 1px solid rgba(0, 55, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 55, 255, 0.06);
}

.news-modal-toolbar-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #555;
}

.news-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.news-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 28px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.news-action-primary {
  background: linear-gradient(90deg, #0037ff, #333);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 55, 255, 0.2);
}

.news-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 55, 255, 0.24);
  color: #fff;
}

.news-action-secondary {
  background: #fff;
  color: #222;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.news-action-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 55, 255, 0.25);
  color: #0037ff;
}

.news-action-secondary.is-copied {
  background: linear-gradient(90deg, #e8f7ee, #f6fff9);
  border-color: #2e9b55;
  color: #1d6b3a;
}

.news-modal-excerpt { color: #666; margin: 0 0 12px; }

#news-modal-title {
  padding-right: 28px;
  line-height: 1.3;
}

.news-modal[hidden] { display: none !important; }

@media (max-width: 900px) {
  .news-list { grid-template-columns: repeat(2, 1fr); }
  .hero-right img { width: 96px; height: 64px; }
}

@media (max-width: 600px) {
  .news-main { padding: 10px 12px; }
  .news-list { grid-template-columns: 1fr; }
  .news-thumb { height: 140px; }
  .news-modal-toolbar { flex-direction: column; align-items: stretch; }
  .news-modal-actions { width: 100%; }
  .news-action-btn { flex: 1; min-width: 0; }
  .hero { flex-direction: column; align-items: flex-start; }
}
