/* ==================== Demo News CSS - Mobile First ==================== */

/* Disable smooth scroll for immediate navigation */
html {
  scroll-behavior: auto !important;
}

/* Offset scroll position to account for any fixed headers */
#news-content {
  scroll-margin-top: 20px;
}

/* Page Hero */
.page-hero {
  background: linear-gradient(
    135deg,
    #26d0ce 0%,
    /* Bright Teal */ #1a2980 60%,
    /* Deep Navy */ #0b90da 100% /* Soft Blue finish */
  );
  color: var(--pure-white);
  padding: 20px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -10%;
  width: 120%;
  height: 200%;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    );
  animation: floatBubbles 20s ease-in-out infinite;
  pointer-events: none;
}

.page-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.05) 100%
  );
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.page-hero__title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.6s ease-out;
  line-height: 1.2;
  color: var(--pure-white);
}

.page-hero__subtitle {
  font-size: 18px;
  opacity: 0.95;
  font-weight: 400;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.6s ease-out 0.2s both;
  color: var(--pure-white);
}

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

@keyframes floatBubbles {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.1);
  }
  66% {
    transform: translate(-20px, -30px) scale(0.95);
  }
}

/* News Page Main */
.news-page {
  background: var(--bg-gradient-light);
}

.news-page > .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==================== News Navigation (Mobile: Topbar) ==================== */

.news-nav__title {
  display: none;
}

.news-nav__list {
  list-style: none;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
}

.news-nav__list::-webkit-scrollbar {
  height: 6px;
}

.news-nav__list::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 3px;
}

.news-nav__list::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.news-nav__list::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.news-nav__item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 14px 16px;
  background: var(--pure-white);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
  flex-shrink: 0;
  min-width: 240px;
  max-width: 240px;
  min-height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.news-nav__item:hover {
  background: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.news-nav__item:hover .news-nav__date {
  color: #475569;
}

.news-nav__item:hover .news-nav__label {
  color: var(--text-dark);
}

.news-nav__item--active {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--pure-white);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.news-nav__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-nav__date {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.news-nav__item--active .news-nav__date {
  color: rgba(255, 255, 255, 0.95);
}

.news-nav__label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-nav__item--active .news-nav__label {
  color: var(--pure-white);
}

.news-nav__badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--secondary-color);
  color: var(--pure-white);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.news-nav__badge[data-level="promo"] {
  background: var(--badge-promo);
}

.news-nav__badge[data-level="service"] {
  background: #3b82f6;
}

.news-nav__badge[data-level="announcement"] {
  background: #8b5cf6;
}

.news-nav__item--active .news-nav__badge {
  background: rgba(255, 255, 255, 0.3);
  color: var(--pure-white);
}

/* ==================== Article Styles ==================== */

.news {
  background: var(--pure-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: fadeIn 0.4s ease-out;
}

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

.news__header {
  padding: 24px 20px 16px;
}

.news__header .meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.news__header .meta time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
}

.news__header .meta time i {
  color: var(--secondary-color);
}

.news__header .meta span {
  padding: 6px 14px;
  background: var(--secondary-color);
  color: var(--pure-white);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news__header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.news__image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.news__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news__text {
  padding: 24px 20px;
  color: var(--text-dark);
  line-height: 1.8;
  font-size: 15px;
}

.news__text h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 24px 0 12px;
  text-align: left;
  margin-top: 1em;
}

.news__text p {
  margin-bottom: 16px;
}

.news__text ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.news__text ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}

.news__text ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 18px;
}

/* ==================== Tablet (768px+) ==================== */

@media (min-width: 768px) {
  .page-hero__title {
    font-size: 48px;
  }

  .page-hero__subtitle {
    font-size: 20px;
  }

  .news-nav__item {
    min-width: 280px;
    max-width: 280px;
  }

  .news__header {
    padding: 32px 24px 20px;
  }

  .news__header h1 {
    font-size: 26px;
  }

  .news__image {
    height: 300px;
  }

  .news__text {
    padding: 32px 24px;
    font-size: 16px;
  }

  .news__text h2 {
    font-size: 22px;
    margin: 28px 0 14px;
  }
}

/* ==================== Desktop (1200px+) ==================== */

@media (min-width: 1200px) {
  .page-hero {
    padding: 100px 0;
  }

  .page-hero__title {
    font-size: 56px;
    margin-bottom: 20px;
  }

  .page-hero__subtitle {
    font-size: 22px;
  }

  .news-page > .container {
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
  }

  /* Sidebar mode */
  .news-nav {
    flex-shrink: 0;
    width: 320px;
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
  }

  .news-nav__title {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-light);
  }

  .news-nav__note {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-light);
  }

  .news-nav__list {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: visible;
    padding: 0;
  }

  .news-nav__item {
    min-width: auto;
    max-width: none;
    width: 100%;
  }

  .news-nav__item:hover {
    transform: translateX(4px);
  }

  /* Article takes remaining space */
  .news {
    flex: 1;
    min-width: 0;
  }

  .news__header {
    padding: 40px 40px 24px;
  }

  .news__header h1 {
    font-size: 36px;
  }

  .news__image {
    height: 400px;
  }

  .news__text {
    padding: 40px;
  }

  .news__text h2 {
    font-size: 24px;
    margin: 32px 0 16px;
  }
}
