@import url('https://db.onlinewebfonts.com/c/0fa16dd95fdb8650629c1e6a73e0b506?family=LINE+Seed+Sans+TH');

:root {
    /* CMU Modern Color Palette (Light Purple & Gold) */
    --clr-navy: #2c2c2c;       /* เทาเข้ม (ไม่ดำสนิท) */
    --clr-navy-light: #4a4a4a; /* เทากลาง */
    --clr-navy-dark: #1a1a1a;  /* เทาเข้มมาก */
    --clr-gold: #D4AF37;       /* CMU Gold */
    --clr-gold-light: rgba(212, 175, 55, 0.15); /* Light gold bg */
    --clr-gold-dark: #B08D1E;  /* Darker gold for hovers */

    /* Accent colors (more muted, sophisticated) */
    --clr-accent-1: #5a5a5a;   /* เทาอ่อน */
    --clr-accent-2: #F2EAFC;   /* Very light soft purple */

    /* Backgrounds */
    --bg-primary: #FCFAFF;     /* Off-white with purple tint */
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-dark: rgba(250, 245, 255, 0.85);

    /* Borders */
    --border-glass: rgba(106, 43, 145, 0.08);

    /* Shadows (soft, diffuse, elegant) */
    --shadow-glass: 0 10px 40px rgba(70, 40, 90, 0.06);
    --shadow-glow-gold: 0 0 20px rgba(212, 175, 55, 0.25);

    /* Typography */
    --font-heading: "LINE Seed Sans TH", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: "LINE Seed Sans TH", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-size: 1.6rem; /* เพิ่ม 1 ไวส์ จาก 1.45rem */
    font-weight: 600; /* ตรงกับ nav tabs */
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: #3a3a3a; /* เทาเข้มแทนดำสนิท เพื่อให้อ่านสบายกว่า */
    line-height: 1.5;
    letter-spacing: -0.022em;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

h1,
h2 {
    font-family: var(--font-heading);
    color: var(--clr-navy); /* #2c2c2c */
    /* ป้องกัน webkit bug: transparent fill จาก child span ทำให้ text อื่นๆ ใน h2 หายไป */
    -webkit-text-fill-color: var(--clr-navy);
    font-weight: 700;
}

h3,
h4 {
    font-family: var(--font-heading);
    color: var(--clr-navy);
    -webkit-text-fill-color: var(--clr-navy);
    font-weight: 600;
}

h5,
h6 {
    font-family: var(--font-heading);
    color: var(--clr-navy-light); /* #4a4a4a */
    -webkit-text-fill-color: var(--clr-navy-light);
    font-weight: 500;
}

/* Dynamic Ambient Background */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #FDFBFF 0%, #F5F0FA 100%);
}

.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    animation: float 30s infinite ease-in-out alternate;
    opacity: 0.6;
}

.blob-1 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(142, 68, 173, 0.18), transparent);
    top: -10vw;
    left: -10vw;
    animation-delay: 0s;
}

.blob-2 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent);
    bottom: -20vw;
    right: -10vw;
    animation-duration: 25s;
    animation-delay: -5s;
}

.blob-3 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(106, 43, 145, 0.12), transparent);
    top: 30%;
    left: 40%;
    animation-duration: 30s;
    opacity: 0.7;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(50px, 30px) scale(1.1);
    }

    100% {
        transform: translate(-30px, 60px) scale(0.9);
    }
}

/* Glassmorphism Utilities */
.glass {
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--border-glass);
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    padding: 2.5rem;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

/* Gradients (More vibrant) */
.text-gradient-navy {
    background: linear-gradient(90deg, #2b1055 0%, #752273 35%, #b9426c 70%, #f08253 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
    /* ไล่สีเหลืองทอง → ทองสว่าง → ทองส้มนิดๆ ดูมีมิติ */
    background: linear-gradient(135deg, #B08D1E 0%, #D4AF37 40%, #F0D060 70%, #C8960C 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    color: var(--clr-navy);
    padding: 0.6rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 96%;
    max-width: 85rem;
    border-radius: 100px;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    gap: 2.5rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 65px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(107, 82, 163, 0.2));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand-logo:hover {
    transform: scale(1.1) rotate(-3deg);
}

.brand-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 800; /* หนาที่สุด (ชื่อศูนย์) */
    font-size: 1.2rem;
    color: var(--clr-navy);
    line-height: 1.2;
    max-width: 40rem;
    min-width: 250px;
}

.brand-subtitle {
    display: block;
    font-size: 0.8rem;
    color: var(--clr-gold-dark);
    font-weight: 400;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-item, .nav-item span, .dropdown-content a {
    text-decoration: none;
    color: var(--clr-navy) !important;
    font-family: var(--font-body) !important;
    font-weight: 600 !important; /* เปลี่ยนให้หนาขึ้นเพื่ออ่านง่าย */
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
    transition: color 0.3s ease;
    cursor: pointer;
    -webkit-text-stroke: 0;
}

/* Dropdown CSS */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background-color: var(--bg-glass);
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 10px;
    padding: 0.5rem 0;
}

.dropdown-content a {
    color: var(--clr-navy) !important;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background 0.3s;
    font-family: var(--font-body) !important;
    font-size: 1.1rem;
    font-weight: 600 !important; /* บังคับให้หนาเพื่อผู้สูงอายุ */
    -webkit-text-stroke: 0 !important; /* ล้างสโตรกออกสำหรับเมนู */
}

.dropdown-content a:hover {
    background-color: var(--clr-gold-light);
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    margin-top: 5px;
}

.dropdown:hover .nav-item {
    color: var(--clr-navy) !important;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--clr-navy);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--clr-navy);
}

.nav-item.active::after,
.nav-item:hover::after {
    width: 100%;
}

/* Main Content Views */
.main-content {
    padding-top: 120px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80vh;
    padding-left: 1rem;
    padding-right: 1rem;
}

.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    padding: 2rem 0;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideUpFade 0.6s ease forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 0.8rem;
}

.section-header p {
    font-size: 1.35rem;
    color: #4a4a4a; /* เทากลาง อ่านง่าย */
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 980px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--clr-gold);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
    background: var(--clr-gold-dark);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--clr-navy);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: white;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 15px rgba(70, 40, 90, 0.08);
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4rem 0;
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 auto 1.5rem;
    max-width: 900px;
    /* ไม่ใส่ gradient ที่ h1 ตรงๆ เพราะทำให้ text node ที่ไม่มี background หายไป */
    /* gradient จะทำงานผ่าน child span.text-gradient-gold / .text-gradient-navy */
}

.hero-subtitle {
    font-size: 1.35rem;
    color: #4a4a4a; /* เทากลาง */
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 5rem;
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Members Section */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--clr-accent-2), #EAE0F5);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(70, 40, 90, 0.08);
}

.member-card {
    text-align: center;
    padding: 1.5rem !important;
}

.member-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.member-card .role {
    color: var(--clr-gold-dark);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.member-card .expertise {
    font-size: 1rem;
    color: #5a5a5a; /* เทาอ่อน สำหรับรายละเอียดรอง */
    font-weight: 500;
}

/* Achievements Timeline */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.timeline-date {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.5rem;
    min-width: 100px;
    color: var(--clr-accent-1);
}

.timeline-content h3 {
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 400;
}

/* Activities Grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.activity-card {
    padding: 0;
    overflow: hidden;
}

.activity-image {
    height: 200px;
    background: linear-gradient(45deg, #F2EAFC, #EAE0F5);
    width: 100%;
}

.activity-info {
    padding: 2rem;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 980px;
    font-size: 0.75rem;
    font-weight: 400;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.gold-badge {
    background: var(--clr-gold-light);
    color: var(--clr-gold-dark);
}

.navy-badge {
    background: #F1EAFA;
    color: var(--clr-navy);
}

.light-badge {
    background: white;
    color: var(--clr-accent-1);
    border: 1px solid var(--border-glass);
}

.activity-info h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.3;
}

.activity-info .date {
    font-size: 1rem;
    color: #3a3a3a; /* เทาเข้ม สำหรับวันที่ */
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    display: flex;
    justify-content: center;
    padding: 2rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.footer-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border-radius: 50px;
    padding: 1.5rem 3rem;
    text-align: center;
    border: 1px solid var(--border-glass);
}

.footer-subtext {
    font-size: 1rem;
    color: #5a5a5a; /* เทาอ่อน footer */
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Responsive Navbar for iPad and Mobile */
@media (max-width: 1024px) {
    .navbar {
        border-radius: 30px;
    }
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1.2rem;
        gap: 1rem;
    }
    .logo-area {
        justify-content: flex-start;
        flex: 1;
        width: auto;
        padding: 0;
    }
    .mobile-menu-btn {
        display: flex;
        order: 2; /* Ensure it stays on the right */
    }
    .brand-logo {
        width: 38px;
    }
    .brand-title {
        min-width: 0;
        font-weight: 700;
        font-size: 0.75rem;
        line-height: 1.2;
        text-align: left;
        max-width: 200px;
    }
    .nav-links {
        display: none; /* Hidden by default, toggled via JS */
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        padding-top: 1rem;
        padding-bottom: 0.5rem;
        border-top: 1px solid var(--border-glass);
        margin-top: 1rem;
    }
    .nav-links.show {
        display: flex;
        animation: slideDownMenu 0.3s ease forwards;
    }
    @keyframes slideDownMenu {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .nav-item {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }
    .navbar.menu-open .brand-text {
        display: none !important;
    }
    .main-content {
        padding-top: 160px;
    }
}

/* Responsive (Mobile Only) */
@media (max-width: 768px) {
    .nav-links {
        gap: 0.8rem; /* Make tabs tighter on small screens */
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline-date {
        font-size: 1.2rem;
    }
}

/* text-gradient fix */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
}

/* Slider */
.slider-container {
    position: relative;
    width: 100%;
    min-height: 550px;
    border-radius: 32px;
    overflow: hidden;
    margin-bottom: 3rem;
    background: transparent;
}

.slider {
    width: 100%;
    min-height: 550px;
    position: relative;
}

/* Non-active slides: hidden absolutely, ไม่กินพื้นที่ */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: transparent;
    background-position: center;
    z-index: 1;
    will-change: opacity, visibility;
    transform: translateZ(0);
}

/* Active slide: เปลี่ยนเป็น relative เพื่อให้การ์ดขยายตามเนื้อหา */
.slide.active-slide {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
    height: auto;
    min-height: 550px;
}

/* Placeholder backgrounds for slider */
.slide-1 {
    background: transparent;
}

.slide-2 {
    background: transparent;
}

.slide-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--clr-navy);
    width: 100%;
    /* ใช้ height: auto + min-height แทน height: 100% เพื่อให้การ์ดขยายตามเนื้อหา */
    height: auto;
    min-height: min(80%, 500px);
    max-width: 900px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    padding: 2.5rem !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    animation: slideContentUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transform: translateY(30px);
    opacity: 0;
    will-change: transform, opacity;
}

.slide-content img {
    max-height: 350px;
    object-fit: contain;
    width: auto !important;
}



.slide.active-slide .slide-content {
    animation-delay: 0.4s;
}

@keyframes slideContentUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    /* gradient ม่วง → ชมพู → ส้ม */
    background: linear-gradient(90deg, #2b1055 0%, #752273 35%, #b9426c 70%, #f08253 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-quote {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.slide-author {
    font-size: 1.1rem;
    color: var(--clr-accent-1);
    font-weight: 400;
}

/* Award Layout within Slide */
.award-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    text-align: left;
    max-width: 1000px;
}

.award-image-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.award-image {
    width: 100%;
    max-width: 380px;
    height: auto; /* Allow auto height for apple style */
    object-fit: cover;
    object-position: top center;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.award-text-container {
    flex: 1;
}

.award-hashtag {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.award-date {
    font-size: 1.3rem;
    color: var(--clr-accent-1);
    margin-top: 0.5rem;
}

.text-gradient-pink {
    background: linear-gradient(135deg, #FF6B9E 0%, #D84374 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    transform: translateY(-50%);
    z-index: 10;
}

.slider-btn {
    display: none !important;
}

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.dot {
    width: 30px;
    height: 4px;
    border-radius: 4px;
    background: rgba(45, 27, 54, 0.15);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.dot.active-dot {
    background: var(--clr-gold);
    width: 60px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

@media (max-width: 768px) {
    .award-layout {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .award-image-container {
        justify-content: center;
    }

    .award-image {
        max-width: 300px;
    }

    .award-text-container h2 {
        font-size: 2.2rem !important;
    }

    .award-hashtag {
        font-size: 1.2rem;
    }

    .slider-container {
        height: 75vh;
        min-height: 600px; /* เพิ่มความสูงให้การ์ดในมือถือ ไม่ให้ตัวอักษรและรูปภาพล้นกรอบ */
    }

    .slide {
        padding: 1rem;
        /* ให้ slide จัดตัวเองตามเนื้อหาบนมือถือ */
        align-items: center;
        justify-content: center;
    }

    .slide-content {
        padding: 2rem !important;
        height: auto;
        min-height: unset;
        justify-content: center;
    }

    .slide-content img {
        max-height: 200px;
    }

    .slide-title {
        font-size: 2.5rem;
    }

    .slide-quote {
        font-size: 1.2rem;
    }


    .hero-title {
        font-size: 2.8rem;
    }

    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timeline-date {
        font-size: 1.2rem;
    }

    /* --- Mobile Fixes สำหรับการ์ดและการตอบสนอง --- */
    .card {
        padding: 1.5rem !important; /* ลด padding จาก 2.5rem */
    }

    .card h4 {
        font-size: 1.15rem !important; /* ลดขนาดหัวข้อการ์ดบนมือถือ */
        word-wrap: break-word; /* ป้องกันคำยาวทะลุกรอบ */
    }

    /* ปรับแต่งส่วนรายละเอียดในการ์ด (DOI / Authors) ให้ยืดหยุ่นเต็มจอ */
    .card > div {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .card > div > div {
        width: 100%; /* ให้ช่องกล่องเนม DOI ฯลฯ กางสุด */
    }

    /* ลดขนาด Brand โลโก้ */
    .brand-title {
        font-size: 0.85rem !important;
        max-width: 200px;
    }

    .logo-area {
        gap: 0.5rem;
    }

    .brand-logo {
        width: 45px;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
        margin-top: 0.5rem;
        align-self: flex-start; /* ดันป้าย Q1 ให้อยู่ชิดซ้ายบนมือถือ */
    }

    /* จัดการลิงก์ DOI ไม่ให้ทะลุขอบ */
    p > span:has(a), a {
        word-break: break-all;
    }
}

p, span, li, a {
    font-weight: 600; /* ตรงกับ nav tabs */
}

/* gradient ทำงานเฉพาะผ่าน class เท่านั้น ไม่ใส่ global h1-h6 เพื่อป้องกัน text หายไป */

/* Desktop-only line break — ซ่อนบนมือถือ */
.desktop-br {
    display: block; /* แสดงบน desktop */
}
@media (max-width: 768px) {
    .desktop-br {
        display: none; /* ซ่อนบนมือถือ ปล่อยให้ wrap ตามความกว้างเอง */
    }
}

/* Book Cover Styling */
.book-cover {
    height: 250px;
    background: rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-glass);
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: 0.3s;
}

.book-cover:hover {
    filter: brightness(0.9);
}

.book-card-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.book-btn {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.book-btn-read {
    background: var(--clr-navy);
    color: white;
}

.book-btn-download {
    background: var(--clr-gold);
    color: white;
}

.book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

