:root {
  --green-dark:   #0F5132;
  --green-mid:    #157347;
  --green-light:  #198754;
  --green-pale:   #D1E7DD;
  --green-xpale:  #F0F9F4;
  --white:        #FFFFFF;
  --gray-50:      #F8F9FA;
  --gray-100:     #F1F3F5;
  --gray-200:     #E9ECEF;
  --gray-400:     #ADB5BD;
  --gray-600:     #6C757D;
  --gray-800:     #343A40;
  --text:         #1A2E24;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:    0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:    0 10px 30px rgba(0,0,0,.10);
  --radius:       12px;
  --radius-lg:    18px;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

h1,h2,h3,h4 { line-height: 1.25; font-weight: 700; }
.font-arabic { font-family: 'Amiri', serif; }

/* ─── NAVBAR ─── */
#navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow .2s;
}
#navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; min-width: 0; }
.nav-logo img { height: 38px; width: auto; flex-shrink: 0; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.nav-logo-text .logo-name {
  font-size: 1.15rem; font-weight: 800; color: var(--green-dark); letter-spacing: .03em;
}
.nav-logo-text .logo-sub {
  font-size: .6rem; font-weight: 500; color: var(--gray-600);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 200px;
}
.nav-links {
  display: flex; align-items: center; gap: .1rem; list-style: none;
}
.nav-links a {
  text-decoration: none; color: var(--gray-800);
  font-size: .85rem; font-weight: 500;
  padding: .4rem .65rem; border-radius: 8px;
  transition: color .15s, background .15s; white-space: nowrap;
}
.nav-links a:hover { color: var(--green-dark); background: var(--green-xpale); }
.btn-nav {
  background: var(--green-dark) !important; color: var(--white) !important;
  padding: .5rem 1rem !important; border-radius: 8px !important;
  font-weight: 600 !important;
}
.btn-nav:hover { background: var(--green-mid) !important; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--green-dark); border-radius: 2px; transition: .25s;
}
.mobile-menu {
  display: none; flex-direction: column;
  background: var(--white); border-top: 1px solid var(--gray-200);
  padding: .75rem 1rem 1.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none; color: var(--gray-800);
  font-size: .95rem; font-weight: 500;
  padding: .75rem .5rem; border-bottom: 1px solid var(--gray-100);
  -webkit-tap-highlight-color: transparent;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .btn-nav-m {
  margin-top: .75rem; text-align: center;
  background: var(--green-dark); color: var(--white);
  border-radius: 10px; padding: .8rem; font-weight: 700;
  font-size: 1rem;
}

/* ─── HERO ─── */
#hero {
  background: linear-gradient(160deg, var(--green-dark) 0%, #1A6642 55%, #1D7A4E 100%);
  min-height: 75vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
#hero::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.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
#hero::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0; height: 60px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 4rem 1.25rem 5.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
  position: relative; z-index: 1;
  width: 100%;
}
.hero-h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--white); font-weight: 800;
  margin-bottom: 1rem; line-height: 1.2;
}
.hero-h1 span { color: #7FFFD4; }
.hero-sub {
  font-size: .975rem; color: rgba(255,255,255,.82);
  margin-bottom: 1.5rem; max-width: 500px; line-height: 1.75;
}
.hero-logo-wrap {
  display: flex; justify-content: center; align-items: center;
}
.hero-logo-card {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 24px; padding: 2.25rem 2.75rem;
  text-align: center; backdrop-filter: blur(10px);
}
.hero-logo-card img {
  width: clamp(110px, 16vw, 180px); height: auto;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.2));
}
.logo-placeholder {
  width: 150px; height: 150px;
  background: rgba(255,255,255,.15);
  border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: white; font-size: .75rem; text-align: center; padding: 1rem;
  border: 2px dashed rgba(255,255,255,.3);
}
.logo-placeholder .lp-icon { font-size: 2.5rem; margin-bottom: .5rem; }

/* ─── SECTION BASE ─── */
.section { padding: 4rem 1.25rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-tag {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--green-light);
  margin-bottom: .6rem;
}
.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--green-dark); margin-bottom: .75rem;
}
.section-sub {
  color: var(--gray-600); font-size: .975rem;
  max-width: 540px; line-height: 1.7;
}
.section-header { margin-bottom: 2.5rem; }

/* ─── PROGRAM ─── */
#program { background: var(--white); }
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.prog-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
  position: relative; overflow: hidden;
}
.prog-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green-dark), var(--green-light));
}
.prog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.prog-icon { font-size: 1.75rem; margin-bottom: .75rem; line-height: 1; }
.prog-card h3 { font-size: .975rem; color: var(--green-dark); margin-bottom: .4rem; }
.prog-card p { font-size: .855rem; color: var(--gray-600); flex: 1; line-height: 1.6; }
.prog-link {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: 1.1rem;
  font-size: .82rem; font-weight: 700; color: var(--green-light);
  text-decoration: none;
  background: var(--green-xpale); padding: .55rem .9rem;
  border-radius: 8px; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.prog-link:hover { background: var(--green-pale); }
.prog-link::after { content: '→'; }

/* ─── KONTAK ─── */
#kontak { background: var(--gray-50); }
.kontak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.kontak-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: .6rem;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none; color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.kontak-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kontak-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.ki-wa  { background: #DCF8C6; }
.ki-ig  { background: #FCE4EC; }
.kontak-card h4 { font-size: .95rem; font-weight: 700; color: var(--text); }
.kontak-card p  { font-size: .82rem; color: var(--gray-600); }

/* ─── FOOTER ─── */
footer {
  background: var(--green-dark); color: rgba(255,255,255,.8);
  padding: 2.5rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem;
  margin-bottom: 2rem;
}
footer h4 { color: var(--white); font-size: .95rem; margin-bottom: .75rem; }
footer p, footer a { font-size: .85rem; line-height: 1.8; color: rgba(255,255,255,.7); }
footer a { text-decoration: none; display: block; }
footer a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1.25rem; text-align: center;
  font-size: .78rem; color: rgba(255,255,255,.45);
}

/* ─── ADMIN LOGIN MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 1.75rem; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.modal h3 { color: var(--green-dark); margin-bottom: 1.1rem; font-size: 1.1rem; }
.modal input {
  width: 100%; padding: .75rem 1rem;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-family: inherit; font-size: 1rem; color: var(--text);
  margin-bottom: .75rem; transition: border-color .15s;
  background: var(--white);
}
.modal input:focus { outline: none; border-color: var(--green-light); }
.modal label { font-size: .85rem; font-weight: 600; color: var(--gray-600); display: block; margin-bottom: .4rem; }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; }
.btn-sm {
  padding: .6rem 1.25rem; border-radius: 8px;
  font-size: .9rem; font-weight: 600; cursor: pointer; border: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-sm-primary { background: var(--green-dark); color: var(--white); }
.btn-sm-primary:hover { background: var(--green-mid); }
.btn-sm-ghost { background: var(--gray-100); color: var(--gray-800); }
.btn-sm-ghost:hover { background: var(--gray-200); }
.btn-sm-danger { background: #DC3545; color: var(--white); }

/* ─── ADMIN PANEL ─── */
.admin-panel {
  position: fixed; inset: 0; z-index: 8000;
  background: var(--gray-50); overflow-y: auto;
}
.admin-header {
  background: var(--green-dark); color: var(--white);
  padding: .85rem 1rem; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.admin-header h2 { font-size: 1rem; }
.admin-inner { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem; }
.admin-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin-tab {
  padding: .5rem 1rem; border-radius: 8px; font-size: .85rem; font-weight: 600;
  cursor: pointer; background: var(--white); color: var(--gray-600);
  border: 1px solid var(--gray-200); transition: .15s;
  -webkit-tap-highlight-color: transparent;
}
.admin-tab.active { background: var(--green-dark); color: var(--white); border-color: var(--green-dark); }
.admin-section h3 { font-size: 1rem; color: var(--green-dark); margin-bottom: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.admin-table th {
  background: var(--green-dark); color: var(--white);
  padding: .55rem .75rem; text-align: left; font-weight: 600;
  white-space: nowrap;
}
.admin-table td {
  padding: .55rem .75rem; border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--green-xpale); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.admin-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem;
}
.admin-row { display: flex; gap: .65rem; align-items: flex-end; flex-wrap: wrap; }
.admin-row .form-group { flex: 1; min-width: 140px; }
.form-group label { font-size: .78rem; font-weight: 600; color: var(--gray-600); display: block; margin-bottom: .3rem; }
.form-group input,
.form-group select {
  width: 100%; padding: .65rem .85rem;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-family: inherit; font-size: .9rem; background: var(--white);
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--green-light); }
.pill-tag {
  display: inline-block; padding: .2rem .6rem;
  border-radius: 100px; font-size: .72rem; font-weight: 600;
}
.badge-online  { background: #D1E7DD; color: var(--green-dark); }
.badge-offline { background: #FFF3CD; color: #856404; }

/* ─── UTILS ─── */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
[x-cloak] { display: none !important; }

/* ═══════════════════════════════════
   RESPONSIVE — TABLET (≤900px)
   ═══════════════════════════════════ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .hero-logo-wrap { display: none; }
  .hero-sub { margin: 0 auto 1.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* ═══════════════════════════════════
   RESPONSIVE — MOBILE (≤768px)
   ═══════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-logo-text .logo-sub { display: none; }

  .section { padding: 2.75rem 1rem; }
  .section-header { margin-bottom: 1.75rem; }

  #hero { min-height: auto; }
  .hero-inner { padding: 3rem 1rem 4rem; }
  .hero-h1 { font-size: 1.55rem; }
  .hero-sub { font-size: .925rem; }

  .programs-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .prog-card { padding: 1.1rem 1rem; }
  .prog-icon { font-size: 1.4rem; margin-bottom: .5rem; }
  .prog-card h3 { font-size: .9rem; }
  .prog-card p { font-size: .8rem; }
  .prog-link { font-size: .78rem; padding: .45rem .75rem; margin-top: .85rem; }

  .kontak-grid { grid-template-columns: 1fr 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }

  .admin-inner { padding: 1rem .75rem; }
  .admin-row { flex-direction: column; }
  .admin-row .form-group { width: 100%; min-width: 0; }

  /* Admin table: card layout on mobile */
  .admin-table thead { display: none; }
  .admin-table tr {
    display: block; background: var(--white);
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    margin-bottom: .75rem; padding: .75rem;
  }
  .admin-table td {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--gray-100); padding: .45rem 0;
    font-size: .82rem;
  }
  .admin-table td:last-child { border-bottom: none; }
  .admin-table td::before {
    content: attr(data-label);
    font-weight: 700; color: var(--gray-600);
    font-size: .75rem; margin-right: .75rem; flex-shrink: 0;
  }
  .admin-table td:last-child::before { content: ''; }
}

/* ═══════════════════════════════════
   RESPONSIVE — SMALL PHONE (≤480px)
   ═══════════════════════════════════ */
@media (max-width: 480px) {
  .programs-grid { grid-template-columns: 1fr; }
  .kontak-grid { grid-template-columns: 1fr; }
  .hero-h1 { font-size: 1.4rem; }
}

/* ─── TOUCH TARGETS ─── */
@media (hover: none) {
  .prog-card:hover, .kontak-card:hover { transform: none; box-shadow: none; }
  .prog-link { padding: .65rem 1rem; }
  .btn-nav-m { min-height: 48px; display: flex; align-items: center; justify-content: center; }
}