@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
  --green-dark: #0e3325;
  --green: #174b38;
  --green2: #21664b;
  --gold: #c6a45b;
  --gold-light: #e6cb88;
  --gold-glow: rgba(198, 164, 91, 0.25);
  --ink: #1a2923;
  --muted: #64756d;
  --line: #dfe7e2;
  --bg: #f6f9f7;
  --white: #ffffff;
  --shadow: 0 14px 36px rgba(15, 51, 37, 0.08);
  --shadow-gold: 0 12px 28px rgba(198, 164, 91, 0.18);
}

* { box-sizing: border-box; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Cairo', Tahoma, Arial, sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }

.topbar {
  min-height: 80px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px max(5vw, 20px);
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}
.topbar.scrolled {
  box-shadow: 0 8px 25px rgba(14, 51, 37, 0.12);
  background: var(--green-dark);
  color: var(--white);
}
.topbar.scrolled .brand,
.topbar.scrolled .nav a { color: var(--white); }
.topbar.scrolled .brand small { color: var(--gold-light); }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--green); font-size: 14px; transition: 0.3s; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.brandmark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-dark), var(--green2));
  color: var(--gold-light);
  font-size: 23px;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 12px var(--gold-glow);
  transition: transform 0.3s ease;
}
.brand:hover .brandmark { transform: rotate(-6deg) scale(1.05); }

.nav { display: flex; align-items: center; gap: 20px; font-size: 13.5px; font-weight: 700; flex-wrap: wrap; }
.nav a { color: #475750; position: relative; padding: 6px 2px; transition: 0.25s; }
.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a:hover, .nav a.active { color: var(--green); }
.topbar.scrolled .nav a:hover, .topbar.scrolled .nav a.active { color: var(--gold-light); }

.nav-login {
  border: 1.5px solid var(--gold) !important;
  background: linear-gradient(135deg, var(--green), var(--green2));
  color: var(--white) !important;
  padding: 8px 18px !important;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(23, 75, 56, 0.15);
}
.nav-login::after { display: none !important; }
.nav-login:hover { background: var(--gold); color: var(--green-dark) !important; transform: translateY(-2px); }

.menu-toggle { display: none; border: 1.5px solid var(--gold); border-radius: 8px; background: none; font-size: 22px; color: var(--green); padding: 4px 10px; cursor: pointer; }
.topbar.scrolled .menu-toggle { color: var(--gold-light); }

.hero {
  background: radial-gradient(circle at 20% 20%, #1f6348 0%, var(--green-dark) 85%);
  color: white;
  padding: 80px max(7vw, 24px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 35px;
  position: relative;
  border-bottom: 3px solid var(--gold);
  overflow: hidden;
}
.eyebrow {
  display: inline-block;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: rgba(198, 164, 91, 0.14);
  border: 1px solid rgba(198, 164, 91, 0.45);
  padding: 4px 14px;
  border-radius: 20px;
}
.hero h1 { font-size: clamp(30px, 4.5vw, 52px); line-height: 1.35; margin: 16px 0; }
.hero h1 em { font-style: normal; color: var(--gold-light); border-bottom: 2px dashed rgba(230, 203, 136, 0.5); }
.hero p { color: #dbe7e0; max-width: 580px; font-size: 15px; }

.actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 11px 22px;
  font: 700 13.5px 'Cairo';
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.primary { background: var(--green); color: white; border-color: var(--gold); }
.primary:hover { background: var(--green-dark); color: var(--gold-light); }
.hero .primary { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--green-dark); border-color: #fff3d1; }
.light { background: rgba(255, 255, 255, 0.1); color: var(--white); border-color: var(--gold); backdrop-filter: blur(4px); }
.light:hover { background: var(--white); color: var(--green-dark); }
.outline { border: 1.5px solid var(--gold); color: var(--green); background: white; }
.outline:hover { background: var(--green); color: var(--gold-light); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 8px; }

.hero-art { min-height: 280px; display: grid; place-items: center; position: relative; }
.art-circle {
  width: 240px;
  height: 240px;
  border: 0px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--gold-light);
  background: radial-gradient(circle, rgba(198,164,91,0.12), transparent 70%);
  animation: pulseGold 4s infinite ease-in-out;
}
@keyframes pulseGold {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 18px rgba(198, 164, 91, 0.06), 0 0 30px rgba(198, 164, 91, 0.15); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 26px rgba(198, 164, 91, 0.1), 0 0 45px rgba(198, 164, 91, 0.3); }
}
.floating-card {
  position: absolute;
  bottom: 14px;
  right: 4%;
  background: var(--white);
  color: var(--green-dark);
  padding: 14px 22px;
  border-radius: 14px;
  border: 1.5px solid var(--gold);
  box-shadow: var(--shadow);
  display: grid;
  animation: floatCard 3.5s infinite ease-in-out;
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.floating-card span { font-size: 11px; color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  padding: 26px max(7vw, 24px);
  border-bottom: 1.5px solid var(--gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
}
.stats > div { display: grid; text-align: center; border-left: 1px solid rgba(198, 164, 91, 0.35); transition: 0.25s; }
.stats > div:hover { transform: translateY(-3px); }
.stats > div:last-child { border: 0; }
.stats b { font-size: 25px; color: var(--green); }
.stats span { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.section, .page { padding: 56px max(7vw, 24px); }
.page-banner {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  padding: 44px max(7vw, 24px);
  border-bottom: 2px solid var(--gold);
}
.page-banner h1 { margin: 8px 0 4px; font-size: 30px; color: var(--white); }
.page-banner p { margin: 0; color: #dbe7e0; font-size: 14px; }

.section-head, .between { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section h2, .page h1 { font-size: 28px; margin: 4px 0 22px; color: var(--green-dark); }
.text-link { color: var(--green); font-weight: 800; font-size: 13.5px; border-bottom: 1.5px solid var(--gold); padding-bottom: 2px; transition: 0.2s; }
.text-link:hover { color: var(--gold); }

.grid { display: grid; gap: 22px; }
.cards { grid-template-columns: repeat(4, 1fr); }
.course-grid { grid-template-columns: repeat(3, 1fr); }
.two-col { grid-template-columns: 1.3fr 0.7fr; align-items: start; }

.card {
  background: var(--white);
  border: 1.5px solid rgba(198, 164, 91, 0.48);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.32s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 18px 36px rgba(14, 51, 37, 0.11), 0 0 0 2px rgba(198, 164, 91, 0.22);
}
.box { padding: 26px; }

.service { padding: 26px; display: block; }
.icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef6f1, #fdf9ef);
  border: 1px solid var(--gold);
  border-radius: 13px;
  color: var(--green);
  font-size: 24px;
  transition: 0.3s;
}
.service:hover .icon { background: var(--green); color: var(--gold-light); transform: scale(1.08); }
.service h3 { font-size: 16.5px; margin: 16px 0 6px; color: var(--green-dark); }
.service p, .course p { font-size: 13px; color: var(--muted); margin: 0; }

.tinted { background: #eff5f1; border-top: 1px solid rgba(198, 164, 91, 0.3); border-bottom: 1px solid rgba(198, 164, 91, 0.3); }

.course-banner {
  height: 135px;
  display: grid;
  place-items: center;
  color: var(--gold-light);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 17px;
  border-bottom: 2px solid var(--gold);
}
.green { background: linear-gradient(135deg, #0e3325, #1f6348); }
.gold { background: linear-gradient(135deg, #6e5423, #b59247); color: #fff; }
.navy { background: linear-gradient(135deg, #163b33, #2c6658); }

.card-body { padding: 22px; }
.tag {
  display: inline-block;
  background: #f2f8f4;
  color: var(--green);
  border: 1px solid rgba(198, 164, 91, 0.55);
  font-size: 11px;
  font-weight: 800;
  border-radius: 20px;
  padding: 3px 12px;
}
.course h3 { font-size: 17px; line-height: 1.6; margin: 12px 0; color: var(--green-dark); }
.meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11.5px; margin: 16px 0; padding-top: 12px; border-top: 1px dashed var(--line); flex-wrap: wrap; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 700; color: var(--green-dark); }
input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #cbd8d1;
  border-radius: 10px;
  font: 500 13.5px 'Cairo';
  background: var(--white);
  color: var(--ink);
  transition: 0.25s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.filter-bar { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-bar input { flex: 2; min-width: 220px; }
.filter-bar select { flex: 1; min-width: 180px; }

.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 160px); }
.sidebar {
  background: var(--green-dark);
  color: var(--white);
  padding: 24px 16px;
  border-left: 2px solid var(--gold);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar h4 { color: var(--gold-light); margin: 0 10px 12px; font-size: 13px; border-bottom: 1px solid rgba(198,164,91,0.3); padding-bottom: 8px; }
.sidebar a {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #d6e4dc;
  border: 1px solid transparent;
  transition: 0.2s;
}
.sidebar a:hover, .sidebar a.active {
  background: rgba(198, 164, 91, 0.16);
  color: var(--gold-light);
  border-color: var(--gold);
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 15px; text-align: right; border-bottom: 1px solid var(--line); }
th { background: #eef5f0; color: var(--green-dark); font-weight: 800; border-bottom: 2px solid var(--gold); }
tr:hover td { background: #fafcf9; }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; }
.badge-ok { background: #e3f5ea; color: #135c33; border: 1px solid #9ad3b1; }
.badge-warn { background: #fef6e3; color: #8c6218; border: 1px solid var(--gold); }

.cert-frame {
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  border: 4px double var(--gold);
  outline: 2px solid var(--green);
  outline-offset: -10px;
  border-radius: 16px;
  padding: 46px 36px;
  text-align: center;
  box-shadow: var(--shadow);
}
.cert-frame h2 { color: var(--green-dark); font-size: 28px; margin: 10px 0; }
.cert-name { font-size: 24px; font-weight: 800; color: var(--green); border-bottom: 2px solid var(--gold); display: inline-block; padding: 4px 28px; margin: 12px 0; }

.notice {
  background: #fffbf0;
  border: 1px solid var(--gold);
  color: #6b5322;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  margin-top: 20px;
}

.cta {
  background: linear-gradient(120deg, var(--green-dark), var(--green));
  color: var(--white);
  padding: 44px max(7vw, 24px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}
.cta h2 { margin: 0; color: var(--gold-light); }
.cta p { margin: 6px 0 0; color: #dce8e1; font-size: 14px; }
.cta .primary { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--green-dark); }

footer {
  background: #0a261b;
  color: #e5eee8;
  padding: 34px max(7vw, 24px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 2px solid var(--gold);
}
footer b { color: var(--gold-light); }
footer p, footer small { color: #a7c0b3; font-size: 12px; }
.footer-links { display: flex; gap: 20px; font-size: 13px; }
.footer-links a:hover { color: var(--gold-light); }

.reveal { opacity: 0; transform: translateY(20px); transition: all 0.55s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .course-grid, .two-col { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { border-left: 0; border-bottom: 2px solid var(--gold); flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 650px) {
  .topbar { flex-wrap: wrap; }
  .menu-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 12px 0; }
  .nav.open { display: flex; }
  .hero { grid-template-columns: 1fr; padding: 48px 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .cards, .form-grid { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
}
