/* ====================================================
   news.css — News & Activities Page Styles
   D2Cranes Website
   ==================================================== */

/* ─── Hero ─────────────────────────────────────────── */
.news-hero {
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.news-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

.news-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(8,34,90,.72) 0%, rgba(16,82,180,.45) 100%);
}

.news-hero__content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  animation: heroFadeIn 0.8s ease both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.news-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.news-breadcrumb a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--transition);
}
.news-breadcrumb a:hover { color: var(--yellow); }
.news-breadcrumb i { font-size: 0.6rem; }

.news-hero__content h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 10px;
}
.news-hero__content h1 span { color: var(--yellow); }

.news-hero__content > p {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  max-width: 480px;
  margin: 0 auto;
}

/* ─── Filter Bar ────────────────────────────────────── */
.news-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.news-filter__btn {
  padding: 9px 22px;
  border-radius: 100px;
  border: 2px solid #dde3ef;
  background: #fff;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.news-filter__btn:hover,
.news-filter__btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ─── News Grid ─────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ─── News Card ─────────────────────────────────────── */
.news-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #edf0f8;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.news-card__img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.news-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.news-card:hover .news-card__img-wrap img { transform: scale(1.06); }

.news-card__cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.news-card__body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.news-card__date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.news-card__body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin: 0;
}
.news-card__body h3 a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
.news-card__body h3 a:hover { color: var(--blue); }

.news-card__body p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.75;
  flex: 1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  margin-top: 4px;
  transition: gap var(--transition), color var(--transition);
}
.news-card__link:hover { gap: 10px; color: var(--blue-dark); }

/* ─── Article Page ──────────────────────────────────── */
.news-article__inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: flex-start;
}

.news-article__body {
  min-width: 0;
}

.news-article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.news-article__cat {
  background: var(--blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.news-article__meta time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.news-article__body h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 28px;
}

.news-article__cover {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}
.news-article__cover img {
  width: 100%;
  height: auto;
  display: block;
}

.news-article__text {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.85;
}
.news-article__text p { margin-bottom: 20px; }
.news-article__text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 14px;
}
.news-article__text ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-article__text ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
}
.news-article__text ul li i {
  color: var(--blue);
  margin-top: 4px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Share bar */
.news-article__share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid #edf0f8;
  border-bottom: 1px solid #edf0f8;
  margin: 32px 0 24px;
}
.news-article__share span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
}
.news-article__share a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-pale);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.news-article__share a:hover { background: var(--blue); color: #fff; }

/* Back link */
.news-article__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: gap var(--transition);
}
.news-article__back:hover { gap: 12px; }

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

.news-sidebar__box {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #edf0f8;
}

.news-sidebar__box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-pale);
}

.news-sidebar__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.news-sidebar__item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.news-sidebar__item div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.news-sidebar__cat {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.news-sidebar__item a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
  transition: color var(--transition);
}
.news-sidebar__item a:hover { color: var(--blue); }
.news-sidebar__item time {
  font-size: 0.75rem;
  color: var(--text-soft);
}

/* Category list */
.news-sidebar__cats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-sidebar__cats li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-soft);
  text-decoration: none;
  transition: color var(--transition);
}
.news-sidebar__cats li a:hover { color: var(--blue); }
.news-sidebar__cats li a i { color: var(--blue); font-size: 0.75rem; }
.news-sidebar__cats li a span {
  margin-left: auto;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}

/* CTA sidebar box */
.news-sidebar__cta {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  border: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.news-sidebar__cta i {
  font-size: 2rem;
  color: rgba(255,255,255,0.8);
}
.news-sidebar__cta h4 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.2);
  margin-bottom: 0;
}
.news-sidebar__cta p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.72);
  margin: 0;
}
.news-sidebar__btn {
  display: inline-flex;
  align-items: center;
  background: var(--yellow);
  color: var(--blue-dark);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 4px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-sidebar__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-article__inner { grid-template-columns: 1fr; }
  .news-sidebar { position: static; }
}

@media (max-width: 640px) {
  .news-hero { height: 240px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-filter { gap: 8px; }
  .news-filter__btn { padding: 8px 16px; font-size: 0.8rem; }
}
