/* ==========================================================
   โรงเรียนนาบอน — Stylesheet
   โทน: สดใส ทันสมัย โค้งมน (ต่อยอดจากธีมของ Portal โรงเรียน)
   ========================================================== */

:root {
    --teal-900: #0B2A55;
    --teal-700: #14509E;
    --teal-500: #1E6FD9;
    --teal-300: #7EB2F0;
    --teal-100: #E6F0FD;
    --mint-bg: #F5F9FE;
    --gold-500: #FFC738;
    --gold-600: #E8A800;
    --ink-900: #1B2430;
    --ink-600: #4C5A6E;
    --ink-300: #93A0B3;
    --white: #FFFFFF;
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow-soft: 0 10px 30px rgba(11, 79, 74, 0.08);
    --shadow-card: 0 6px 20px rgba(11, 79, 74, 0.10);
    --font-display: 'Prompt', 'Sarabun', sans-serif;
    --font-body: 'Sarabun', 'Prompt', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink-900);
    background: var(--mint-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 .5em;
    color: var(--teal-900);
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--gold-600); }

img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--gold-600);
    background: #FFF6D9;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head p { color: var(--ink-600); font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    padding: 13px 28px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--teal-500); color: var(--white); box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--teal-700); color: var(--white); transform: translateY(-2px); }
.btn-gold { background: var(--gold-500); color: var(--teal-900); box-shadow: var(--shadow-card); }
.btn-gold:hover { background: var(--gold-600); color: var(--white); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.15); color: var(--white); }
.btn-ghost { background: var(--teal-100); color: var(--teal-700); }
.btn-ghost:hover { background: var(--teal-300); color: var(--teal-900); }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ---------- Top bar & Header ---------- */
.topbar {
    background: var(--teal-900);
    color: rgba(255,255,255,.85);
    font-size: 13px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar-links { display: flex; gap: 18px; }
.topbar-links span { display: inline-flex; align-items: center; gap: 6px; }

.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 16px rgba(11,79,74,.06);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 52px; height: 52px; border-radius: 16px; object-fit: cover; background: var(--teal-100); }
.brand-text .name { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--teal-900); }
.brand-text .tagline { font-size: 12.5px; color: var(--ink-600); }

.nav-main { display: flex; align-items: center; gap: 4px; }
.nav-main a {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--ink-900);
    font-weight: 600;
    font-size: 15px;
}
.nav-main a:hover, .nav-main a.active { background: var(--teal-100); color: var(--teal-700); }

.nav-toggle { display: none; background: var(--teal-100); border: none; border-radius: 12px; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--teal-900); margin: 4px auto; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 55%, var(--teal-500) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero::before {
    content: "";
    position: absolute;
    right: -120px; top: -120px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,199,56,.35), transparent 70%);
}
.hero-inner { position: relative; padding: 90px 0 100px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { color: var(--white); font-size: 44px; margin-bottom: 18px; }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,.9); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius-lg);
    aspect-ratio: 4/3;
    overflow: hidden;
    backdrop-filter: blur(4px);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -46px;
    position: relative;
    z-index: 2;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 22px 18px;
    text-align: center;
}
.stat-card .num { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--teal-700); }
.stat-card .label { font-size: 13px; color: var(--ink-600); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(11,79,74,.16); }
.card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--teal-100); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card .meta { font-size: 12.5px; color: var(--gold-600); font-weight: 600; margin-bottom: 8px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--ink-600); font-size: 14.5px; flex: 1; }
.card .more { margin-top: 14px; font-weight: 600; font-size: 14px; }

.feature-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 30px 26px;
    box-shadow: var(--shadow-card);
}
.feature-icon {
    width: 54px; height: 54px;
    border-radius: 16px;
    background: var(--teal-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
}
.feature-card p { color: var(--ink-600); font-size: 14.5px; }

/* ---------- Director spotlight (หน้าแรก) ---------- */
.director-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 36px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 32px;
    align-items: center;
    border-left: 6px solid var(--gold-500);
}
.director-photo {
    width: 180px; height: 180px; border-radius: 50%;
    overflow: hidden; background: var(--teal-100);
    box-shadow: var(--shadow-card);
    flex-shrink: 0;
}
.director-photo img { width: 100%; height: 100%; object-fit: cover; }
.director-card .role { color: var(--teal-700); font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.director-card h3 { font-size: 24px; margin-bottom: 10px; }
.director-card .quote { color: var(--ink-600); font-size: 15px; font-style: italic; }
@media (max-width: 640px) {
    .director-card { grid-template-columns: 1fr; text-align: center; padding: 28px 22px; }
    .director-photo { margin: 0 auto; }
}

/* ---------- Staff ---------- */
.staff-card { text-align: center; padding-bottom: 26px; }
.staff-card .thumb { aspect-ratio: 1/1; }
.staff-card h3 { margin-bottom: 2px; font-size: 16.5px; }
.staff-card .role { color: var(--teal-700); font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.staff-card .dept { color: var(--ink-300); font-size: 12.5px; }

.group-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.group-tabs a {
    padding: 9px 20px; border-radius: 999px; background: var(--white); box-shadow: var(--shadow-card);
    font-weight: 600; font-size: 14px; color: var(--ink-600);
}
.group-tabs a.active, .group-tabs a:hover { background: var(--teal-500); color: var(--white); }

/* ---------- Info blocks (about page) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.info-box {
    background: var(--white); border-radius: var(--radius-md); padding: 28px 26px; box-shadow: var(--shadow-card);
    border-top: 4px solid var(--gold-500);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-item .ico {
    width: 44px; height: 44px; border-radius: 14px; background: var(--teal-100); color: var(--teal-700);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px;
}
.map-frame { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

form.form-card {
    background: var(--white); border-radius: var(--radius-md); padding: 30px; box-shadow: var(--shadow-card);
}
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--teal-900); }
.form-row input, .form-row textarea, .form-row select {
    width: 100%; border: 1.5px solid #D6E4F5; border-radius: 12px; padding: 12px 14px;
    font-family: var(--font-body); font-size: 15px; background: var(--mint-bg); color: var(--ink-900);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
    outline: none; border-color: var(--teal-500); background: var(--white);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: rgba(255,255,255,.82); margin-top: 60px; }
.site-footer .container { padding: 56px 24px 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: var(--white); font-size: 16px; margin-bottom: 16px; }
.footer-grid a { color: rgba(255,255,255,.75); display: block; margin-bottom: 10px; font-size: 14.5px; }
.footer-grid a:hover { color: var(--gold-500); }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.footer-brand img { width: 46px; height: 46px; border-radius: 12px; }
.footer-brand .name { color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; display: flex; justify-content: space-between; font-size: 13px; flex-wrap: wrap; gap: 8px; }

/* ---------- Pagination / empty state ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; background: var(--white); box-shadow: var(--shadow-card); font-weight: 600; color: var(--ink-600);
}
.pagination a:hover, .pagination .current { background: var(--teal-500); color: var(--white); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-300); }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: 14px; margin-bottom: 20px; font-size: 14.5px; font-weight: 600; }
.alert-success { background: #E4F7EE; color: #0F7A4E; }
.alert-error { background: #FCEAEA; color: #C0392B; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; padding-bottom: 70px; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .topbar { display: none; }
    .nav-main { position: fixed; top: 78px; left: 16px; right: 16px; background: var(--white); flex-direction: column;
        align-items: stretch; padding: 12px; border-radius: var(--radius-md); box-shadow: var(--shadow-soft);
        display: none; }
    .nav-main.open { display: flex; }
    .nav-main a { padding: 12px 16px; }
    .nav-toggle { display: block; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .footer-grid { grid-template-columns: 1fr; }
}
