/* style.css - ฉบับ Royal Navy & Gold Theme + Smooth Fade */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;700&display=swap');

:root {
    --main-color: #0d253f;     /* สีกรมท่าเข้ม */
    --second-color: #1a4b7c;   /* สีน้ำเงินรอง */
    --gold-color: #c5a059;     /* สีทอง */
    --bg-body: #f4f6f9;        /* สีพื้นหลัง */
    --text-color: #333;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Sarabun', sans-serif !important;
    background-color: var(--bg-body);
    color: var(--text-color);
    
    /* --- [สำคัญ] ตั้งค่า Fade In/Out --- */
    opacity: 0; 
    transition: opacity 0.5s ease-in-out;
}

/* Class สำหรับสั่งให้แสดงผลเมื่อโหลดเสร็จ */
body.loaded {
    opacity: 1;
}

/* Navbar */
.bg-custom {
    background: var(--main-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.navbar-brand { font-weight: bold; color: white !important; }

/* ปุ่ม Back ใน Navbar */
.btn-nav-back {
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 30px;
    padding: 8px 20px;
    text-decoration: none;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
}
.btn-nav-back:hover {
    background: var(--gold-color);
    color: white;
    transform: translateX(-3px);
}

/* การ์ดเนื้อหา */
.content-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    border-top: 5px solid var(--gold-color);
    margin-bottom: 30px;
}

.page-header {
    background: linear-gradient(135deg, var(--main-color), var(--second-color));
    color: white;
    padding: 40px 20px;
    text-align: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: -30px;
    position: relative;
    z-index: 1;
}

/* ปุ่มลอยกลับหน้าหลัก */
.float-home-btn {
    position: fixed; bottom: 30px; right: 30px;
    width: 60px; height: 60px;
    background-color: var(--main-color);
    color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1040; text-decoration: none; transition: 0.3s; font-size: 24px;
}
.float-home-btn:hover {
    background-color: var(--gold-color);
    color: white;
    transform: scale(1.1);
}

/* รูปภาพ */
.img-rounded-shadow {
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}