/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,300;8..144,400;8..144,500;8..144,700&display=swap');

/* CSS Variables for Premium Design System */
:root {
  --primary-color: #005781;
  --primary-dark: #003f5e;
  --primary-light: #e6f0f5;
  --secondary-color: #d26e4b;
  --secondary-light: #fdf3f0;
  --accent-color: #7a9c59;
  --alert-color: #b20000;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  
  --font-sans: 'Roboto Flex', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-premium: 0 20px 25px -5px rgba(0, 87, 129, 0.05), 0 10px 10px -5px rgba(0, 87, 129, 0.02);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* Base Styles & Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

li {
  list-style: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 50px 0;
  }
}

/* Header */
header.main-header {
  background-color: var(--surface-color);
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  width: auto;
  padding-top: 14px;
  padding-left: 4px;
}

.logo a {
  display: inline-block;
}

.logo-image {
  height: 72px;
  width: auto;
  display: block;
  transition: var(--transition-smooth);
}

.header-banner {
  display: block;
  line-height: 0;
}

.banner-image {
  height: 290px;
  width: auto;
  max-width: 960px;
  display: block;
  object-fit: contain;
  object-position: right top;
  transition: var(--transition-smooth);
}


/* Mobile responsive toggle button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
}

/* Navigation Menu styling to match screenshot */
.header-bottom {
  background-color: #0073aa; /* Exact dark blue background from the screenshot */
  color: var(--surface-color);
  min-height: 46px;
  display: flex;
  align-items: center;
  position: relative;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  height: 46px;
}

.main-nav {
  display: flex;
  align-items: stretch;
}

.nav-list {
  display: flex;
  align-items: stretch;
}

.nav-item {
  display: flex;
  align-items: stretch;
}

.nav-item a {
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
}

/* Active tab style: solid sky blue background filling the height */
.nav-item.active a {
  background-color: #38a3d6; /* Sky blue background from screenshot */
  color: #ffffff;
}

.nav-item a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active a:hover {
  background-color: #38a3d6;
}

/* Right side of Nav Bar (Search & Socials) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-search {
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.search-trigger {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.15); /* Dark background square */
  color: #ffffff;
  font-size: 16px;
  transition: var(--transition-smooth);
}

.search-trigger:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

/* Dropdown search form (hidden by default, toggled via JS) */
.nav-search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #ffffff;
  box-shadow: var(--shadow-md);
  padding: 12px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  display: none;
  min-width: 250px;
  z-index: 100;
}

.nav-search.active .nav-search-dropdown {
  display: block;
}

.nav-search-dropdown form {
  display: flex;
  gap: 8px;
}

.nav-search-dropdown input {
  flex-grow: 1;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  color: var(--text-primary);
}

.nav-search-dropdown button {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}

/* Social links on the nav bar */
.nav-socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-link {
  color: #ffffff;
  font-size: 14px;
  transition: var(--transition-smooth);
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Mobile responsive menu */
@media (max-width: 768px) {
  .header-banner {
    display: none;
  }

  .logo-image {
    height: 40px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0073aa;
    box-shadow: var(--shadow-md);
    z-index: 1000;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-item a {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Hero / Mission Section styling to match screenshot */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--surface-color);
  overflow: hidden;
  padding: 30px 0; /* Padding-top and padding-bottom 30px */
}

/* Remove the blue background overlay to display clean background image */
.hero::before {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.mission-box {
  background-color: rgba(6, 75, 108, 0.797); /* Exact color from original design */
  border-radius: 10px; /* Exact radius */
  padding: 25px; /* Exact padding */
  margin: 35px auto 0 auto; /* Exact margin */
  max-width: 900px; /* Aligns with column size medium-9 large-9 */
  width: 90%;
  color: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.mission-box h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  color: #ffffff;
}

.mission-box p {
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.7;
  opacity: 0.95;
  text-align: justify;
}

.mission-box p:last-child {
  margin-bottom: 0;
}

/* General Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-sans);
  border: none;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--surface-color);
  box-shadow: 0 4px 14px rgba(210, 110, 75, 0.3);
}

.btn-primary:hover {
  background-color: #be5d3c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(210, 110, 75, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--surface-color);
  transform: translateY(-2px);
}

/* Content Split Sections */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 768px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.split-text h2 {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}

.split-text h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
}

.split-text p {
  text-align: justify;
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.75;
}

.split-text ol {
  margin-left: 20px;
  margin-top: 20px;
}

.split-text li {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  list-style-type: decimal;
}

.split-image img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
}

/* Feature/Article Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

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

.card {
  background-color: var(--surface-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-premium);
  border-color: rgba(0, 87, 129, 0.2);
}

.card-img-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.card-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--primary-color);
  color: var(--surface-color);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 20px;
  z-index: 10;
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

.card-author {
  font-weight: 500;
  color: var(--text-secondary);
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 10px 24px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-tab:hover,
.filter-tab.active {
  background-color: var(--primary-color);
  color: var(--surface-color);
  border-color: var(--primary-color);
}

/* Section CTA (Forum) */
.section-cta {
  padding: 80px 0;
  background-color: rgba(0, 87, 129, 0.087);
}

@media (max-width: 768px) {
  .section-cta {
    padding: 50px 0;
  }
}

.section-cta .split-text h2 span {
  font-size: 22px;
  font-weight: 500;
  display: block;
}

/* Alert / Red Button */
.btn-alert {
  background-color: var(--alert-color);
  color: var(--surface-color);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  padding: 16px 32px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(178, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-alert:hover {
  background-color: #900000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(178, 0, 0, 0.45);
  color: #fff;
}

/* Statistics Widgets Section */
.footer-stats {
  background: linear-gradient(135deg, #1a3a4f 0%, #0d2233 50%, #081721 100%);
  padding: 70px 0;
}

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

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.stat-card {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-icon {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.stat-icon img {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.stat-number {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary-color);
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Footer */
.footer-bottom {
  background-color: #ffffff;
  color: var(--text-secondary);
  padding: 50px 0 0 0;
  font-size: 14px;
  border-top: 3px solid var(--primary-color);
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.footer-copyright p {
  margin-bottom: 6px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.footer-copyright a {
  color: var(--primary-color);
}

.footer-social-circles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Colored brand circles */
.social-circle {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition-smooth);
}

.social-circle:hover {
  transform: translateY(-3px) scale(1.1);
  opacity: 0.9;
}

.social-circle.facebook  { background-color: #1877f2; }
.social-circle.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-circle.tiktok    { background-color: #010101; }
.social-circle.twitter   { background-color: #000000; }
.social-circle.pinterest { background-color: #e60023; }
.social-circle.rss       { background-color: #f26522; }
.social-circle.youtube   { background-color: #ff0000; }

/* Absolute bottom bar */
.footer-abs {
  background-color: var(--primary-color);
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}

/* XenForo Mockup Forum Styles */
.forum-header {
  background-color: var(--surface-color);
  padding: 30px 0;
  border-bottom: 1px solid var(--border-color);
}

.forum-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.forum-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.forum-wrapper {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.forum-category {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.category-header {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  padding: 16px 24px;
  font-weight: 700;
  font-size: 18px;
  border-bottom: 1px solid var(--border-color);
}

.forum-node {
  display: grid;
  grid-template-columns: 60px 1fr;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.forum-node:last-child {
  border-bottom: none;
}

@media (max-width: 992px) {
  .forum-node {
    grid-template-columns: 50px 1fr;
    gap: 16px;
  }
  .node-stats, .node-lastpost {
    display: none;
  }
}

.node-icon {
  font-size: 24px;
  color: var(--primary-color);
}

.node-main h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.node-main h3 a:hover {
  color: var(--primary-color);
}

.node-main p {
  color: var(--text-secondary);
  font-size: 14px;
}

.node-stats {
  font-size: 13px;
  color: var(--text-secondary);
}

.node-stats span {
  display: block;
}

.node-lastpost {
  font-size: 13px;
}

.lastpost-title {
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.lastpost-meta {
  color: var(--text-muted);
}

/* Sub-category tags */
.sub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sub-tag {
  display: inline-block;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.sub-tag:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Detail Article View */
.article-wrapper {
  background-color: var(--surface-color);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  margin-top: 40px;
  border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .article-wrapper {
    padding: 24px;
  }
}

.article-header {
  text-align: center;
  margin-bottom: 30px;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 12px;
}

.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body h2 {
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 16px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body img {
  border-radius: var(--radius-sm);
  margin: 30px auto;
  box-shadow: var(--shadow-md);
}

.article-body ul, .article-body ol {
  margin-left: 24px;
  margin-bottom: 20px;
}

.article-body li {
  margin-bottom: 8px;
  list-style: inherit;
}

/* FontAwesome local fallback classes (since we use text icons or simple SVG/CSS shapes) */
.icon-search::before { content: "🔍"; }
.icon-user::before { content: "👤"; }
.icon-facebook::before { content: "📘"; }
.icon-instagram::before { content: "📸"; }
.icon-twitter::before { content: "🐦"; }
.icon-envelop::before { content: "✉️"; }
.icon-feed::before { content: "📡"; }
.icon-tiktok::before { content: "🎵"; }
.icon-youtube::before { content: "📺"; }
.icon-pinterest::before { content: "📌"; }

/* ── Forum page: two-column layout ─────────────────────────────────────── */
.forum-page-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.forum-main-col {
  flex: 1;
  min-width: 0;
}

/* ── Social sharing sidebar ─────────────────────────────────────────────── */
.forum-share-sidebar {
  flex-shrink: 0;
  width: 260px;
  position: sticky;
  top: 90px;
}
.share-box {
  background: #fff;
  border: 1px solid #dde8f0;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 2px 12px rgba(26,92,122,.10);
}
.share-box-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  color: #fff;
  background: var(--primary-color, #1a5c7a);
  text-align: center;
  border-radius: 8px;
  padding: 8px 0;
  margin-bottom: 16px;
}
.share-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  justify-items: center;
}
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.share-btn:hover { opacity: .85; transform: translateY(-2px); }
.share-btn.facebook  { background: #1877f2; }
.share-btn.twitter   { background: #000; }
.share-btn.reddit    { background: #ff4500; }
.share-btn.pinterest { background: #e60023; }
.share-btn.tumblr    { background: #35465c; }
.share-btn.whatsapp  { background: #25d366; }
.share-btn.email     { background: #6c757d; }
.share-btn.copy-link { background: #1a5c7a; }
.copy-toast {
  display: none;
  text-align: center;
  font-size: 12px;
  color: #1a5c7a;
  margin-top: 12px;
  background: #eef5fb;
  border-radius: 6px;
  padding: 5px 0;
}
.copy-toast.show { display: block; }

/* ── Stats bar "Xem toàn bộ" link ──────────────────────────────────────── */
.forum-stats-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.stats-view-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  background: var(--primary-color, #1a5c7a);
  color: #fff !important;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.stats-view-all:hover { background: var(--primary-dark, #154a62); }

@media (max-width: 960px) {
  .forum-page-layout { flex-direction: column; }
  .forum-share-sidebar { width: 100%; position: static; }
  .share-icons { grid-template-columns: repeat(4, 52px); }
}
