/* Page-specific helpers */
.pagecover {
  position: relative; display: flex; align-items: center;
  min-height: clamp(280px, 42vh, 420px);
  color: #fff; overflow: hidden;
  background:
    var(--cover-image, url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="1600" height="900"%3E%3Cdefs%3E%3ClinearGradient id="g" x1="0" y1="0" x2="0" y2="1"%3E%3Cstop stop-color="%230F2347"/%3E%3Cstop offset="1" stop-color="%231D4E9E"/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="1600" height="900" fill="url(%23g)"/%3E%3Cg opacity=".12" stroke="%23fff" stroke-width="1" fill="none"%3E%3Cpath d="M0 180h1600M0 360h1600M0 540h1600M0 720h1600"/%3E%3Cpath d="M200 0v900M400 0v900M600 0v900M800 0v900M1000 0v900M1200 0v900M1400 0v900"/%3E%3C/g%3E%3C/svg%3E')) center/cover no-repeat,
    linear-gradient(160deg, #0F2347, #1D4E9E);
}
.pagecover__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(15,35,71,.94) 0%, rgba(15,35,71,.78) 40%, rgba(29,78,158,.4) 100%);
}
.pagecover__overlay::after {
  content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.pagecover__content { position: relative; z-index: 2; width: 100%; padding: clamp(40px, 6vw, 68px) clamp(20px, 5vw, 96px); }
.pagecover__title { color: #fff; font-size: clamp(1.8rem, 3.8vw, 2.8rem); font-weight: 800; letter-spacing: -.01em; }
.pagecover__text { margin-top: 14px; color: #cddaf0; max-width: 640px; font-size: 1rem; }
.pagecover__breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; font-size: .88rem; color: #cddaf0; }
.pagecover__breadcrumb a { color: #fff; }
.pagecover__breadcrumb span { opacity: .7; }

.imgsection { padding: clamp(48px, 6vw, 72px) 0; }
.imgsection--alt { background: var(--light-bg); }
.imgsection__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.imgsection__grid--reverse .imgsection__media { order: 2; }
.imgsection__title { font-size: clamp(1.25rem, 2.4vw, 1.8rem); margin-bottom: 14px; }
.imgsection__text { color: var(--muted); margin-bottom: 14px; }
.imgplaceholder {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed var(--line); background: #fff; border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 40px);
  aspect-ratio: 16 / 10; box-shadow: var(--shadow-sm);
}
.imgplaceholder--dark { background: #0f1b33; border-color: rgba(255,255,255,.25); color: #dbe5f7; }
.imgplaceholder__icon { width: 56px; height: 56px; border-radius: 14px; background: var(--light-bg); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.imgplaceholder__icon svg { width: 28px; height: 28px; fill: var(--primary); }
.imgplaceholder--dark .imgplaceholder__icon { background: rgba(255,255,255,.12); }
.imgplaceholder--dark .imgplaceholder__icon svg { fill: var(--accent); }
.imgplaceholder__label { font-family: var(--font-head); font-weight: 600; font-size: 1rem; margin-bottom: 6px; }
.imgplaceholder__note { font-size: .88rem; color: var(--muted); max-width: 420px; }
.imgplaceholder--dark .imgplaceholder__note { color: #a9bcdd; }
.imgplaceholder__meta {
  position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 10px 12px;
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 12px; text-align: left; box-shadow: var(--shadow-sm);
}
.imgplaceholder--dark .imgplaceholder__meta { background: rgba(15,27,51,.96); border-color: rgba(255,255,255,.18); }
.imgplaceholder__kwtitle { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sky); margin-bottom: 4px; }
.imgplaceholder__keywords { font-size: .78rem; color: var(--text); line-height: 1.5; }
.imgplaceholder--dark .imgplaceholder__keywords { color: #e3ebfa; }
@media (max-width: 900px) {
  .imgsection__grid { grid-template-columns: 1fr; }
  .imgsection__grid--reverse .imgsection__media { order: 0; }
}

/* Real image frames (replacing placeholders) */
.imgframe { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.imgframe img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.imgframe--wide img { aspect-ratio: 16 / 7; }


/* Google map embed */
.mapembed { position: relative; width: 100%; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--light-bg); }
.mapembed iframe { display: block; width: 100%; height: clamp(360px, 56vh, 560px); border: 0; }


/* Checklist */
.checklist { list-style: none; margin: 0 0 26px; padding: 18px 20px 18px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); display: grid; gap: 10px; box-shadow: var(--shadow-sm); }
.checklist li { position: relative; padding-left: 30px; font-size: .93rem; color: var(--text); }
.checklist li::before {
  content: "\2713"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(29,78,158,.1); color: var(--primary); font-size: .74rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Admission modal */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8,16,38,.72); backdrop-filter: blur(6px); animation: modalFade .22s ease; }
.modal__panel {
  position: relative; z-index: 1; width: 100%; max-width: 620px; max-height: 92vh; overflow: hidden auto;
  background: #fff; border-radius: 20px; box-shadow: 0 40px 90px rgba(8,16,40,.45);
  animation: modalPop .3s cubic-bezier(.2,.9,.3,1.15);
}
.modal__head { position: relative; padding: 30px 34px 28px; color: #fff; overflow: hidden; background: linear-gradient(130deg, #0F2347 0%, #1D4E9E 62%, #2F8FCE 100%); }
.modal__head::after { content: ""; position: absolute; right: -46px; top: -46px; width: 170px; height: 170px; border-radius: 50%; background: rgba(244,185,26,.16); }
.modal__head::before { content: ""; position: absolute; right: 54px; bottom: -34px; width: 88px; height: 88px; border-radius: 50%; background: rgba(255,255,255,.07); }
.modal__tag { display: inline-block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.modal__title { position: relative; z-index: 1; color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 800; }
.modal__sub { position: relative; z-index: 1; margin-top: 9px; color: #cddaf0; font-size: .93rem; max-width: 46ch; }
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .2s, background .2s, color .2s;
}
.modal__close:hover { background: #fff; color: var(--primary-dark); transform: rotate(90deg); }
.modal__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal__body { padding: 28px 34px 32px; }
.modal .form { background: transparent; border: 0; padding: 0; box-shadow: none; }
.modal__success { text-align: center; padding: 18px 4px 10px; }
.modal__success-icon {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 18px; color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--sky)); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 30px rgba(29,78,158,.35);
}
.modal__success-title { font-size: 1.25rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 10px; }
.modal__success-text { color: var(--muted); max-width: 44ch; margin: 0 auto 22px; font-size: .95rem; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop { from { opacity: 0; transform: translateY(22px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .modal__backdrop, .modal__panel { animation: none; }
  .modal__close:hover { transform: none; }
}
@media (max-width: 620px) {
  .modal { padding: 12px; }
  .modal__panel { border-radius: 16px; max-height: 94vh; }
  .modal__head, .modal__body { padding-left: 20px; padding-right: 20px; }
  .modal__close { width: 34px; height: 34px; font-size: 20px; }
}


/* How-to-apply step cards */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
.stepcard {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 22px 24px; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.stepcard:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.stepcard::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--sky)); }
.stepcard__num { position: absolute; top: 12px; right: 16px; font-family: var(--font-head); font-weight: 800; font-size: 2.2rem; line-height: 1; color: rgba(29,78,158,.13); }
.stepcard__icon { width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, var(--primary), var(--sky)); margin-bottom: 16px; box-shadow: 0 10px 20px rgba(29,78,158,.25); }
.stepcard__icon svg { width: 24px; height: 24px; fill: #fff; }
.stepcard__title { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.stepcard__text { font-size: .9rem; color: var(--muted); line-height: 1.6; }
.steps__cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .steps__cta .btn { width: 100%; margin: 0 0 10px !important; }
}


/* FAQ accordion */
.faqlist { display: grid; gap: 12px; max-width: 880px; margin: 32px auto 0; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.faq:hover { border-color: rgba(47,143,206,.45); }
.faq[open] { border-color: rgba(47,143,206,.55); box-shadow: var(--shadow); }
.faq__q {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--primary-dark);
  transition: background .2s ease;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::marker { content: ""; }
.faq__q:hover { background: var(--light-bg); }
.faq__q:focus-visible { outline: 2px solid var(--sky); outline-offset: -2px; }
.faq__num { font-size: .8rem; font-weight: 800; letter-spacing: .06em; color: var(--sky); min-width: 26px; }
.faq__toggle {
  margin-left: auto; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: var(--light-bg); color: var(--primary); position: relative; transition: background .2s ease, color .2s ease;
}
.faq__toggle::before, .faq__toggle::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; border-radius: 2px; transform: translate(-50%, -50%); }
.faq__toggle::before { width: 11px; height: 2px; }
.faq__toggle::after { width: 2px; height: 11px; transition: transform .2s ease; }
.faq[open] .faq__toggle { background: var(--primary); color: #fff; }
.faq[open] .faq__toggle::after { transform: translate(-50%, -50%) scaleY(0); }
.faq__a { padding: 0 20px 20px 60px; color: var(--muted); font-size: .95rem; line-height: 1.7; animation: faqOpen .25s ease; }
.faq__a p { margin: 0 0 10px; }
.faq__a p:last-child { margin-bottom: 0; }
.faq__a ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.faq__a a { color: var(--primary); font-weight: 600; }
@keyframes faqOpen { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 620px) {
  .faq__q { font-size: .95rem; padding: 16px; gap: 10px; }
  .faq__a { padding: 0 16px 16px; }
  .faq__num { display: none; }
}
