/* ================================================================
   style.css — Trường Mầm Non Hoa Ngôi Sao Nhỏ
   Theme system: uses CSS variables set by config/theme.php
   ================================================================ */

/* ── CSS Variables fallback (overridden by inline <style> from PHP) */
:root {
  --primary:   #2EAA4B;
  --primary-d: #1d8a38;
  --secondary: #F5A623;
  --accent:    #FFD166;
  --topbar-bg: #2EAA4B;
  --primary-r: 46;
  --primary-g: 170;
  --primary-b: 75;
  --overlay:   0.45;
  --font-main: 'Palatino', sans-serif;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; }
body { font-family: var(--font-main); font-size: 15px; color: #333; background: #fff; margin: 0; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }
ul { list-style: none; margin: 0; padding: 0; }

/* ================================================================
   TOPBAR INFO — unified green + glass effect
   ================================================================ */
.topbar-info {
  background: linear-gradient(100deg, var(--primary-d) 0%, var(--primary) 50%, var(--primary-d) 100%);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
  overflow: hidden;
  position: relative;
}
/* Shimmer overlay toàn topbar */
.topbar-info::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.07) 40%,
    rgba(255,255,255,.14) 50%,
    rgba(255,255,255,.07) 60%,
    rgba(255,255,255,0) 100%);
  pointer-events: none;
}
/* Wrapper flex ngang */
.topbar-inner {
  display: flex;
  align-items: stretch;
  min-height: 52px;
  position: relative;
  width: 100%;
}

/* ── Panel trái: Contact info ── */
.topbar-panel-contact {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,.2);
}

/* ── Divider xiên ── */
.topbar-divider {
  width: 24px;
  background: rgba(255,255,255,.12);
  clip-path: polygon(0 0, 100% 0, 60% 100%, 0 100%);
  flex-shrink: 0;
}

/* ── Panel giữa: Social icons (flex:1, căn giữa) — glass effect ── */
.topbar-panel-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  background: rgba(0,0,0,.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-left: 1px solid rgba(255,255,255,.15);
  border-right: 1px solid rgba(255,255,255,.15);
}
.topbar-follow-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .75;
  margin-right: 4px;
  white-space: nowrap;
}

/* ── Login (ngoài cùng phải) — glass effect ── */
.topbar-login-wrap {
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: rgba(0,0,0,.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,.15);
}

/* ── Info items ── */
.topbar-info-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 20px;
  border-right: 1px solid rgba(255,255,255,0.15);
  transition: background .2s;
}
.topbar-info-item:hover { background: rgba(255,255,255,.08); }
.topbar-icon-wrap {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.28);
  transition: background .2s, transform .2s;
}
.topbar-info-item:hover .topbar-icon-wrap { background: rgba(255,255,255,.32); transform: scale(1.08); }
.topbar-icon { font-size: 15px; opacity: .95; }
.topbar-label { font-size: 10px; opacity: .68; text-transform: uppercase; letter-spacing: .8px; line-height: 1; margin-bottom: 3px; }
.topbar-value { font-size: 13.5px; font-weight: 700; line-height: 1.3; color: #fff; }

/* ── Social icons ── */
.topbar-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-size: 13px;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.topbar-social:hover {
  background: rgba(255,255,255,0.30); color: #fff;
  transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
.btn-login {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--primary); font-weight: 700; font-size: 13px;
  padding: 8px 22px; border-radius: 50px;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  transition: all .22s; white-space: nowrap; letter-spacing: .3px;
}
.btn-login:hover { background: var(--accent); color: #333; transform: translateY(-1px); box-shadow: 0 5px 15px rgba(0,0,0,.22); }
.btn-login-sm { padding: 5px 14px; font-size: 12px; }
.topbar-center { background: linear-gradient(90deg, var(--primary-d), var(--primary)); color: #fff; font-size: 13px; }
.topbar-center .topbar-social { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.15); font-size: 12px; border: 1px solid rgba(255,255,255,.2); }
.topbar-center .topbar-value { color: #fff; font-size: 13px; }

/* ================================================================
   MAIN NAVBAR — Split Design (nửa màu / nửa trắng)
   ================================================================ */
@keyframes navbarDrop {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.main-navbar {
  background: #fff;
  box-shadow: 0 3px 20px rgba(0,0,0,.1);
  z-index: 1030;
  animation: navbarDrop .5s cubic-bezier(.25,.46,.45,.94) both;
}
.main-navbar.scrolled { box-shadow: 0 6px 28px rgba(0,0,0,.14); }
.main-navbar.scrolled .navbar-inner { min-height: 70px; }
.main-navbar.scrolled .logo-img { height: 52px; }
.main-navbar.scrolled .logo-box         { width: 52px; height: 52px; font-size: 20px; }
.main-navbar.scrolled .logo-avatar-wrap { width: 54px; height: 54px; }
.navbar-inner {
  display: flex; align-items: stretch; min-height: 90px; position: relative;
  transition: min-height .35s ease;
}
.navbar-inner.layout-center { justify-content: space-between; }

/* ── Nửa bên màu: logo wrap ── */
.navbar-logo-wrap {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 36px) 100%, 0 100%);
  margin-left: -1.5rem;          /* triệt tiêu padding-left của container-fluid px-4 */
  padding-left: 1.5rem;          /* khôi phục khoảng cách nội dung */
  padding-right: 62px;           /* bù cho phần bị clip + khoảng thở */
  display: flex; align-items: center; flex-shrink: 0;
  align-self: stretch;
  position: relative;
  transition: filter .35s ease;
}
.navbar-logo-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.navbar-logo-wrap:hover { filter: brightness(1.07); }

/* Center layout: không dùng split */
.layout-center .navbar-logo-wrap {
  background: transparent; clip-path: none; padding-right: 0;
}
.layout-center .logo-name    { color: var(--primary) !important; text-shadow: none; }
.layout-center .logo-tagline { color: #888 !important; }
.layout-center .logo-box {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none; box-shadow: 0 3px 10px rgba(var(--primary-r),var(--primary-g),var(--primary-b),.35);
}

.navbar-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; padding: 0 0 0 20px; position: relative; z-index: 1;
}

/* Logo icon (khi chưa có ảnh) */
.logo-box {
  width: 66px; height: 66px;
  background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.4);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), background .3s;
}
.navbar-logo:hover .logo-box {
  transform: rotate(-10deg) scale(1.1);
  background: rgba(255,255,255,.3);
}
.logo-icon-main { line-height: 1; }
.logo-text { display: flex; flex-direction: column; }
.logo-name    { font-size: 15px; font-weight: 900; color: #fff !important; line-height: 1.2; max-width: 220px; text-shadow: 0 1px 6px rgba(0,0,0,.2); white-space: nowrap; }
.logo-tagline { font-size: 11px; color: rgba(255,255,255,.82) !important; line-height: 1.3; max-width: 220px; }
.logo-img {
  height: 74px; width: auto; object-fit: contain; padding: 6px 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
  transition: height .35s ease;
}
/* Avatar tròn */
.logo-avatar-wrap {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: #fff;
  border: 3px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 0 4px rgba(255,255,255,.18);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .3s;
}
.navbar-logo:hover .logo-avatar-wrap {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 8px 24px rgba(0,0,0,.3), 0 0 0 5px rgba(255,255,255,.28);
}
.logo-avatar {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.navbar-logo:hover .logo-avatar { transform: scale(1.06); }

/* ── Nửa bên trắng: nav menu ── */
.nav-menu { display: flex; align-items: center; padding-left: 8px; min-width: 0; }
.nav-actions { flex-shrink: 0; padding-right: 8px; }
.nav-left  { display: flex; align-items: center; flex: 1; }
.nav-right { display: flex; align-items: center; flex: 1; justify-content: flex-end; }
.nav-menu-list { display: flex; align-items: center; flex-wrap: nowrap; height: 100%; }
.nav-menu-item { position: relative; height: 100%; display: flex; align-items: center; }

/* Nav link với animated underline */
.nav-link-item {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 10px; font-weight: 700; font-size: 13px; color: #444;
  white-space: nowrap; position: relative;
  transition: color .2s ease;
}
.nav-link-item::after {
  content: '';
  position: absolute; bottom: 6px; left: 50%;
  width: 0; height: 3px;
  background: var(--primary); border-radius: 2px;
  transition: width .28s cubic-bezier(.25,.46,.45,.94), left .28s cubic-bezier(.25,.46,.45,.94);
}
.nav-link-item:hover { color: var(--primary); }
.nav-link-item:hover::after,
.nav-link-item.active::after  { width: calc(100% - 20px); left: 10px; }
.nav-link-item.active { color: var(--primary); font-weight: 800; }

/* Dropdown */
.nav-menu-item.has-dropdown:hover > .nav-dropdown-menu,
.nav-menu-item.has-dropdown:focus-within > .nav-dropdown-menu { display: block; }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 2px); left: 0;
  min-width: 215px; background: #fff; border-radius: 12px;
  box-shadow: 0 10px 36px rgba(0,0,0,.13); padding: 8px 0; z-index: 1050;
  border-top: 3px solid var(--primary);
  animation: dropIn .2s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-dd-item-wrap { position: relative; }
.nav-dd-item-wrap.has-sub > .nav-dropdown-item { display: flex; align-items: center; justify-content: space-between; }
.nav-dropdown-menu.nav-dropdown-sub {
  display: none; position: absolute; top: -6px; left: 100%;
  min-width: 215px; background: #fff; border-radius: 12px;
  box-shadow: 0 10px 36px rgba(0,0,0,.13); padding: 8px 0; z-index: 1051;
  border-top: 3px solid var(--primary);
  animation: dropIn .2s ease;
}
.nav-dd-item-wrap:hover > .nav-dropdown-menu.nav-dropdown-sub,
.nav-dd-item-wrap:focus-within > .nav-dropdown-menu.nav-dropdown-sub { display: block; }
.nav-dropdown-item {
  display: block; padding: 9px 20px; font-size: 13.5px; font-weight: 500; color: #444;
  transition: color .15s, background .15s, padding-left .15s;
}
.nav-dropdown-item:hover,
.nav-dropdown-item.active { color: var(--primary); background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.07); padding-left: 26px; }

/* ── Icon buttons ── */
.nav-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: none;
  background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.1);
  color: var(--primary); border-radius: 8px; cursor: pointer; font-size: 15px; transition: all .2s;
}
.nav-icon-btn:hover { background: var(--primary); color: #fff; transform: scale(1.07) rotate(8deg); }
.nav-icon-btn.active { background: var(--primary); color: #fff; }

/* ── Overflow "Thêm" dropdown ── */
.nav-overflow-wrap {
  position: relative;
}
.nav-overflow-btn {
  background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.15);
}
.nav-overflow-btn[aria-expanded="true"],
.nav-overflow-btn:hover {
  background: var(--primary); color: #fff; transform: none;
}
.nav-overflow-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 36px rgba(0,0,0,.13);
  padding: 8px 0;
  z-index: 1055;
  border-top: 3px solid var(--primary);
  animation: dropIn .2s ease;
  list-style: none;
  margin: 0;
}
.nav-overflow-menu.open { display: block; }
.nav-overflow-menu .nav-dropdown-item {
  display: flex; align-items: center;
  padding: 10px 18px; font-size: 14px; font-weight: 600;
  color: #333; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-overflow-menu .nav-dropdown-item:hover,
.nav-overflow-menu .nav-dropdown-item.active {
  background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.08);
  color: var(--primary);
}

/* ── Mobile toggle ── */
.nav-mobile-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; margin-right: 4px; }
.nav-mobile-toggle span { display: block; width: 24px; height: 2.5px; background: var(--primary); border-radius: 3px; transition: all .3s; }
.nav-mobile-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-mobile-toggle.open span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── Search bar ── */
.navbar-search { border-top: 1px solid #eee; background: #f9f9f9; animation: slideDown .25s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Mobile Nav ── */
/* Mobile menu panel */
.mobile-nav {
  background: #fff;
  border-top: 3px solid var(--primary);
  animation: slideDown .25s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  position: absolute; left: 0; right: 0; top: 100%; z-index: 1029;
}
.mobile-nav-list { padding: 4px 0 8px; margin: 0; }
.mobile-nav-item { border-bottom: 1px solid #f2f2f2; margin: 0; }
.mobile-nav-item:last-child { border-bottom: none; }
.mobile-nav-link,
.mobile-nav-toggle {
  display: flex; align-items: center; width: 100%; padding: 13px 20px;
  font-size: 15px; font-weight: 600; color: #222; background: none; border: none;
  text-align: left; cursor: pointer; transition: background .15s, color .15s;
  text-decoration: none;
}
.mobile-nav-link:hover, .mobile-nav-toggle:hover {
  color: var(--primary); background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.06);
}
.mobile-nav-link.active,
.mobile-nav-toggle.active {
  color: var(--primary); font-weight: 700;
  background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.08);
}
.mobile-nav-toggle i { margin-left: auto; font-size: 12px; color: #aaa; }
.mobile-nav-toggle.active i { color: var(--primary); }
.mobile-nav-sub { display: none; background: #f7fdf8; padding: 4px 0; }
.mobile-nav-sub.show { display: block; }
.mobile-nav-sub li { border-bottom: 1px solid #eef5ef; }
.mobile-nav-sub li:last-child { border-bottom: none; }
.mobile-nav-sub li a {
  display: flex; align-items: center; padding: 11px 20px 11px 36px;
  font-size: 14px; color: #555; transition: color .15s;
}
.mobile-nav-sub li a::before { content: '›'; margin-right: 8px; color: var(--primary); font-weight: bold; }
.mobile-nav-sub li a:hover { color: var(--primary); }
/* Mobile menu login btn area */
.mobile-nav > .px-3 { padding: 12px 16px 16px; }
/* Mobile header close button */
.mobile-nav-close {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff;
}
.mobile-nav-close .site-name-mob { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-nav-close .close-btn {
  background: rgba(255,255,255,.2); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; font-size: 16px;
}
.mobile-nav-close .close-btn:hover { background: rgba(255,255,255,.35); }
/* Allow mobile-nav to show on desktop when triggered by navMenuToggle */
#mobileMenu.desktop-open { display: block !important; }

/* ── Btn primary theme ── */
.btn-primary-theme { background: var(--primary); color: #fff; border: none; font-weight: 700; transition: background .2s; }
.btn-primary-theme:hover { background: var(--primary-d); color: #fff; }

/* Hero slider legacy rules removed — see partials/sections/home-styles.php */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15); color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 18px; border-radius: 50px; margin-bottom: 18px;
  text-transform: uppercase; letter-spacing: 1px; backdrop-filter: blur(4px);
}
.hero-slide-content h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 900; line-height: 1.2; text-shadow: 0 2px 8px rgba(0,0,0,.3); margin-bottom: 16px; }
.hero-slide-content p { font-size: clamp(14px, 2vw, 18px); opacity: .9; line-height: 1.7; margin-bottom: 28px; }
.hero-btn-wrap { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 15px;
  padding: 13px 32px; border-radius: 50px;
  box-shadow: 0 4px 20px rgba(var(--primary-r),var(--primary-g),var(--primary-b),.45);
  transition: all .2s;
}
.hero-btn-primary:hover { background: var(--primary-d); transform: translateY(-2px); color: #fff; }
.hero-btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15); color: #fff; font-weight: 700; font-size: 15px;
  padding: 13px 32px; border-radius: 50px; border: 2px solid rgba(255,255,255,.6);
  backdrop-filter: blur(4px); transition: all .2s;
}
.hero-btn-outline:hover { background: rgba(255,255,255,.25); color: #fff; }
.hero-prev, .hero-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.5); color: #fff;
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 18px; transition: all .2s;
  backdrop-filter: blur(3px);
}
.hero-prev { left: 20px; }
.hero-next { right: 20px; }
.hero-prev:hover, .hero-next:hover { background: var(--primary); border-color: var(--primary); }
.hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 8px; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: all .2s; border: none; padding: 0; }
.hero-dot.active { background: #fff; transform: scale(1.3); }

/* ================================================================
   STATS BAR
   ================================================================ */
.stats-bar { background: var(--primary); color: #fff; padding: 20px 0; }
.stat-item { text-align: center; padding: 10px 20px; border-right: 1px solid rgba(255,255,255,.2); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 32px; font-weight: 900; line-height: 1.1; }
.stat-lbl { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }

/* ================================================================
   SECTIONS
   ================================================================ */
.section { padding: 70px 0; }
.section-alt { background: #f8fdf9; }
.section-eyebrow {
  display: inline-block;
  background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.1);
  color: var(--primary); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 5px 16px; border-radius: 50px; margin-bottom: 12px;
}
.section-title { font-size: clamp(22px, 4vw, 34px); font-weight: 800; color: #1a1a2e; line-height: 1.3; margin-bottom: 14px; }
.section-title span { color: var(--primary); }
.divider { width: 60px; height: 4px; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 4px; margin-bottom: 18px; }
.section-subtitle { font-size: 15px; color: #666; line-height: 1.7; max-width: 600px; }

/* ================================================================
   FEATURE CARDS
   ================================================================ */
.feature-card {
  background: #fff; border-radius: 16px; padding: 30px 24px; text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.06); transition: transform .25s, box-shadow .25s; height: 100%;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 10px 40px rgba(var(--primary-r),var(--primary-g),var(--primary-b),.15); }
.feature-icon { width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 18px; }
.fi-green  { background: rgba(46,170,75,.15); }
.fi-orange { background: rgba(245,166,35,.15); }
.fi-teal   { background: rgba(0,121,107,.15);  }
.fi-blue   { background: rgba(21,101,192,.15); }
.fi-purple { background: rgba(123,31,162,.15); }
.fi-red    { background: rgba(198,40,40,.15);  }
.feature-card h5 { font-size: 16px; font-weight: 800; color: #1a1a2e; margin-bottom: 10px; }
.feature-card p  { font-size: 14px; color: #666; line-height: 1.65; margin: 0; }

/* ================================================================
   NEWS CARDS
   ================================================================ */
.news-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.07); transition: transform .25s, box-shadow .25s;
  height: 100%; display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(var(--primary-r),var(--primary-g),var(--primary-b),.14); }
.news-card-thumb { width: 100%; height: 200px; object-fit: cover; display: block; }
.news-card-thumb-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, rgba(var(--primary-r),var(--primary-g),var(--primary-b),.12), rgba(var(--primary-r),var(--primary-g),var(--primary-b),.25));
  display: flex; align-items: center; justify-content: center; font-size: 48px; color: var(--primary);
}
.news-card-body { padding: 20px 20px 24px; flex: 1; display: flex; flex-direction: column; }
.news-card-meta { font-size: 12px; color: #999; margin-bottom: 8px; }
.news-card-title {
  font-size: 15px; font-weight: 700; color: #1a1a2e; line-height: 1.5; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-title:hover { color: var(--primary); }
.news-card-excerpt {
  font-size: 13.5px; color: #666; line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--primary); transition: gap .2s; }
.news-card-link:hover { gap: 8px; color: var(--primary-d); }

/* ================================================================
   PAGE HEADER
   ================================================================ */
.page-header, .page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; padding: 50px 0 40px; text-align: center; position: relative; overflow: hidden;
}
.page-header::after, .page-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 40px;
  background: #fff; clip-path: ellipse(55% 100% at 50% 100%);
}
.page-header h1, .page-hero h1 { font-size: clamp(24px, 4vw, 38px); font-weight: 900; margin-bottom: 10px; }
.page-hero { text-align: left !important; padding: 44px 0 50px; }
.page-hero .container,
.page-hero nav,
.page-hero .breadcrumb { text-align: left !important; justify-content: flex-start !important; }
body .page-hero h1 {
  color: #fff !important;
  display: block !important;
  font-size: clamp(24px, 4vw, 38px) !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  text-align: left !important;
  text-decoration: none !important;
  margin: 0 0 10px !important;
}
body .page-hero h1::before,
body .page-hero h1::after {
  content: none !important;
  display: none !important;
}
.breadcrumb { justify-content: center; }
.breadcrumb-item a { color: rgba(255,255,255,.8); }
.breadcrumb-item.active { color: rgba(255,255,255,.6); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }

/* ── Content body ── */
.content-body { font-size: 15px; line-height: 1.8; color: #444; overflow-x: auto; }
.content-body h2 { font-size: 22px; font-weight: 800; color: #1a1a2e; margin: 28px 0 12px; }
.content-body h3 { font-size: 18px; font-weight: 700; color: #1a1a2e; margin: 22px 0 10px; }
.content-body img { max-width: 100%; border-radius: 10px; margin: 14px 0; }
.content-body blockquote { border-left: 4px solid var(--primary); padding: 10px 20px; background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.06); border-radius: 0 8px 8px 0; margin: 18px 0; color: #555; }
.content-body table { max-width: 100%; }

/* ── Sidebar Widgets ── */
.sidebar-widget { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 14px rgba(0,0,0,.08); margin-bottom: 22px; }
.sidebar-widget-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; padding: 13px 18px; font-size: 14px; font-weight: 800;
  display: flex; align-items: center; gap: 9px; letter-spacing: .2px;
}
.sidebar-widget-header i { font-size: 15px; opacity: .9; }
.sidebar-widget-body { padding: 16px 18px; }
.sidebar-cat-link {
  display: block; padding: 8px 12px; border-radius: 8px; font-size: .89rem;
  color: #444; font-weight: 500; transition: all .18s; margin-bottom: 2px;
  border-left: 3px solid transparent;
}
.sidebar-cat-link:hover { background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.08); color: var(--primary); border-left-color: var(--primary); padding-left: 16px; }
.sidebar-cat-link.active { background: rgba(var(--primary-r),var(--primary-g),var(--primary-b),.12); color: var(--primary); font-weight: 700; border-left-color: var(--primary); padding-left: 16px; }
.sidebar-recent-item { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.sidebar-recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-recent-item a { font-size: .87rem; font-weight: 700; color: #1a1a2e; line-height: 1.45; display: block; transition: color .15s; }
.sidebar-recent-item a:hover { color: var(--primary); }
.sidebar-recent-item .meta { font-size: .78rem; color: #999; margin-top: 3px; }

/* ================================================================
   CTA SECTION
   ================================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; padding: 60px 0; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.cta-section * { position: relative; z-index: 1; }
.cta-section h2 { font-size: clamp(22px, 4vw, 36px); font-weight: 900; margin-bottom: 14px; }
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--primary); font-weight: 800; font-size: 15px;
  padding: 14px 36px; border-radius: 50px; box-shadow: 0 6px 24px rgba(0,0,0,.15); transition: all .2s;
}
.btn-cta:hover { background: var(--accent); transform: translateY(-2px); color: #333; }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: linear-gradient(160deg, var(--primary-d) 0%, var(--primary) 100%);
  color: rgba(255,255,255,.8);
  padding-top: 60px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,.18);
  pointer-events: none;
}
.site-footer > * { position: relative; z-index: 1; }
.site-footer .container { position: relative; z-index: 1; }
/* Logo avatar in footer */
.footer-logo-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; border: 3px solid rgba(255,255,255,.7);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  flex-shrink: 0;
}
.footer-logo-box {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.2); border: 3px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  flex-shrink: 0;
}
.footer-logo-box i { color: #fff; font-size: 22px; line-height: 1; }
.footer-brand .logo-name { color: #fff; font-size: 17px; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.2); }
.footer-brand .logo-tagline { color: rgba(255,255,255,.75); font-size: 12px; }
.footer-about { font-size: 14px; line-height: 1.7; margin: 14px 0 18px; color: rgba(255,255,255,.8); }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; background: rgba(255,255,255,.15); border-radius: 50%;
  color: rgba(255,255,255,.9); font-size: 14px; transition: all .2s; margin-right: 6px;
  border: 1px solid rgba(255,255,255,.2);
}
.footer-social a:hover { background: #fff; color: var(--primary); transform: translateY(-2px); }
.footer-title { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid rgba(255,255,255,.2); letter-spacing: .3px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,.75); transition: all .2s; display: flex; align-items: center; gap: 7px; }
.footer-links a::before { content: '›'; color: rgba(255,255,255,.9); font-weight: bold; font-size: 16px; }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; font-size: 14px; color: rgba(255,255,255,.8); }
.footer-contact-item i { color: rgba(255,255,255,.9); margin-top: 2px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  background: rgba(0,0,0,.2);
  padding: 16px 0; margin-top: 40px; font-size: 13px; color: rgba(255,255,255,.5);
  position: relative; z-index: 1;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.page-link { color: var(--primary); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ================================================================
   BACK TO TOP
   ================================================================ */
#backToTop {
  display: none; position: fixed; bottom: 28px; right: 28px; z-index: 1000;
  width: 44px; height: 44px; background: var(--primary); color: #fff; border: none;
  border-radius: 50%; font-size: 18px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(var(--primary-r),var(--primary-g),var(--primary-b),.45);
  align-items: center; justify-content: center; transition: all .2s;
}
#backToTop.show { display: flex; }
#backToTop:hover { background: var(--primary-d); transform: translateY(-2px); }

/* ================================================================
   ADMIN STYLES
   ================================================================ */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; background: #1a1a2e; color: #fff; flex-shrink: 0;
  position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 1040; transition: transform .3s;
}
.admin-sidebar-brand { padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-sidebar-brand .logo-name { color: #fff; font-size: 14px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px;
  color: rgba(255,255,255,.65); font-size: 14px; font-weight: 500;
  border-left: 3px solid transparent; transition: all .2s;
}
.admin-nav a:hover, .admin-nav a.active { color: #fff; background: rgba(255,255,255,.08); border-left-color: var(--primary); }
.admin-nav a i { width: 18px; text-align: center; }
.admin-main { margin-left: 240px; flex: 1; background: #f4f6f8; min-height: 100vh; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid #e8e8e8; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100;
}
.admin-content { padding: 24px; }
.admin-card { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.07); padding: 24px; margin-bottom: 24px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ── Admin sidebar ── */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}

/* ── Topbar: hide on mobile to save vertical space ── */
@media (max-width: 767px) {
  .topbar-info { display: none; }
}
/* ── Topbar tablet: hide email column ── */
@media (min-width: 768px) and (max-width: 991px) {
  .topbar-info-item.d-none.d-xl-flex { display: none !important; }
  .topbar-login-wrap { padding: 0 12px; }
  .btn-login { padding: 6px 14px; font-size: 12px; }
}

/* ── Navbar ── */
@media (max-width: 991px) {
  /* Toàn bộ navbar nền xanh trên mobile/tablet */
  .main-navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%);
  }
  .navbar-logo-wrap {
    clip-path: none;
    background: transparent;
    padding-right: 20px;
    margin-right: 8px;
    border-radius: 0;
  }
  /* Tên trường + tagline màu trắng */
  .main-navbar .logo-name    { color: #fff !important; text-shadow: 0 1px 4px rgba(0,0,0,.2); }
  .main-navbar .logo-tagline { color: rgba(255,255,255,.82) !important; }
  /* Nút icon (home, search, bars) trên nền xanh */
  .nav-icon-btn {
    background: rgba(255,255,255,.18);
    color: #fff;
  }
  .nav-icon-btn:hover, .nav-icon-btn.active {
    background: rgba(255,255,255,.35);
    color: #fff;
    transform: none;
  }
  /* Hamburger màu trắng */
  .nav-mobile-toggle span { background: #fff; }
  .navbar-inner { min-height: 68px; }
  .main-navbar.scrolled .navbar-inner { min-height: 60px; }
}
@media (max-width: 575px) {
  .navbar-logo-wrap { padding-right: 14px; }
  .logo-avatar { height: 42px !important; width: 42px !important; }
  .logo-avatar-wrap { width: 46px !important; height: 46px !important; }
}

/* ── Footer ── */
@media (max-width: 767px) {
  .site-footer { padding-top: 40px; }
  .footer-bottom .container { flex-direction: column; align-items: center; text-align: center; gap: 4px; }
  .footer-about { font-size: 13px; }
}

/* ── General section spacing ── */
@media (max-width: 767px) {
  .hero-slide { height: 400px; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); }
  .topbar-info-item { border-right: none; padding: 6px 12px; }
  .topbar-panel-social { padding: 0 12px; gap: 6px; }
  .topbar-divider { display: none; }
  #backToTop { width: 38px; height: 38px; font-size: 15px; bottom: 18px; right: 18px; }
}
/* ── Wide-screen container expansion ── */
@media (min-width: 1400px) {
  .container { max-width: 1360px !important; }
}
@media (min-width: 1600px) {
  .container { max-width: 1540px !important; }
}
@media (min-width: 1920px) {
  .container { max-width: 1840px !important; }
}

.topbar-info .text-muted { color: rgba(255,255,255,.65) !important; }
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom   { background: var(--primary) !important; }
.rounded-xl { border-radius: 16px !important; }
.rounded-2xl { border-radius: 24px !important; }

/* ---- Responsive ---- */
@media (max-width: 575px) {
  .footer-top { padding: 2.5rem 0 1.5rem; }
}
