/* Header ================================================================================================== */
.top-banner {
    /* ใส่รูปพื้นหลัง */
    background-image: url('../images/bg_header.png'); /* เปลี่ยน path รูปตามจริง */
    background-size: cover;      /* ให้รูปเต็มพื้นที่ */
    background-position: center; /* จัดกึ่งกลางรูป */
    background-repeat: no-repeat;
    
    position: relative;          /* เพื่อให้ Overlay อ้างอิงตำแหน่งได้ */
		padding: 2rem 0;
    color: white;                /* บังคับตัวหนังสือเป็นสีขาวให้เด่น */
}

/* สร้าง Overlay สีดำจางๆ ทับรูป */
.top-banner::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* สีดำโปร่งแสง 50% (ปรับแก้ได้) */
    z-index: 1;
}

/* ดึงเนื้อหาขึ้นมาอยู่เหนือ Overlay */
.top-banner .container {
    position: relative;
    z-index: 2; 
}

/* Content ================================================================================================== */
a {
		text-decoration: none;
	}

body {
	font-family: "Noto Sans Thai", sans-serif;
	background:#f6f7fa;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
}

.content { flex: 1; }

/* ตัวอย่าง: ปรับแต่งการ์ดให้มุมมนกว่าเดิม */
.card {
	border-radius: 15px;
	border: none; /* เอาเส้นขอบออก */
}

/* ตัวอย่าง: คลาสสำหรับข้อความของนายท่านโดยเฉพาะ */
.text-master {
	color: #ff6b6b;
	font-weight: bold;
}

.main-content {
	min-height: 80vh; /* ดัน Footer ให้ลงไปข้างล่าง */
	padding: 2rem 0;
}

/* แถม: ทำให้หัวข้อดูหนาและสวยขึ้น */
h1, h2, h3, h4, h5, h6 {
		font-weight: 600;
}

.bg-theme {
    /* สีม่วงไล่เฉดแบบเดียวกับ Header */
    background: linear-gradient(135deg, #667eea 0%, #b15ea6 100%); 
    color: white; /* บังคับตัวหนังสือสีขาวเสมอ */
}

/* เมื่อหน้าจอเล็กกว่า 768px (มือถือ/แท็บเล็ตแนวตั้ง) */
@media screen and (max-width: 768px) {
    .mobile-card-table,
    .mobile-card-table tbody {
        display: block;
        width: 100%;
    }

    /* 1. ซ่อนหัวตารางไปเลย */
    .mobile-card-table thead {
        display: none;
    }

    /* 2. เปลี่ยนแถว (tr) ให้เป็นกล่องการ์ด */
    .mobile-card-table tbody tr {
        display: block;
				width: 100%;
        margin-bottom: 0.5rem;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        padding: 10px;
    }

    /* 3. เปลี่ยนช่อง (td) ให้เรียงลงมา และจัดให้อยู่คนละฝั่ง */
    .mobile-card-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        border-bottom: 1px solid #eee;
        padding: 8px 0;
        text-align: right; /* จัด content ชิดขวา */
    }

    .mobile-card-table tbody td:last-child {
        border-bottom: none;
    }

    /* 4. ทีเด็ด! ดึงชื่อหัวข้อมาโชว์ด้านซ้าย ด้วย attribute data-label */
    .mobile-card-table tbody td::before {
        content: attr(data-label); /* ดึงค่าจาก HTML มาแสดง */
        font-weight: bold;
        color: #6c757d;
        text-align: left;
        margin-right: 15px;
        flex-shrink: 0; /* ห้ามหด */
    }

    /* จัดการช่อง input ให้ไม่ล้น */
    .mobile-card-table .input-group,
    .mobile-card-table input.form-control {
        max-width: 60%; /* ให้ input กินที่แค่ 60% ของบรรทัด */
    }
}