/* ============================================================================
   CIIS public website (2026-10-02)
   ----------------------------------------------------------------------------
   Three colours: white, near-black and CIIS pink. Pink is only ever a background
   (the main button, the "Join CIIS" band, the dot of the open menu item), never
   text. Greys are black at an opacity. System type (San Francisco on Apple
   devices), Noto Sans Khmer for Khmer. Few icons: chevrons and the menu button.
   ========================================================================= */

:root {
  --ink: #171717;
  --ink-2: rgba(23, 23, 23, .78);
  --ink-3: rgba(23, 23, 23, .56);
  --ink-4: rgba(23, 23, 23, .38);
  --line: rgba(23, 23, 23, .09);
  --fill: rgba(23, 23, 23, .04);          /* Apple's #F5F5F7 */
  --fill-2: rgba(23, 23, 23, .07);
  --white: #FFFFFF;
  --pink: #D4146E;
  --pink-press: #B90F5F;
  --wrap: 1120px;
  --wrap-text: 720px;
  --r: 18px;
  --r-lg: 28px;
  --nav-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans Khmer", "Khmer OS", Arial, sans-serif;
  --ease: cubic-bezier(.2, .6, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-family: var(--font); font-weight: 700; letter-spacing: -.025em; line-height: 1.12; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(212, 20, 110, .14); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-text { max-width: var(--wrap-text); }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* buttons: pink pill (the main action), outlined pill, text link with a chevron */
.btn-main, .btn-line, .btn-white {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 24px; border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  text-decoration: none !important; cursor: pointer; border: 0;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn-main { background: var(--pink); color: var(--white); }
.btn-main:hover { background: var(--pink-press); color: var(--white); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-white:hover { background: rgba(255, 255, 255, .9); color: var(--ink); }
.btn-main:active, .btn-line:active, .btn-white:active { transform: scale(.98); }
.more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink); }
.more svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.more:hover svg { transform: translateX(3px); }

/* ── Navigation ───────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.nav-logo { display: flex; align-items: center; flex: 0 0 auto; }
.nav-logo img { height: 32px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0 auto; padding: 0; }
.nav-links a {
  position: relative; display: block; padding: 8px 12px; border-radius: 999px;
  font-size: 14px; color: var(--ink-2); text-decoration: none !important;
}
.nav-links a:hover { color: var(--ink); background: var(--fill); }
.nav-links .is-open > a { color: var(--ink); font-weight: 600; }
.nav-links .is-open > a::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--pink);
}
.nav-sub { position: relative; }
.nav-sub ul {
  display: none; position: absolute; top: 100%; left: 0; min-width: 200px; margin: 6px 0 0; padding: 6px;
  list-style: none; background: var(--white); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(23, 23, 23, .12), 0 0 0 1px var(--line);
}
.nav-sub:hover ul, .nav-sub:focus-within ul { display: block; }
.nav-sub ul a { border-radius: 10px; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.nav-actions .nav-text { font-size: 14px; color: var(--ink-2); padding: 8px 10px; }
.nav-actions .btn-main { height: 34px; padding: 0 16px; font-size: 14px; }
.nav-toggle {
  display: none; width: 40px; height: 40px; margin-right: -8px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .x { display: none; }
.nav-panel { display: none; }

@media (max-width: 860px) {
  .nav-links, .nav-actions .nav-text { display: none; }
  .nav .wrap { gap: 12px; }
  .nav-actions { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .nav-logo img { height: 28px; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle .bars { display: none; }
  body.nav-open .nav-toggle .x { display: block; }
  .nav-panel {
    display: block; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 999;
    padding: 12px 24px calc(32px + env(safe-area-inset-bottom));
    background: var(--white); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  body.nav-open .nav-panel { opacity: 1; visibility: visible; transform: none; }
  .nav-panel ul { list-style: none; margin: 0; padding: 0; }
  .nav-panel a { display: block; padding: 14px 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; border-bottom: 1px solid var(--line); text-decoration: none !important; }
  .nav-panel .sub a { font-size: 18px; font-weight: 500; padding-left: 16px; color: var(--ink-2); }
  .nav-panel .panel-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
  .nav-panel .panel-actions a { border: 0; font-size: 17px; padding: 0; }
  .nav-panel .panel-actions .btn-main, .nav-panel .panel-actions .btn-line { height: 50px; width: 100%; }
}

/* the latest notice, one line under the bar */
.notice-strip { background: var(--fill); font-size: 14px; }
.notice-strip a { display: block; padding: 10px 24px; text-align: center; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-strip b { color: var(--ink); font-weight: 600; }

/* ── Sections ─────────────────────────────────────────────────────────── */
section { padding: 88px 0; }
.eyebrow { display: block; margin-bottom: 12px; font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.h-section { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 16px; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-2); letter-spacing: -.015em; }
.section-head { margin-bottom: 44px; }
.section-head.center { text-align: center; }
.section-head.center .lead { max-width: 640px; margin: 0 auto; }
.section-head.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* hero */
.hero { padding: 72px 0 0; text-align: center; overflow: hidden; }
.hero h1 { font-size: clamp(44px, 7.6vw, 96px); letter-spacing: -.045em; line-height: 1.02; margin: 0 auto 20px; max-width: 900px; }
.hero .lead { max-width: 640px; margin: 0 auto 32px; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 56px; }
.slides { position: relative; max-width: 1200px; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden; background: var(--fill); aspect-ratio: 16 / 8; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s ease; }
.slides img.on { opacity: 1; }
.slide-dots { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(23, 23, 23, .28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.slide-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.slide-dots button.on { width: 22px; background: var(--white); }
.hero-pad { padding: 0 24px; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.fact b { display: block; font-size: clamp(34px, 4.2vw, 48px); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.fact > span { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-3); }

/* tiles on grey */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { display: flex; flex-direction: column; min-height: 260px; padding: 36px 32px; border-radius: var(--r-lg); background: var(--fill); }
.tile small { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.tile h3 { margin: 10px 0 12px; font-size: 26px; letter-spacing: -.02em; }
.tile p { color: var(--ink-2); font-size: 16px; }
.tile .more { margin-top: auto; padding-top: 22px; }

/* approach: heading left, words right */
.approach { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.approach .prose { font-size: 19px; line-height: 1.65; color: var(--ink-2); }
.approach .prose p + p { margin-top: 1em; }
.approach .clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }
.approach .more { margin-top: 18px; }

/* news rows */
.rows { border-top: 1px solid var(--line); }
.row-link { display: grid; grid-template-columns: 140px 1fr auto; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none !important; }
.row-link:hover .row-title { text-decoration: underline; text-underline-offset: 3px; }
.row-date { font-size: 14px; color: var(--ink-3); }
.row-title { font-size: 18px; font-weight: 600; letter-spacing: -.015em; line-height: 1.4; }
.row-link svg { width: 18px; height: 18px; color: var(--ink-4); }

/* the pink band */
.join { padding: 24px 0 96px; }
.join-card { padding: clamp(48px, 7vw, 88px) 32px; border-radius: var(--r-lg); background: var(--pink); text-align: center; }
.join-card h2 { color: var(--white); font-size: clamp(34px, 5vw, 56px); margin-bottom: 14px; }
.join-card p { color: rgba(255, 255, 255, .86); font-size: 19px; max-width: 560px; margin: 0 auto 30px; }
.join-card .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.join-card .btn-ghost { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 999px; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .8); font-weight: 600; text-decoration: none !important; }
.join-card .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); }

/* ── Inner pages ──────────────────────────────────────────────────────── */
.page-head { padding: 64px 0 28px; }
.page-head h1 { font-size: clamp(38px, 5.4vw, 64px); letter-spacing: -.04em; }
.page-head .meta { margin-top: 14px; font-size: 15px; color: var(--ink-3); }
.page-head .back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 20px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.page-head .back svg { width: 14px; height: 14px; }
.page-body { padding: 8px 0 96px; }
.prose { font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.6em 0 .5em; }
.prose h2 { font-size: 30px; } .prose h3 { font-size: 24px; } .prose h4 { font-size: 20px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--r); margin: 12px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 16px; }
.prose td, .prose th { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose iframe { max-width: 100%; border: 0; border-radius: var(--r); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 20px; margin-top: 12px; }
.card { display: block; text-decoration: none !important; }
.card .pic { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--fill); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .pic img { transform: scale(1.03); }
.card h3 { margin-top: 14px; font-size: 19px; letter-spacing: -.015em; line-height: 1.35; }
.card p { margin-top: 4px; font-size: 15px; color: var(--ink-3); }
.media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; }
.media a { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--fill); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.empty-note { padding: 28px; border-radius: var(--r); background: var(--fill); color: var(--ink-3); text-align: center; }

/* forms built by the CMS (contact, complaint) and the online admission */
.page-body::after, .page-body .prose::after { content: ""; display: table; clear: both; }
.page-body form.theme-form { float: none; width: 100%; padding: 0; }
.page-body form.theme-form .form-group { margin-left: 0; margin-right: 0; }
.page-body form .form-control, .page-body input[type=text], .page-body input[type=email], .page-body input[type=tel],
.page-body input[type=number], .page-body input[type=date], .page-body select, .page-body textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid rgba(23, 23, 23, .16); border-radius: 12px;
  background: var(--white); color: var(--ink); font: inherit; font-size: 16px; box-shadow: none;
}
.page-body textarea { min-height: 120px; }
.page-body form .form-control:focus, .page-body input:focus, .page-body select:focus, .page-body textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 23, 23, .08);
}
.page-body label, .page-body .control-label { font-size: 14px; font-weight: 600; color: var(--ink-2); text-align: left !important; }
.page-body .btn, .page-body button[type=submit], .page-body input[type=submit] {
  height: 46px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--pink); color: var(--white);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.page-body .btn:hover, .page-body button[type=submit]:hover { background: var(--pink-press); color: var(--white); }
.page-body .alert { border-radius: 14px; border: 0; background: var(--fill); color: var(--ink); padding: 14px 18px; }
.page-body .alert-danger { box-shadow: inset 3px 0 0 var(--pink); }
.page-body .form-group { margin-bottom: 18px; }
.page-body .panel, .page-body .box { border: 1px solid var(--line); border-radius: var(--r); box-shadow: none; }
.page-body .panel-heading { background: var(--fill); border: 0; border-radius: var(--r) var(--r) 0 0; font-weight: 600; }
.page-body .text-danger, .page-body .text-red { color: var(--ink) !important; font-weight: 600; }

/* the online admission pages */
.page-form { padding-top: 48px; }
.page-form h1, .page-form h2, .page-form h3, .page-form h4 { letter-spacing: -.02em; }
.page-form h4, .page-form .box-title, .page-form .pagetitleh, .page-form .pagetitleh2 { margin: 28px 0 14px; font-size: 22px; font-weight: 700; }
.page-form .row { margin-left: -10px; margin-right: -10px; }
.page-form [class*="col-"] { padding-left: 10px; padding-right: 10px; }
.page-form .radio-inline, .page-form .checkbox-inline { font-size: 16px; }
.page-form .dropify-wrapper { height: auto !important; min-height: 96px; border: 1px dashed rgba(23, 23, 23, .24); border-radius: 12px; }
.page-form .dropify-wrapper .dropify-message p { font-size: 15px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.foot { background: var(--fill); padding: 56px 0 28px; font-size: 13px; color: var(--ink-3); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.foot h4 { margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 8px; }
.foot a { color: var(--ink-3); }
.foot a:hover { color: var(--ink); }
.foot .about p { max-width: 320px; line-height: 1.6; }
.foot .about img { height: 30px; margin-bottom: 14px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; }
.foot-bottom nav { display: flex; gap: 18px; }

.cookie {
  position: fixed; left: 16px; bottom: 16px; z-index: 1001; display: flex; align-items: center; gap: 14px;
  max-width: 420px; padding: 12px 12px 12px 18px; border-radius: 16px; background: var(--white);
  box-shadow: 0 16px 40px rgba(23, 23, 23, .14), 0 0 0 1px var(--line); font-size: 14px; color: var(--ink-2);
}
.cookie button { flex: 0 0 auto; height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--white); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ── Smaller screens ─────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .approach { grid-template-columns: 1fr; gap: 20px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  section { padding: 64px 0; }
  .hero { padding-top: 48px; }
  .hero-actions { gap: 16px; margin-bottom: 36px; }
  .slides { aspect-ratio: 4 / 3; border-radius: 22px; }
  .hero-pad { padding: 0 16px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .tile { padding: 28px 24px; border-radius: 22px; }
  .row-link { grid-template-columns: 1fr auto; gap: 4px 16px; padding: 18px 0; }
  .row-date { grid-column: 1; }
  .row-title { grid-column: 1; grid-row: 2; font-size: 17px; }
  .row-link svg { grid-column: 2; grid-row: 1 / span 2; }
  .join { padding: 8px 0 64px; }
  .join-card { border-radius: 22px; padding: 48px 24px; }
  .cards { grid-template-columns: 1fr; }
  .media { grid-template-columns: 1fr 1fr; }
  .page-head { padding: 40px 0 20px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .cookie { left: 12px; right: 12px; max-width: none; bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media (min-width: 1800px) {
  :root { --wrap: 1360px; }
  body { font-size: 18px; }
  .slides { max-width: 1440px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slides img, .card .pic img, .nav-panel { transition: none; }
}
