/* ============================================================
   About Us Landing Page — MU-SH Faculty
   Design System: Modern Blue Education Theme
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
    --color-primary: #0035AD;
    --color-primary-light: #3B82F6;
    --color-primary-dark: #001d6e;
    --color-accent: #60A5FA;
    --color-accent-light: #93C5FD;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F0F4FF;
    --color-bg-section: #F8FAFC;
    --color-text: #1E293B;
    --color-text-light: #64748B;
    --color-text-muted: #94A3B8;
    --color-border: #E2E8F0;
    --color-gold: #D4A843;
    --color-gold-light: #F5E6C8;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 4px 24px rgba(0, 53, 173, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 53, 173, 0.12);
    --shadow-card: 0 2px 16px rgba(0, 53, 173, 0.06);
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font-heading: 'Prompt', sans-serif;
    --font-body: 'Sarabun', sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

/* ---------- Language Toggle (Top Bar) ---------- */
.lang-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 53, 173, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.lang-bar-home {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: 6px 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.lang-bar-home:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.lang-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 3px;
}

.lang-toggle a {
    padding: 6px 16px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    letter-spacing: 0.03em;
}

.lang-toggle a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.lang-toggle a.active {
    background: #fff;
    color: var(--color-primary);
    font-weight: 600;
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://sh.mahidol.ac.th/sh-mu/img/shh.png') center center / cover no-repeat;
    padding-top: 52px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 29, 110, 0.92) 0%, rgba(0, 53, 173, 0.85) 40%, rgba(59, 130, 246, 0.75) 100%);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--color-bg) 0%, transparent 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 0 24px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-accent-light);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 24px;
    border-radius: 50px;
    margin-bottom: 28px;
    letter-spacing: 0.05em;
}

.hero h1 {
    color: #fff;
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 48px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.hero-scroll {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: var(--transition);
    animation: float 3s ease-in-out infinite;
}

.hero-scroll:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* ---------- Decorative Particles ---------- */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: drift linear infinite;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-duration: 12s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-duration: 15s;
    width: 8px;
    height: 8px;
}

.particle:nth-child(3) {
    top: 30%;
    left: 50%;
    animation-duration: 10s;
}

.particle:nth-child(4) {
    top: 80%;
    left: 20%;
    animation-duration: 18s;
    width: 5px;
    height: 5px;
}

.particle:nth-child(5) {
    top: 10%;
    left: 70%;
    animation-duration: 14s;
    width: 7px;
    height: 7px;
}

.particle:nth-child(6) {
    top: 50%;
    left: 35%;
    animation-duration: 16s;
    width: 3px;
    height: 3px;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(80px, -120px) rotate(360deg);
        opacity: 0;
    }
}

/* ---------- Section Headers ---------- */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    position: relative;
    padding: 0 20px;
}

.section-label::before,
.section-label::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 2px;
    background: var(--color-accent-light);
    border-radius: 1px;
}

.section-label::before {
    right: 100%;
}

.section-label::after {
    left: 100%;
}

.section-header h2 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 650px;
    margin: 0 auto;
}

/* ---------- History Section ---------- */
.history-section {
    background: var(--color-bg);
    position: relative;
}

.history-intro {
    max-width: 900px;
    margin: 0 auto 64px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.history-intro-img {
    flex: 0 0 360px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.history-intro-img img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.history-intro-img::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 53, 173, 0.1);
    pointer-events: none;
}

.history-intro-text {
    flex: 1;
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 1.9;
    text-align: justify;
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 28px;
    width: 3px;
    background: linear-gradient(to bottom, var(--color-primary-light), var(--color-accent-light), var(--color-primary-light));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding: 0 0 48px 76px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 17px;
    top: 4px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 3px solid var(--color-primary-light);
    z-index: 2;
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    background: var(--color-primary-light);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.2);
}

.timeline-year {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.timeline-content {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 24px 28px;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.timeline-content:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow);
    transform: translateX(6px);
}

.timeline-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.75;
}

/* ---------- Departments Section ---------- */
.departments-section {
    background: var(--color-bg-alt);
    position: relative;
}

.departments-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent-light), transparent);
}

.dept-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.dept-card {
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 36px 32px;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.dept-card:hover::before {
    transform: scaleX(1);
}

.dept-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-4px);
}

.dept-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.dept-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--color-primary-light);
    flex-shrink: 0;
    transition: var(--transition);
}

.dept-card:hover .dept-icon {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
}

.dept-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
}

.dept-card>p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.75;
    margin-bottom: 20px;
}

.dept-programs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dept-programs .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid;
}

.badge-phd {
    background: rgba(107, 33, 168, 0.08);
    color: #6B21A8;
    border-color: rgba(107, 33, 168, 0.2);
}

.badge-master {
    background: rgba(0, 53, 173, 0.06);
    color: var(--color-primary);
    border-color: rgba(0, 53, 173, 0.15);
}

.badge-bachelor {
    background: rgba(5, 150, 105, 0.06);
    color: #059669;
    border-color: rgba(5, 150, 105, 0.15);
}

.badge-intl {
    background: rgba(212, 168, 67, 0.08);
    color: #B8860B;
    border-color: rgba(212, 168, 67, 0.2);
}

.dept-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dept-tags span {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
}

.dept-card:hover .dept-tags span {
    background: rgba(59, 130, 246, 0.08);
    color: var(--color-primary-light);
}

/* ---------- Offices Section ---------- */
.offices-section {
    background: var(--color-bg);
}

.office-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.office-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: var(--transition);
    position: relative;
}

.office-card:hover {
    box-shadow: var(--shadow);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-4px);
}

.office-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--color-primary-light);
    margin-bottom: 20px;
    transition: var(--transition);
}

.office-card:hover .office-icon {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
}

.office-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
    line-height: 1.4;
}

.office-card>p {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.office-list {
    list-style: none;
}

.office-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--color-text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.office-list li:last-child {
    border-bottom: none;
}

.office-list li i {
    color: var(--color-primary-light);
    margin-top: 3px;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ---------- Summary Section ---------- */
.summary-section {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.summary-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    top: -200px;
    right: -100px;
}

.summary-content {
    position: relative;
    z-index: 1;
}

.summary-grid {
    display: flex;
    justify-content: center;
    gap: 64px;
    flex-wrap: wrap;
}

.summary-item {
    text-align: center;
}

.summary-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 8px;
}

.summary-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--color-bg-section);
    border-top: 1px solid var(--color-border);
    padding: 48px 0 36px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-brand {
    flex: 1;
    min-width: 280px;
}

.footer-brand h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--color-text-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-links a i {
    color: var(--color-primary-light);
    font-size: 0.85rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-1 {
    transition-delay: 0.1s;
}

.animate-on-scroll.delay-2 {
    transition-delay: 0.2s;
}

.animate-on-scroll.delay-3 {
    transition-delay: 0.3s;
}

.animate-on-scroll.delay-4 {
    transition-delay: 0.4s;
}

.animate-on-scroll.delay-5 {
    transition-delay: 0.5s;
}

/* Slide from left */
.animate-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-slide-left.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.animate-slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-slide-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Scale in */
.animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scale.animated {
    opacity: 1;
    transform: scale(1);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .dept-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .office-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.6rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 64px 0;
    }

    .hero {
        min-height: 85vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-sub {
        font-size: 1.05rem;
    }

    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
    }

    .hero-stat-num {
        font-size: 2rem;
    }

    .dept-grid {
        grid-template-columns: 1fr;
    }

    .history-intro {
        flex-direction: column;
    }

    .history-intro-img {
        flex: none;
        width: 100%;
    }

    .history-intro-img img {
        height: 200px;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

    .summary-grid {
        gap: 32px;
    }

    .summary-num {
        font-size: 2.5rem;
    }

    .lang-bar-brand span {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .timeline::before {
        left: 18px;
    }

    .timeline-item {
        padding-left: 56px;
    }

    .timeline-dot {
        left: 7px;
        width: 22px;
        height: 22px;
    }

    .dept-card {
        padding: 28px 20px;
    }

    .office-card {
        padding: 28px 20px;
    }

    .container {
        padding: 0 16px;
    }
}