/* Al-Ehsan Academy — shared site styles */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fffaf2; font-family: 'Jost', system-ui, sans-serif; color: #1f2445; -webkit-font-smoothing: antialiased; }
h1, h2 { font-weight: 600; }
a { color: #2d335e; }
a:hover { color: #1f2445; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #f8971d; outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #ffffff; box-shadow: 0 2px 0 #f1e7d6; }
.site-header-inner { max-width: 1320px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex-shrink: 0; }
.brand-logo { position: relative; flex-shrink: 0; width: 52px; height: 67px; overflow: hidden; }
.brand-logo img { position: absolute; width: 169px; height: 95px; max-width: none; left: -59px; top: -13px; }
.brand-name { font-size: 18px; font-weight: 500; letter-spacing: 0.16em; color: #2d335e; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 2px; font-size: 15px; font-weight: 600; }
.nav-link { color: #2d335e; text-decoration: none; padding: 12px 8px; white-space: nowrap; }
.nav-link:hover { color: #9a5200; }
.nav-link[aria-current="page"] { color: #9a5200; box-shadow: inset 0 -3px 0 #f8971d; }
.dd { position: relative; }
.dd-btn { font: inherit; font-weight: 700; color: #2d335e; background: transparent; border: 0; border-radius: 10px; padding: 12px 8px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.dd-btn[aria-expanded="true"] { background: #fff3e0; }
.dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dd-menu { position: absolute; top: calc(100% + 10px); left: -12px; width: 260px; background: #ffffff; border-radius: 18px; box-shadow: 0 24px 60px rgba(31,36,69,.22); border-top: 4px solid #f8971d; padding: 10px; display: flex; flex-direction: column; gap: 2px; font-weight: 700; z-index: 60; }
.dd-item { padding: 12px 14px; border-radius: 12px; text-decoration: none; color: #2d335e; }
.dd-item:hover { background: #fff3e0; color: #2d335e; }
.enrol-btn { margin-left: 8px; background: #f8971d; color: #2d335e; text-decoration: none; font-weight: 800; padding: 12px 18px; border-radius: 999px; white-space: nowrap; }
.enrol-btn:hover { background: #ffa83d; color: #2d335e; }
.menu-toggle { display: none; background: none; border: 0; color: #2d335e; padding: 10px; cursor: pointer; border-radius: 10px; }

@media (max-width: 1180px) {
  .menu-toggle { display: block; }
  .site-header-inner { flex-wrap: wrap; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 6px; border-top: 1px solid #f1e7d6; font-size: 17px; }
  .main-nav.open { display: flex; }
  .nav-link { padding: 14px 6px; border-bottom: 1px solid #f6efe2; }
  .nav-link[aria-current="page"] { box-shadow: inset 4px 0 0 #f8971d; padding-left: 14px; }
  .dd-btn { width: 100%; padding: 14px 6px; justify-content: space-between; border-bottom: 1px solid #f6efe2; border-radius: 0; }
  .dd-menu { position: static; width: auto; box-shadow: none; border-top: 0; padding: 0 0 6px 12px; }
  .enrol-btn { margin: 12px 0 4px; text-align: center; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 15px; letter-spacing: 0.1em; }
  .brand-logo { width: 44px; height: 57px; }
  .brand-logo img { width: 143px; height: 80px; left: -50px; top: -11px; }
}

/* ---------- Shared bits used across pages ---------- */
.card-lift { transition: transform .2s ease, box-shadow .2s ease; }
.card-lift:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(45,51,94,.14); }
.jump:hover { background: #ffffff; color: #2d335e !important; }
input, select, textarea { max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #f8971d !important; }
table { max-width: 100%; }

/* Forms */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: #1d6b3a; }
.form-status.error { color: #b3261e; }
button[type="submit"]:disabled { opacity: .6; cursor: wait; }

/* Blog filter */
.chip { font: inherit; font-size: 15px; font-weight: 700; padding: 11px 20px; border-radius: 999px; cursor: pointer; border: 2px solid #ece4d4; background: #ffffff; color: #2d335e; }
.chip[aria-pressed="true"] { background: #2d335e; border-color: #2d335e; color: #ffffff; }

@media (max-width: 600px) {
  h1 { font-size: 38px !important; }
  section { padding-left: 16px !important; padding-right: 16px !important; }
}
