
/* ตั้งค่าสไตล์พื้นฐาน */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: CPN, sans-serif;
}

img{
    -webkit-user-drag: none;
}

body {
    background-color: #f5f5f5;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background: rgba(0 ,0 ,0 ,0.5);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
}

.scrolled {
    background: rgba(0, 0, 0, 1);
}

.left-tag {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 60px;
    height: 60px;
}

.right-tag ul {
    list-style: none;
    display: flex;
    gap: 15px;
    padding: 0;
}

.right-tag ul li {
    display: inline;
}

.right-tag ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: .2s ease;
}

.right-tag ul .active a {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

header h1 {
    font-size: 1.5em;
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
}

/* เนื้อหาหลัก */
main {
    margin-top: 140px;
}

ul {
    list-style: none;
}

.about, .news {
    background: white;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

ul.news-ul {
    display: flex;
    gap: 20px;
}

.news-ul li {
    width: 33.33%;
    height: 151px;
}

.news-ul li:hover icon {
    font-size: 48px;
}
.news-ul li:hover {
    background: #0c7bfd;
    border-radius: 5px;
}

.login {
    display: none;
    background: #0c7bfd;
    color: #fff;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.login a {
    color: #fff;
    text-decoration: none;
}

.login a:hover {
    font-weight: 600;
}

icon {
    font-size: 40px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #28a745;
    color: white;
    text-decoration: none;
    font-size: 18px;
    border-radius: 5px;
}

.btn:hover {
    background: #218838;
}

/* Footer */

footer {
    background: linear-gradient(0, #000000, transparent);
    color: white;
    padding: 20px;
}

/* 🔥 Media Queries สำหรับจอเล็ก 🔥 */

/* จอเล็กกว่า 580px -> ซ่อน right-tag */
@media (max-width: 580px) {
    .right-tag {
        display: none;
    }
    
    .login {
        display: block;
    }
}

/* จอเล็กกว่า 380px -> ปรับขนาด h1 */
@media (max-width: 380px) {
    header h1 {
        font-size: 1.2em !important;
    }
}

/* จอเล็กกว่า 300px -> ปรับขนาดโลโก้ */
@media (max-width: 300px) {
    .logo {
        width: 40px !important;
        height: 40px !important;
    }
}
