@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Merriweather:ital,wght@0,700;0,900;1,700&family=Dancing+Script:wght@400;500;600;700&display=swap");

:root {
  --primary: #004d4d;
  --primary-light: #006666;
  --accent: #cc0000;
  --bg-main: #ffffff;
  --bg-sub: #f8f9fa;
  --text-main: #1a1a1a;
  --text-muted: #666;
  --border: #e9ecef;
  --font-sans: "Inter", sans-serif;
  --font-serif: "Merriweather", serif;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --up-color: #00a878;
  --down-color: #ef476f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── TICKER BAR ── */
.ticker-wrap {
  background: var(--primary);
  color: #fff;
  padding: 10px 0;
  overflow: hidden;
}

.ticker-inner {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: scroll 40s linear infinite;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
}

.ticker-label {
  opacity: 0.7;
}

.ticker-val {
  font-weight: 800;
}

.ticker-val.up {
  color: #4ade80;
}

.ticker-val.down {
  color: #fb7185;
}

/* ── HEADER ── */
.main-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 120px;
  width: auto;
}

.header-slogan {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

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

.btn-outline {
  padding: 10px 18px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-premium {
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-premium:hover {
  background: #a60000;
}

/* ── NAV ── */
.main-nav {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-links {
  display: flex;
  overflow-x: auto;
}

.nav-links a {
  padding: 14px 22px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  border-bottom-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

/* ── AD BANNER ── */
.ad-banner {
  display: block;
  margin: 25px 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.ad-banner img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 120px;
  object-fit: cover;
}

.ad-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ── HERO LAYOUT ── */
.hero-layout {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: 30px;
  margin: 30px 0;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 20px;
  color: var(--text-main);
}

/* Left: opinions */
.opinions-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.opinion-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.opinion-item img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.opinion-info h4 {
  font-size: 0.82rem;
  font-weight: 800;
}

.opinion-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* Center: slider */
.hero-slider {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 420px;
  background: #222;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.8s;
  cursor: pointer;
}

.slide.active {
  opacity: 1;
}

.slide-content {
  position: relative;
  z-index: 2;
  padding: 30px;
  width: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.slide-content h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #fff;
  font-weight: 900;
  line-height: 1.15;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.slide-content p {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 8px;
  font-size: 0.9rem;
}

.slider-nums {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 10;
}

.slide-num {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.slide-num:hover,
.slide-num.active {
  background: var(--accent);
  transform: scale(1.15);
}

/* Right: market */
.market-table {
  background: var(--bg-sub);
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 16px;
}

.market-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.market-row:last-child {
  border-bottom: none;
}

.market-label {
  font-weight: 700;
  color: var(--text-muted);
}

.market-val {
  font-weight: 800;
}

/* ── NEWS GRID ── */
.news-section {
  margin: 40px 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.news-card {
  cursor: pointer;
  transition: transform 0.2s;
}

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

.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}

.news-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin: 12px 0 6px;
  line-height: 1.35;
  font-weight: 700;
}

.news-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── ARTICLE DETAIL OVERLAY ── */
.article-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  overflow-y: auto;
  padding: 40px 20px;
}

.article-overlay.open {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.article-detail {
  background: #fff;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.article-detail .detail-hero {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.article-detail .detail-body {
  padding: 36px;
}

.article-detail .detail-cat {
  background: var(--accent);
  color: #fff;
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.article-detail h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
}

.article-detail .detail-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.article-detail .detail-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #333;
}

.article-detail .detail-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
}

/* ── FOOTER ── */
.main-footer {
  background: var(--primary);
  color: #fff;
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo-title {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.footer-brand .logo-title span {
  color: var(--accent);
}

.footer-brand p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 12px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 4px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ── MOBILE BOTTOM NAV (hidden on desktop) ── */
.mobile-bottom-nav {
  display: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .hero-layout {
    grid-template-columns: 1fr 280px;
  }

  .hero-left {
    display: none;
  }

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

@media (max-width: 768px) {

  /* ── NATIVE APP BODY ── */
  body {
    padding-bottom: 72px;
    /* space for bottom nav */
    -webkit-overflow-scrolling: touch;
  }

  /* ── COMPACT STICKY HEADER ── */
  .main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  }

  .header-flex {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .logo img {
    height: 44px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .btn-outline,
  .header-actions .btn-premium {
    padding: 6px 12px;
    font-size: 0.7rem;
    border-radius: 20px;
  }

  .header-slogan {
    display: none;
  }

  /* ── HORIZONTAL SCROLL NAV (like app tabs) ── */
  .main-nav {
    padding: 0;
    position: sticky;
    top: 64px;
    z-index: 99;
    background: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    padding: 0 8px;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    white-space: nowrap;
    padding: 12px 16px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  /* ── HERO SECTION ── */
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 0;
  }

  .hero-left,
  .hero-right {
    display: none;
  }

  .hero-slider {
    height: 240px;
    border-radius: 0;
    margin: 0 -20px;
    width: calc(100% + 40px);
  }

  .slide-content {
    padding: 16px 20px;
  }

  .slide-content h2 {
    font-size: 1.15rem;
    line-height: 1.3;
  }

  .slide-content p {
    font-size: 0.78rem;
  }

  .slider-nums {
    bottom: 10px;
    gap: 3px;
  }

  .slide-num {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
    border-radius: 4px;
  }

  /* ── AD BANNERS (full width on mobile) ── */
  .ad-banner {
    margin: 12px -20px;
    border-radius: 0;
    width: calc(100% + 40px);
  }

  /* ── NEWS CARDS (native app style) ── */
  .news-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .news-card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background: #fff;
    overflow: hidden;
    transition: transform 0.15s;
  }

  .news-card:active {
    transform: scale(0.97);
  }

  .card-img {
    height: 110px;
  }

  .card-img img {
    border-radius: 12px 12px 0 0;
  }

  .news-card h3 {
    font-size: 0.82rem;
    line-height: 1.3;
    padding: 8px 10px 4px;
  }

  .news-card p {
    font-size: 0.72rem;
    padding: 0 10px 10px;
    line-height: 1.4;
  }

  .card-cat {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  /* ── SECTION TITLES ── */
  .section-title {
    font-size: 1rem;
    margin-top: 20px;
    margin-bottom: 12px;
  }

  .news-section {
    margin: 8px 0;
    padding: 12px 0;
  }

  /* ── TICKER (thinner on mobile) ── */
  .ticker-wrap {
    padding: 6px 0;
  }

  .ticker-item {
    font-size: 0.72rem;
    gap: 5px;
  }

  /* ── FOOTER (compact on mobile) ── */
  .main-footer {
    margin-bottom: 0;
    padding: 30px 0 20px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* ── BOTTOM NAV BAR (native app) ── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 6px 0 env(safe-area-inset-bottom, 8px);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  }

  .mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 0;
    color: #999;
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-nav-item.active {
    color: var(--primary);
  }

  .mob-nav-item:active {
    color: var(--primary);
    transform: scale(0.92);
  }

  .mob-nav-item svg {
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@media (max-width: 480px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .news-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    grid-template-rows: auto;
  }

  .card-img {
    height: 100%;
    min-height: 90px;
  }

  .card-img img {
    border-radius: 12px 0 0 12px;
    height: 100%;
  }

  .news-card h3 {
    padding: 10px 12px 4px;
    font-size: 0.85rem;
  }

  .news-card p {
    padding: 0 12px 10px;
    font-size: 0.75rem;
  }

  .card-cat {
    top: 6px;
    left: 6px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .header-actions .btn-outline {
    padding: 5px 8px;
    font-size: 0.6rem;
    letter-spacing: 0;
  }

  .hero-slider {
    height: 200px;
  }
}