/* =========================================================
   1) ROOT / DESIGN TOKENS
========================================================= */
:root {
    --primary: #7f5d8d;
    --primary-dark: #684a75;
    --secondary: #9d87a6;

    --soft: #f6f1f8;
    --soft-2: #efe6f3;
    --soft-3: #faf7fc;

    --bg: #fcfafe;
    --text: #2f2435;
    --muted: #6e6174;
    --white: #ffffff;

    --border: rgba(127, 93, 141, 0.14);
    --shadow: 0 18px 50px rgba(64, 39, 78, 0.1);
    --shadow-sm: 0 10px 24px rgba(64, 39, 78, 0.08);

    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;

    --container: 1240px;
}

/* =========================================================
   2) RESET / GLOBAL
========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Kanit", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background:
        radial-gradient(circle at top left, rgba(157, 135, 166, 0.14), transparent 30%),
        linear-gradient(180deg, #fcfafe 0%, #ffffff 30%, #ffffff 100%);
}

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

a {
    text-decoration: none;
    color: inherit;
}

button {
    font: inherit;
}


/* =========================================================
   3) LAYOUT HELPERS
========================================================= */
.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

.section-block {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: clamp(2.1rem, 5vw, 3.9rem);
    line-height: 1.08;
    color: var(--primary-dark);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.section-title h2 span {
    color: #ab96b4;
}

.section-intro {
    max-width: 720px;
    margin: 0.8rem auto 0;
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
}

.section-title-left {
    text-align: left;
    margin-bottom: 1.4rem;
}

.section-title-left h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.section-title-left .section-intro {
    margin-left: 0;
    text-align: left;
}

/* =========================================================
   4) HEADER / NAVIGATION
========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(127, 93, 141, 0.08);
}

.header-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: grid;
    place-items: center;
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.brand-text h1 {
    font-size: 1.15rem;
    line-height: 1.15;
    color: var(--primary-dark);
    letter-spacing: 0.02em;
}

.brand-text p {
    font-size: 0.88rem;
    color: var(--muted);
}

.site-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.site-nav a {
    padding: 0.72rem 1rem;
    border-radius: 999px;
    color: var(--primary-dark);
    font-weight: 500;
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    background: var(--soft);
}

/* =========================================================
   5) MOBILE NAV TOGGLE
========================================================= */
.nav-toggle {
    display: none;
    position: relative;
    z-index: 9999;
    pointer-events: auto;
    border: 0;
    background: transparent;
    cursor: pointer;
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    margin: 5px auto;
    background: var(--primary-dark);
    border-radius: 999px;
    transition: 0.25s ease;
}

/* =========================================================
   6) DROPDOWN
========================================================= */
.dropdown {
    position: relative;
}

.dropbtn {
    background: transparent;
    border: none;
    font: inherit;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    color: var(--primary-dark);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dropbtn:hover {
    background: var(--soft);
}

.dropbtn span {
    transition: 0.2s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    padding: 0.4rem;
    list-style: none;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    z-index: 1000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.dropdown-menu li a:hover {
    background: var(--soft);
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown.open .dropbtn span {
    transform: rotate(180deg);
}

/* =========================================================
   7) REUSABLE UI
========================================================= */
.eyebrow {
    display: inline-block;
    margin-bottom: 0.6rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--soft);
    color: var(--primary-dark);
    font-size: 0.95rem;
    font-weight: 500;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 500;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--primary-dark);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--soft);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--primary-dark);
    font-weight: 600;
    transition: 0.2s ease;
}

.text-link:hover {
    color: var(--secondary);
    transform: translateX(2px);
}

.outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--primary-dark);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: 0.2s ease;
}

.outline-btn:hover {
    background: var(--soft);
}

.news-badge,
.people-badge,
.activity-tag {
    display: inline-block;
    width: fit-content;
    border-radius: 999px;
    font-weight: 600;
    color: var(--primary-dark);
    background: rgba(127, 93, 141, 0.12);
}

.news-badge {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    background: var(--soft);
}

.people-badge {
    font-size: 0.68rem;
    padding: 0.22rem 0.55rem;
    margin-bottom: 0.55rem;
}

.activity-tag {
    font-size: 0.72rem;
    padding: 0.28rem 0.65rem;
    margin-bottom: 0.8rem;
}

.badge-new {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    vertical-align: middle;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    background: #7f5d8d;
}

/* =========================================================
   8) HOME HERO
========================================================= */
.hero {
    padding: 4.5rem 0 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
    align-items: center;
}

.hero h2 {
    max-width: 11ch;
    margin-bottom: 1rem;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 1.02;
    color: var(--primary-dark);
}

.hero h2 span {
    color: var(--secondary);
}

.hero p {
    max-width: 60ch;
    margin-bottom: 1.6rem;
    font-size: 1.06rem;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.value-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.1rem 1rem;
    box-shadow: var(--shadow-sm);
}

.value-card strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1rem;
    color: var(--primary-dark);
}

.value-card span {
    font-size: 0.92rem;
    color: var(--muted);
}

.hero-visual {
    position: relative;
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 32px;
    background: linear-gradient(145deg, #ffffff 0%, #fbf7fd 100%);
    box-shadow: var(--shadow);
}

.hero-image {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 4 / 4.6;
    background:
        linear-gradient(rgba(67, 41, 82, 0.18), rgba(67, 41, 82, 0.18)),
        url('../images/IMG_0612.JPG') center/cover;
}

.hero-image-overlay {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
}

.hero-image-overlay h3 {
    margin-bottom: 0.2rem;
    font-size: 1.15rem;
    color: var(--primary-dark);
}

.hero-image-overlay p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
}

.floating-note {
    position: absolute;
    right: -10px;
    bottom: 22px;
    max-width: 220px;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.floating-note small {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--secondary);
}

.floating-note strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--primary-dark);
}

.floating-note p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}

/* =========================================================
   9) HOME CONTENT SECTIONS
========================================================= */
.news-section,
.why-section,
.testimonial-section {
    padding: 3.5rem 0;
}

/* ---------- News ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.news-card-media {
    overflow: hidden;
    aspect-ratio: 4 / 2.7;
    background: linear-gradient(135deg, #cbbad3, #9d87a6);
}

.news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-media img {
    transform: scale(1.05);
}

.news-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    height: 100%;
    padding: 1.1rem 1.1rem 1.2rem;
}

.news-card-body h3 {
    font-size: 1.03rem;
    line-height: 1.45;
    font-weight: 600;
    color: var(--primary-dark);
}

.news-summary {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--muted);
}

.news-card-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: auto;
}

.section-footer-action {
    display: flex;
    justify-content: center;
    margin-top: 2.2rem;
}

/* ---------- Why English / Video ---------- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.video-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.video-frame {
    aspect-ratio: 16 / 9;
    background: #d8cddd;
}

.video-frame video,
.video-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-body {
    padding: 1.15rem 1.2rem 1.25rem;
}

.video-body h3 {
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
    color: var(--primary-dark);
}

.video-body p {
    font-size: 0.96rem;
    color: var(--muted);
}

/* ---------- Testimonial / Community ---------- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.info-card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(180deg, white 0%, var(--soft-3) 100%);
    box-shadow: var(--shadow-sm);
}

.info-card h3 {
    margin-bottom: 0.45rem;
    font-size: 1.05rem;
    color: var(--primary-dark);
}

.info-card p {
    font-size: 0.95rem;
    color: var(--muted);
}

/* =========================================================
   10) FOOTER
========================================================= */
.footer {
    margin-top: 4rem;
    color: white;
    background: linear-gradient(180deg, #a68cb1 0%, #8e719e 100%);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.15fr 0.9fr 1fr;
    gap: 2rem;
    padding: 2.8rem 0;
}

.footer-brand h3,
.footer-column h4 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.footer-brand p,
.footer-column li,
.footer-column a,
.footer-contact p {
    font-size: 0.96rem;
    color: rgba(255, 255, 255, 0.88);
}

.footer-brand-text {
    margin-top: 0.8rem;
}

.footer-column ul {
    display: grid;
    gap: 0.55rem;
    list-style: none;
}

.footer-contact {
    display: grid;
    gap: 0.7rem;
}

.footer-bottom {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.82);
}

/* =========================================================
   11) PAGE HERO / INNER PAGES
========================================================= */
.page-hero {
    padding: 4rem 0 2.5rem;
}

.page-hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
    align-items: center;
}

.page-hero-copy h1 {
    margin-bottom: 1rem;
    font-size: clamp(2.5rem, 5vw, 4.3rem);
    line-height: 1.05;
    color: var(--primary-dark);
}

.page-hero-copy p {
    max-width: 60ch;
    font-size: 1.05rem;
    color: var(--muted);
}

.page-hero-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: linear-gradient(145deg, #ffffff 0%, #fbf7fd 100%);
    box-shadow: var(--shadow);
}

.page-hero-image {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 4 / 3;
}

.page-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Simple page hero ---------- */
.page-hero-simple {
    padding: 5rem 0 3rem;
}

.page-hero-simple-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.page-hero-simple-inner h1 {
    margin-bottom: 0.5rem;
}

.page-hero-simple-inner p {
    max-width: 58ch;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--muted);
}

/* =========================================================
   12) CURRICULUM / PROGRAM PAGES
========================================================= */
.curriculum-grid,
.highlight-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.major-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.structure-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.structure-card {
    min-height: 100%;
}

.curriculum-card {
    padding: 1.4rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

.curriculum-card h3 {
    margin: 0.75rem 0 0.6rem;
    font-size: 1.15rem;
    color: var(--primary-dark);
}

.curriculum-card p {
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ---------- Study cards ---------- */
.study-grid {
    margin-top: 0.5rem;
}

.study-card {
    position: relative;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.study-card::before {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-bottom: 1rem;
    border-radius: 999px;
}

.study-card-1::before {
    background: #7f5d8d;
}

.study-card-2::before {
    background: #9d87a6;
}

.study-card-3::before {
    background: #c4b2cb;
}

.study-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.study-card h3 {
    margin-bottom: 0.7rem;
}

/* ---------- Quick highlight ---------- */
.quick-highlight {
    padding: 3rem 0;
}

.quick-highlight-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 2rem 2.2rem;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: linear-gradient(135deg, #f6f1f9, #efe7f4);
}

.quick-text h2 {
    margin-bottom: 0.4rem;
    font-size: 1.6rem;
    color: var(--primary-dark);
}

.quick-text p {
    font-size: 0.95rem;
    color: var(--muted);
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 0.8rem 1.3rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: white;
    font-weight: 600;
    transition: 0.2s ease;
}

.quick-btn.primary {
    border: none;
    background: var(--primary-dark);
    color: white;
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.advisor-box-compact {
    padding: 1.4rem;
}

/* =========================================================
   13) PEOPLE PAGE
========================================================= */
.people-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.people-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: 0.2s ease;
}

.people-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.people-card img {
    width: 100%;
    aspect-ratio: 4 / 4.3;
    object-fit: cover;
}

.people-body {
    padding: 1rem;
}

.name-th {
    margin-bottom: 0.2rem;
    font-size: 1rem;
    line-height: 1.45;
    color: var(--primary-dark);
}

.name-en {
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--muted);
}

.people-body p {
    margin-bottom: 0.35rem;
    font-size: 0.83rem;
    line-height: 1.55;
    color: var(--muted);
}

.people-body p strong {
    color: var(--primary-dark);
}

/* =========================================================
   14) ACTIVITY GALLERY
========================================================= */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.activity-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
}

.activity-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: 0.4s ease;
}

.activity-item:hover img {
    transform: scale(1.1);
}

.activity-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.activity-overlay h3 {
    font-size: 0.85rem;
    font-weight: 500;
}

/* =========================================================
   15) ACTIVITY HUB / AWARDS & ACTIVITIES
========================================================= */
.activity-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.activity-hub-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.activity-hub-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.activity-hub-media {
    display: block;
    overflow: hidden;
}

.activity-hub-media img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.activity-hub-card:hover .activity-hub-media img {
    transform: scale(1.06);
}

.activity-hub-body {
    padding: 1.15rem 1.2rem 1.25rem;
}

.activity-hub-body h2 {
    margin-bottom: 0.55rem;
    font-size: 1.3rem;
    line-height: 1.3;
    color: var(--primary-dark);
}

.activity-hub-body p {
    margin-bottom: 0.9rem;
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ---------- Awards & Activities cards ---------- */
.awards-activities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.awards-activities-item {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.awards-activities-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.awards-activities-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.awards-activities-item p {
    overflow: hidden;
    min-height: 72px;
    max-height: 72px;
    padding: 12px 12px 8px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--muted);
}

.awards-activities-button {
    padding: 0 12px 12px;
}

.awards-activities-button a {
    display: block;
}

.button-awards-activities {
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 12px;
    background: var(--primary-dark);
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}

.button-awards-activities:hover {
    opacity: 0.92;
}

.login-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.login-card h1 {
    color: #5c3d66;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: #777;
    margin-bottom: 1.5rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.2rem;
}

.form-group label {
    font-size: 0.9rem;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-top: 5px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    border: none;
    background: #7f5d8d;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-login:hover {
    background: #6a4b75;
}


/* =========================================================
   16) RESPONSIVE
========================================================= */
@media (max-width: 1100px) {

    .news-grid,
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .activity-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .awards-activities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 980px) {
    .nav-toggle {
        display: block;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-top {
        width: 100%;
        justify-content: space-between;
    }

    .site-nav {
        display: none;
        width: 100%;
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding-top: 0.8rem;
    }

    .site-nav a {
        display: block;
        border-radius: 16px;
        background: #faf7fc;
    }

    .hero-grid,
    .why-grid,
    .footer-main,
    .page-hero-grid,
    .curriculum-grid,
    .highlight-list-grid,
    .structure-grid,
    .major-grid-3 {
        grid-template-columns: 1fr;
    }

    .people-grid {
        grid-template-columns: repeat(2, 1fr);
    }



    .hero {
        padding-top: 2.5rem;
    }

    .hero h2 {
        max-width: 100%;
    }

    .floating-note {
        position: static;
        max-width: 100%;
        margin-top: 1rem;
    }
}


.activity-detail-layout {
    max-width: 980px;
}

.activity-detail-main {
    display: grid;
    gap: 1.5rem;
}

.activity-detail-cover {
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.activity-detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.activity-detail-content {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 1.4rem;
    box-shadow: var(--shadow-sm);
}

.activity-detail-content p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.activity-detail-content p:last-child {
    margin-bottom: 0;
}

.activity-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.activity-gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease;
}

.activity-gallery img:hover {
    transform: scale(1.03);
}

.activity-detail-actions {
    display: flex;
    justify-content: flex-start;
}



.student-support-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
}

.support-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.support-card-header {
    padding: 1.1rem 1.2rem 0.8rem;
    border-bottom: 1px solid rgba(127, 93, 141, 0.08);
}

.support-card-header h2 {
    font-size: 1.12rem;
    line-height: 1.45;
    color: var(--primary-dark);
}

.support-card-body {
    padding: 1rem 1.2rem 1.2rem;
}

.support-card-body h3 {
    font-size: 0.95rem;
    color: var(--primary-dark);
    margin-bottom: 0.6rem;
}

.support-card-body ul {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
    color: var(--muted);
}

.support-card-body li {
    margin-bottom: 0.45rem;
    line-height: 1.65;
}

.support-card-actions {
    margin-top: 0.8rem;
}

.support-note {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.support-note a {
    color: var(--primary-dark);
    font-weight: 500;
}

/* TIMELINE */
.timeline {
    position: relative;
    margin-top: 2rem;
    padding-left: 20px;
    border-left: 2px solid var(--border);
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
}

.timeline-year {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.3rem;
}

.timeline-content h3 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.timeline-content p {
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .student-support-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .activity-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .activity-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .activity-hub-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .quick-highlight-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .activity-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .container {
        width: min(var(--container), calc(100% - 1rem));
    }

    .brand-mark {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .brand-text h1 {
        font-size: 1rem;
    }

    .brand-text p {
        font-size: 0.8rem;
    }

    .hero {
        padding: 2rem 0 1.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-values,
    .news-grid,
    .testimonial-grid,
    .awards-activities-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        padding: 0.8rem;
        border-radius: 24px;
    }

    .hero-image {
        border-radius: 18px;
        aspect-ratio: 4 / 5;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

.course-meta {
    margin: 10px 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-item {
    display: inline-block;
    position: static;
    /* 🔥 สำคัญ */
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--primary-dark);
    font-weight: 500;
}

#backToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: none;
    transition: 0.25s ease;
    z-index: 999;
}

#backToTop:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .people-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}