/* ฟ้อนต์ที่ใช้งาน */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;600&display=swap');

/* กำหนดการแสดงผลของเนื้อหาและการจัดการของหน้า */
body {
    font-family: 'Kanit', sans-serif;
    background-color: #f2f4f9; /* สีพื้นหลังเบา ๆ ที่ทำให้ดูสะอาดตา */
    margin: 0;
    padding: 0;
    color: #333; /* สีตัวหนังสือหลัก */
}

/* Breadcrumb */
.breadcrumb-area {
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    background-color: #0066cc; /* โทนสีฟ้า */
    height: 50vh;
}

.breadcrumb-content h4 {
    font-family: 'Kanit', sans-serif;
    color: #fff;
    font-size: 60px;
    font-weight: 600;
    margin-bottom: 10px;
}

.breadcrumb-content ul {
    list-style: none;
    padding: 0;
}

.breadcrumb-content ul li {
    font-family: 'Kanit', sans-serif;
    display: inline-block;
    margin-right: 10px;
    color: #fff;
    font-size: 28px;
}

.breadcrumb-content ul li a {
    font-family: 'Kanit', sans-serif;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 28px;
}

.breadcrumb-content ul li a:hover {
    color: #ffcc00; /* สีทองสำหรับ hover */
}

/* กำหนดการแสดงผลของเนื้อหาหลัก */
.policy-content {
    padding: 60px 0;
    font-family: 'Kanit', sans-serif;
}

/* ปรับขนาดของ container ให้อยู่ในขนาดที่กำหนด */
.container {
    max-width: 1600px; /* กำหนดความกว้างสูงสุด */
    margin: 0 auto; /* จัดให้อยู่ตรงกลาง */
    padding-left: 15px; /* ระยะห่างด้านซ้าย */
    padding-right: 15px; /* ระยะห่างด้านขวา */
}

.row-mid {
    justify-items: center;
}

/* แผนประจำปี */
.policy-title {
    font-family: 'Kanit', sans-serif;
    font-size: 36px;
    font-weight: 600;
    background: linear-gradient(to right,rgb(97, 0, 224),rgb(192, 130, 15));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.policy-description {
    font-family: 'Kanit', sans-serif;
    font-size: 18px;
    color: #555; /* สีเทาเข้มสำหรับข้อความ */
    text-align: center;
    margin-bottom: 10px;
}

.policy-line::before {
    content: '';
    display: block;
    width: 50%; /* ความกว้างเต็ม */
    height: 5px; /* ความหนา */
    background-color: purple; /* สี */
    margin: 10px 0; /* ระยะห่าง */
    justify-self: center;
}

/* ส่วนเมนู/เนื้อหาด้านล่าง */
.plan-menu-grid {
    position: relative;
    z-index: 2;
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px;
    margin-bottom: 10px; /* เพิ่มระยะห่างด้านล่าง */
    height: auto;
    font-family: 'Kanit', sans-serif;
}

/* การ์ดข่าว */
.plan-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.plan-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.plan-card img:hover {
    transform: scale(1.05); /* ขยายภาพเมื่อ hover */
}

.icon-overlay {
    position: absolute;
    bottom: 100px;
    right: 10px;
    transform: translate(-50%, -50%);
    color: white; /* สีของไอคอน */
    opacity: 0; /* ซ่อนเริ่มต้น */
    transition: opacity 0.3s ease; /* เพิ่มเอฟเฟกต์ */
    font-size: 20px; /* ขนาดไอคอน */
}

.plan-card:hover .icon-overlay {
    opacity: 1; /* แสดงเมื่อเมาส์ชี้ */
}

.plan-card h3 {
    position: absolute;
    bottom: 100px;
    left: 0;
    width: 80%;
    padding: 10px 15px;
    color: white;
    text-align: left;
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Kanit', sans-serif;
    white-space: nowrap;
}

.plan-card-body {
    padding: 0 0 100px 0; /* เพิ่มระยะห่างด้านล่าง */
    font-size: 20px;
    color: #000000;
    height: 100%;
    overflow: hidden; /* ทำให้เนื้อหาภายในการ์ดไม่ล้นออกมา */
    display: flex; /* ใช้ flexbox เพื่อจัดเรียงเนื้อหา */
    flex-direction: column; /* จัดเรียงเนื้อหาภายในกล่อง */
    justify-content: space-between; /* จัดเรียงเนื้อหาให้เต็มความสูง */
    position: relative; /* เพื่อให้สามารถใช้ position:absolute กับลูกได้ */
    background-color: #ffffff; /* สีพื้นหลังของการ์ด */
    font-family: 'Kanit', sans-serif;
}

.plan-card-body p {
    font-size: 16px;
    text-align: left;
    padding: 15px;
    position: absolute;
    left: 0;
    width: 100%;
    color: rgb(0, 0, 0);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Kanit', sans-serif;
}

/* เพิ่มแอนิเมชันให้กับแต่ละการ์ด */
.plan-card {
    animation: fadeInFromBottom 0.6s ease-out;
}

/* Grid Container สำหรับการจัดวางแผน */
.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    font-family: 'Kanit', sans-serif;
}

.plan-wrapper {
    width: 100%;
    max-width: 700px;
    font-family: 'Kanit', sans-serif;
}

.plan-item {
    background-color: #ffffff; /* โทนสีน้ำเงินเข้ม */
    color: #000000;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    width: 320px;
    padding-block-end: 80px;
    padding: 10px;
    margin: 0 auto; /* จัดให้อยู่ตรงกลาง */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* ทำให้ไอคอนและข้อความไม่หลุดออกจากกรอบ */
    height: 100%; /* ทำให้กล่องมีความสูงเต็ม */
    display: flex;
    flex-direction: column; /* จัดเรียงเนื้อหาภายในกล่อง */
    font-family: 'Kanit', sans-serif;
}

.plan-item:hover {
    transform: translateY(-10px); /* ยกกล่องขึ้นเมื่อ hover */
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

.plan-item h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Kanit', sans-serif;
}

.plan-item img {
    width: 100%; /* กำหนดขนาดของไอคอน */
    height: auto; /* กำหนดขนาดของไอคอน */
    display: block;
    transition: transform 0.3s ease;
    margin: 0 auto; /* จัดให้อยู่ตรงกลาง */
}

.plan-item img:hover {
    transform: scale(1.05); /* ขยายภาพเมื่อ hover */
}

.plan-item p {
    font-size: 18px;
    text-align: left;
    padding: 20px;
    font-family: 'Kanit', sans-serif;
}

.download-link {
    font-size: 16px;
    color: #000000; /* โทนสีทอง */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-family: 'Kanit', sans-serif;
}

.download-link:hover {
    color: #ffcc00; /* เปลี่ยนเป็นสีขาวเมื่อ hover */
    text-decoration: none;
}

/* ทำให้การแสดงผลเหมาะสมบนมือถือ */
@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .plan-menu-grid {
        grid-template-columns: repeat(2, 1fr); /* ปรับให้แสดง 2 คอลัมน์ */
        gap: 10px; /* ระยะห่างระหว่างการ์ด */
    }
}

/* --- MEDIA QUERIES สำหรับมือถือ --- */
@media (max-width: 767px) {
    .plan-menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 15px;
        margin-top: -50px;
        margin-bottom: 80px;
    }

    .plan-card h3 {
        font-size: 18px;
        margin-left: 15px;
        padding: 8px 12px;
    }

    .plan-card img {
        height: auto;
        max-height: 250px;
        max-width: 100%;
        width: 500px;
    }

    .plan-card-body p {
        font-size: 14px;
    }

    .policy-line {
        margin-bottom: 100px;
    }
}
