/* --- ส่วนที่ 1: หน้าปก Hero (รูปแรก) --- */
#hero {
    height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(120, 220, 120, 0.4) 100%),
                url('https://www2.rihes.cmu.ac.th/nutri/assets/img/nutri_bg.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
}

#hero-text { text-align: center; }
#hero-text h1 {
    font-size: 6rem;
    font-weight: 900;
    color: #4CAF50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
#hero-text p {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
}

#scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
}
#scroll-down a {
    color: rgba(0, 0, 0, 0.6);
    transition: color 0.3s;
}
#scroll-down a:hover { color: #000; }

/* --- ส่วนที่ 2: Navbar (เมนู) --- */
.navbar {
    background-color: transparent !important;
    transition: background-color 0.4s ease-out;
}
.navbar .nav-link,
.navbar .navbar-brand {
     color: #000 !important;
}
.navbar .bi-search { color: #000 !important; }

.navbar.scrolled {
    background-color: #000000 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.navbar.scrolled .nav-link,
.navbar.scrolled .navbar-brand,
.navbar.scrolled .bi-search {
    color: #53bf6e !important;
}

/* --- ส่วนที่ 3: เนื้อหา (รูปที่ 2) --- */
#main-content {
    /* ... */
}

/* สไตล์กล่องสีเขียว (แบบ Accordion) */
.info-box {
    background-color: #4CAF50; /* สีเขียว */
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 1rem; /* ขอบโค้งมน */
    text-align: center;
    height: 100%; /* ทำให้กล่องสูงเท่ากัน */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* จัดเนื้อหาให้เต็มความสูง */
    transition: transform 0.3s;
}
.info-box:hover {
     transform: translateY(-10px);
}

.info-box .icon-top {
    font-size: 3.5rem; /* ไอคอนด้านบน */
    line-height: 1;
    color: #212529; /* สีไอคอนด้านบน (สีดำ) */
}

.info-box h3 {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 1.5rem 0;
}

/* สไตล์ปุ่มลูกศร */
.arrow-btn {
    background-color: rgba(0, 0, 0, 0.5); /* สีปุ่ม (ดำโปร่งแสง) */
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    margin: 0 auto; /* ทำให้ปุ่มอยู่ตรงกลาง */
}

.arrow-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

/* สไตล์ส่วนเนื้อหา (ปุ่มสีดำ) */
.content-links {
    padding: 1.5rem 0;
    text-align: center;
}

.btn-dark-pill {
    background-color: #212529; /* สีดำ */
    color: #ffffff;
    border-radius: 50rem; /* ทรงแคปซูล */
    padding: 0.6rem 1.25rem 0.6rem 1rem;
    margin: 0.3rem 0.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-dark-pill:hover {
    background-color: #444;
    color: #ffffff;
}

/* ไอคอนลูกศรขวาในปุ่ม */
.btn-dark-pill i {
    font-size: 1.25rem;
    margin-right: 0.5rem;
    color: #4CAF50; /* สีเขียว */
}

/* 1. ประกาศชื่อฟอนต์และระบุที่อยู่ไฟล์ */
@font-face {
    font-family: 'CMU-Regular';            /* ตั้งชื่อฟอนต์สำหรับเรียกใช้ */
    src: url('assets/fonts/CMU-Regular.woff2') format('woff2'); /* ระบุ Path ไฟล์ */
    font-weight: normal;                   /* กำหนดว่าเป็นตัวปกติ */
    font-style: normal;
    font-display: swap;                    /* ให้แสดง Text ก่อนระหว่างรอฟอนต์โหลด */
}

/* 2. กำหนดให้ใช้ฟอนต์นี้ทั้งเว็บไซต์ */
:root {
    /* ถ้าใช้ Bootstrap 5.3 แนะนำให้แก้ที่ Variable นี้ด้วย */
    --bs-body-font-family: 'CMU-Regular', sans-serif;
    --bs-font-sans-serif: 'CMU-Regular', sans-serif;
}

body {
    /* บังคับใช้กับ Body */
    font-family: 'CMU-Regular', sans-serif; 
}

/* (ทางเลือกเสริม) เพื่อความชัวร์ ให้ปุ่มและ input ใช้ด้วย */
h1, h2, h3, h4, h5, h6, .btn, input, textarea, select {
    font-family: 'CMU-Regular', sans-serif; 
}