/* ===================================================
   Oudomxay Government Joomla Template - Main CSS
   Version: 1.0.0
   =================================================== */

:root {
  --green-dark:   #1a4a2e;
  --green-mid:    #2a6644;
  --green-light:  #3a8a5c;
  --green-accent: #4caf76;
  --gold:         #c8a84b;
  --white:        #ffffff;
  --off-white:    #f5f7f5;
  --text-dark:    #1a2c1f;
  --text-mid:     #3a4d40;
  --text-light:   #6a7d6f;
  --border:       #d0ddd4;
  --shadow:       0 4px 24px rgba(26,74,46,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans Lao', 'Phetsarath OT', 'Lao UI', sans-serif;
  background: var(--white);
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== TOP BAR ===== */
.topbar { background: var(--green-dark); color: rgba(255,255,255,0.85); font-size: 13px; }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 7px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar-left { display: flex; align-items: center; gap: 6px; }
.topbar-left i { color: var(--gold); font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-right a { color: rgba(255,255,255,0.85); display: flex; align-items: center; gap: 6px; transition: color .2s; }
.topbar-right a:hover { color: var(--gold); }
.topbar-right i { font-size: 12px; color: var(--gold); }
.lang-select { background: transparent; border: 1px solid rgba(255,255,255,0.25); border-radius: 4px; color: rgba(255,255,255,0.85); padding: 2px 8px; font-size: 12px; cursor: pointer; }

/* ===== HEADER ===== */
.header { background: var(--white); box-shadow: 0 2px 16px rgba(26,74,46,0.08); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 80px; }

.logo { display: flex; align-items: center; gap: 14px; }
.logo-img { width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(135deg, #c8a84b 0%, #e8d080 40%, #c8a84b 70%, #a07030 100%); display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 2px 8px rgba(200,168,75,0.4); flex-shrink: 0; }
.logo-text { line-height: 1.2; }
.logo-text .name { font-family: 'Noto Serif Lao', serif; font-size: 22px; font-weight: 700; color: var(--green-dark); letter-spacing: 0.5px; }
.logo-text .sub { font-size: 11.5px; color: var(--text-light); font-weight: 400; }

/* ===== NAV ===== */
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--text-dark); display: flex; align-items: center; gap: 6px; transition: background .2s, color .2s; white-space: nowrap; }
.nav a i { font-size: 13px; color: var(--green-mid); }
.nav a:hover, .nav a.active { background: var(--green-dark); color: var(--white); }
.nav a:hover i, .nav a.active i { color: var(--gold); }
.nav .search-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--off-white); display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); cursor: pointer; transition: background .2s; margin-left: 4px; }
.nav .search-btn:hover { background: var(--green-dark); color: var(--white); }

/* Search Bar */
.search-bar { background: var(--off-white); border-top: 1px solid var(--border); }
.search-bar-inner { max-width: 700px; margin: 0 auto; padding: 12px 24px; display: flex; gap: 8px; align-items: center; }
.search-input { flex: 1; padding: 10px 16px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; }
.search-input:focus { border-color: var(--green-mid); }
.search-submit { background: var(--green-dark); color: var(--white); border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.search-close { background: transparent; border: 1.5px solid var(--border); padding: 10px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; }

/* ===== HERO SLIDER ===== */
.hero { position: relative; height: 520px; overflow: hidden; }
.hero-slides { display: flex; height: 100%; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.hero-slide { min-width: 100%; height: 100%; position: relative; }
.hero-bg { width: 100%; height: 100%; background-size: cover; background-position: center; filter: brightness(0.62); }
.hero-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 700px; width: 90%; color: var(--white); text-align: left; padding: 0 20px; animation: fadeUp .7s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translate(-50%, calc(-50% + 30px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
.hero-content h1 { font-family: 'Noto Serif Lao', serif; font-size: 44px; font-weight: 700; color: var(--gold); line-height: 1.2; margin-bottom: 12px; text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.hero-content p.tagline { font-size: 18px; font-weight: 500; margin-bottom: 10px; opacity: .95; }
.hero-content p.desc { font-size: 14.5px; opacity: .82; margin-bottom: 28px; line-height: 1.75; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary { background: var(--green-dark); border: 2px solid var(--green-dark); color: var(--white); padding: 11px 26px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s, transform .15s; display: inline-block; }
.btn-primary:hover { background: var(--green-mid); transform: translateY(-1px); color: var(--white); }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,0.7); color: var(--white); padding: 11px 26px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s; display: inline-block; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.18); border: 2px solid rgba(255,255,255,0.4); color: var(--white); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; transition: background .2s; font-size: 16px; }
.slider-btn:hover { background: rgba(255,255,255,0.32); }
.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }
.slider-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.slider-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; transition: background .2s, transform .2s; }
.slider-dot.active { background: var(--gold); transform: scale(1.3); }

/* ===== QUICK INFO ===== */
.quick-info { max-width: 1200px; margin: -40px auto 0; padding: 0 24px; position: relative; z-index: 20; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.quick-card { padding: 28px 22px; display: flex; align-items: flex-start; gap: 16px; border-right: 1px solid var(--border); transition: background .2s; }
.quick-card:last-child { border-right: none; }
.quick-card:hover { background: var(--off-white); }
.quick-icon { width: 54px; height: 54px; border-radius: 50%; background: var(--green-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quick-icon i { color: var(--white); font-size: 22px; }
.quick-text h3 { font-size: 15px; font-weight: 700; color: var(--green-dark); margin-bottom: 5px; }
.quick-text p { font-size: 13px; color: var(--text-light); line-height: 1.6; }

/* ===== SECTION COMMON ===== */
section { padding: 60px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section-title { font-family: 'Noto Serif Lao', serif; font-size: 20px; font-weight: 700; color: var(--green-dark); position: relative; padding-left: 16px; }
.section-title::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; background: var(--green-accent); border-radius: 2px; }
.see-all { font-size: 13px; color: var(--green-mid); font-weight: 600; display: flex; align-items: center; gap: 4px; transition: color .2s; }
.see-all:hover { color: var(--green-dark); }

/* ===== LEADERSHIP ===== */
.leadership { background: var(--off-white); }
.leaders-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.leader-card { background: var(--white); border-radius: 12px; box-shadow: 0 2px 16px rgba(26,74,46,0.07); display: flex; gap: 20px; padding: 24px; align-items: flex-start; transition: transform .2s, box-shadow .2s; }
.leader-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(26,74,46,0.13); }
.leader-photo { width: 100px; height: 120px; object-fit: cover; border-radius: 8px; background: linear-gradient(135deg, #d0e8d8 0%, #a8cdb8 100%); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 40px; }
.leader-info h3 { font-size: 15px; font-weight: 700; color: var(--green-dark); margin-bottom: 4px; }
.leader-info .role { font-size: 13px; color: var(--green-mid); font-weight: 600; margin-bottom: 10px; }
.leader-info p { font-size: 13px; color: var(--text-light); line-height: 1.65; margin-bottom: 14px; }
.btn-read-more { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--green-dark); color: var(--green-dark); padding: 7px 18px; border-radius: 6px; font-size: 13px; font-weight: 600; transition: background .2s, color .2s; }
.btn-read-more:hover { background: var(--green-dark); color: var(--white); }

/* ===== NEWS ===== */
.news { background: var(--white); }
.news-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 20px; }
.news-card { border-radius: 10px; overflow: hidden; background: var(--off-white); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.news-img { height: 200px; background: linear-gradient(135deg, #2a6644, #4a9a6a); position: relative; display: flex; align-items: flex-end; overflow: hidden; }
.news-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.news-date { position: relative; z-index: 2; background: var(--green-dark); color: var(--white); padding: 8px 14px; border-radius: 0 8px 0 0; font-size: 13px; font-weight: 700; line-height: 1.2; }
.news-date .day { font-size: 20px; display: block; }
.news-date .month { font-size: 11px; opacity: .8; }
.news-body { padding: 16px 18px 18px; }
.news-body h3 { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; line-height: 1.5; }
.news-body p { font-size: 13px; color: var(--text-light); line-height: 1.6; }

/* ===== SERVICES ===== */
.services { background: var(--green-dark); color: var(--white); }
.services .section-title { color: var(--white); }
.services .section-title::before { background: var(--gold); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service-card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 24px 18px; text-align: center; transition: background .2s, transform .2s; cursor: pointer; }
.service-card:hover { background: rgba(255,255,255,0.16); transform: translateY(-3px); }
.service-icon { font-size: 34px; margin-bottom: 14px; color: var(--gold); }
.service-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.service-card p { font-size: 12.5px; opacity: .75; line-height: 1.6; }

/* ===== STATS ===== */
.stats { background: var(--off-white); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card { background: var(--white); border-radius: 12px; padding: 28px 20px; text-align: center; box-shadow: 0 2px 12px rgba(26,74,46,0.07); border-top: 4px solid var(--green-accent); }
.stat-num { font-family: 'Noto Serif Lao', serif; font-size: 36px; font-weight: 700; color: var(--green-dark); margin-bottom: 6px; }
.stat-label { font-size: 13px; color: var(--text-light); }

/* ===== MAIN CONTENT AREA ===== */
.main-content { padding: 40px 0; }
.main-content:empty { display: none; }


/* ===== FOOTER ===== */
footer { background: var(--green-dark); color: rgba(255,255,255,0.85); }
.footer-main { max-width: 1280px; margin: 0 auto; padding: 48px 24px 36px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand .logo-text .name { color: var(--white); font-size: 20px; }
.footer-brand .logo-text .sub { color: rgba(255,255,255,0.6); }
.footer-brand p { font-size: 13px; margin-top: 14px; opacity: .7; line-height: 1.7; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.social-btn { width: 36px; height: 36px; background: rgba(255,255,255,0.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: background .2s; }
.social-btn:hover { background: var(--gold); }
.footer-col h4 { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 8px; transition: color .2s; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-col ul li a i { font-size: 11px; color: var(--green-accent); }
.footer-contact p { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 10px; display: flex; align-items: flex-start; gap: 10px; }
.footer-contact p i { color: var(--gold); margin-top: 2px; flex-shrink: 0; }
.footer-bottom { background: rgba(0,0,0,0.25); text-align: center; padding: 14px 24px; font-size: 12.5px; color: rgba(255,255,255,0.55); }

/* ===== BACK TO TOP ===== */
.back-top { position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px; background: var(--green-dark); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 4px 16px rgba(26,74,46,0.3); cursor: pointer; z-index: 999; transition: background .2s, transform .2s, opacity .3s; opacity: 0; pointer-events: none; border: none; }
.back-top.visible { opacity: 1; pointer-events: all; }
.back-top:hover { background: var(--green-mid); transform: translateY(-3px); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .news-main { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .topbar-right { display: none; }
  .nav { display: none; }
  .hero { height: 380px; }
  .hero-content h1 { font-size: 28px; }
  .hero-content p.tagline { font-size: 15px; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .leaders-grid { grid-template-columns: 1fr; }
  .news-main { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .quick-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 22px; }
  .hero-btns { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
}
