/* Fadalgia Card Game - Modern Styles 
   Updated for Bootstrap 5 & Thai Font Support
*/

/*****************************************
   1. Variables & Global Settings
******************************************/
:root {
    /* Theme Colors */
    --primary-color: #026cfe;   /* สีม่วงหลัก */
    --primary-hover: #0056cb;   /* สีม่วงเข้ม (ตอนชี้) ===*/
    --secondary-color: #ff9f43; /* สีส้ม (Accent) */
    --dark-bg: #1e1e2f;         /* พื้นหลังสีเข้ม (Footer) */
    --light-bg: #f3f3f3;        /* พื้นหลังสีเทาอ่อน */
    --text-color: #555555;      /* สีตัวอักษรทั่วไป */
    --heading-color: #333333;   /* สีหัวข้อ */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', sans-serif; /* ฟอนต์ไทย */
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
    padding-top: 76px; /* เว้นที่ให้ Navbar ด้านบน */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Kanit', sans-serif;
    font-weight: 600;
    color: var(--heading-color);
}

p {
    line-height: 1.625rem;
    font-size: 1rem;
}

a {
    text-decoration: none;
    transition: all 0.2s;
}

img {
    max-width: 100%;
    height: auto;
}

/*****************************************
   2. Navbar
******************************************/
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 76px; /* Fix ความสูงป้องกันการกระตุก */
    transition: background-color 0.3s;
}

.navbar-brand img {
    height: 24px;
    width: auto;
}

.navbar .logo-image img {
    width: 150px;
	height: 24px;
}

.nav-link {
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
    margin-left: 1rem;
    transition: color 0.2s;
}

.nav-link:hover, 
.nav-link.active {
    color: var(--primary-color);
}

/* ไอคอน Social บน Navbar */
.navbar .fab {
    transition: transform 0.2s;
}
.navbar .fab:hover {
    transform: translateY(-2px);
}

/*****************************************
   3. Header / Hero Section
******************************************/
.header {
    padding: 10px 0;
	background: #11578b;
    position: relative;
}

.h1-large {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
	color: #fff;
    /* color: var(--primary-color); */
}

.header .lead {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #fff;
}

/* ปรับขนาดตัวอักษรสำหรับหน้าจอใหญ่ */
@media (min-width: 992px) {
    .h1-large {
        font-size: 3.5rem;
    }
}

/*****************************************
   4. Buttons (Custom Styles)
******************************************/
/* ปุ่มทึบ (Solid Button) */
.btn-solid-lg {
    display: inline-block;
    padding: 12px 34px;
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-solid-lg:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(95, 39, 205, 0.3);
}

/* ปุ่มขอบเส้น (Outline Button) สำหรับเมนู How to Play */
.btn-outline-reg {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 12px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    background: #fff;
    font-weight: 600;
    text-align: left;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-outline-reg:hover {
    background-color: var(--primary-color);
    color: #fff;
    padding-left: 25px; /* Effect ขยับข้อความไปขวา */
}

.btn-outline-reg i {
    width: 25px;
    text-align: center;
}

/*****************************************
   5. Sections & Content
******************************************/
.section-padding {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.bg-gray {
    background-color: var(--light-bg);
}

/* Products Cards */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #fff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

.card-img-top {
    width: 100%;
    height: 100%;     /* 1. บังคับความสูงคงที่ (ปรับตัวเลขได้ตามชอบ) */
    object-fit: cover; /* 2. ให้ภาพเต็มกรอบโดยไม่เสียสัดส่วน (ตัดขอบออก) */
    object-position: center top; /* จัดให้เห็นส่วนบนของภาพเป็นหลัก */
    background-color: #eee; /* ใส่สีพื้นหลังรอไว้ ระหว่างรอรูปโหลด */
}

/* Video Wrapper (Youtube) */
.ratio-16x9 {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/*****************************************
   6. Footer
******************************************/
.footer {
    background-color: var(--dark-bg);
    padding: 50px 0 30px;
    text-align: center;
    color: #aaa;
}

.social-container {
    margin-bottom: 20px;
}

.social-container a {
    display: inline-block;
    width: 45px;
    height: 45px;
    line-height: 45px;
    margin: 0 5px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s;
}

.social-container a:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/*****************************************
   7. Modals (Popups)
******************************************/
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    background-color: var(--primary-color);
    color: #fff;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.modal-title {
    font-family: 'Kanit', sans-serif;
    color: #fff;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); /* ทำปุ่มปิดเป็นสีขาว */
}

.modal-body h4 {
    color: var(--primary-color);
    margin-top: 1rem;
}

.modal-body ul, .modal-body ol {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* แก้ไข .line-clamp-2 ในไฟล์ style.css */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* === เพิ่ม 2 บรรทัดนี้ครับ === */
    min-height: 3.3rem; /* บังคับความสูงขั้นต่ำให้เท่ากับ 2 บรรทัดเสมอ */
    margin-bottom: 1rem; /* เว้นระยะห่างด้านล่างนิดนึงให้สวยงาม */
}