/* Global & Custom Styles for Cổng thông tin điện tử THPT Chu Văn An - Bắc Ninh (chuvananbacninh.io.vn) */

:root {
  --primary-blue: #003366;
  --primary-dark: #002244;
  --accent-gold: #eab308;
  --accent-red: #c92a2a;
  --accent-cyan: #0284c7;
  --neutral-bg: #f8fafc;
  --text-main: #1e293b;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: #f1f5f9;
  line-height: 1.6;
}

/* Header Gradient */
.bg-portal-blue {
  background: linear-gradient(135deg, #002855 0%, #004080 50%, #002040 100%);
}

.portal-gold-border {
  border-color: #d97706;
}

/* Breaking ticker */
.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
}

.ticker-move {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 45s linear infinite;
}

.ticker-move:hover {
  animation-play-state: paused;
}

@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Nav Menu Styles */
.nav-item {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: white;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 50;
  border-top: 3px solid #f59e0b;
}

.nav-item:hover > .nav-dropdown {
  display: block;
}

.nav-sub-item {
  position: relative;
}

.nav-sub-dropdown {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 240px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 55;
  border-left: 3px solid #3b82f6;
}

.nav-sub-item:hover > .nav-sub-dropdown {
  display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Markdown Render Styling */
.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
  color: #0f172a;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  line-height: 1.35;
}
.article-body h1 { font-size: 1.75rem; border-bottom: 2px solid #e2e8f0; padding-bottom: 0.4rem; }
.article-body h2 { font-size: 1.4rem; color: #1e3a8a; }
.article-body h3 { font-size: 1.2rem; }
.article-body p { margin-bottom: 1rem; text-align: justify; }
.article-body ul { list-style-type: disc; margin-left: 1.5rem; margin-bottom: 1rem; }
.article-body ol { list-style-type: decimal; margin-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: 0.35rem; }
.article-body blockquote {
  border-left: 4px solid #3b82f6;
  background-color: #f8fafc;
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  font-style: italic;
  color: #334155;
  border-radius: 0 8px 8px 0;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.925rem;
}
.article-body table th, .article-body table td {
  border: 1px solid #cbd5e1;
  padding: 0.6rem 0.85rem;
  text-align: left;
}
.article-body table th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: #1e293b;
}
.article-body table tr:nth-child(even) {
  background-color: #f8fafc;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin: 1rem auto;
  display: block;
}

/* Card hover animation */
.hover-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

/* Print Stylesheet */
@media print {
  header, nav, .ticker-wrap, footer, .sidebar-column, .print-hidden {
    display: none !important;
  }
  main, .article-content-column {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
