/* ให้ html + body ขยายเต็มหน้าจอเสมอ */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* พื้นหลังแบบเต็มหน้าจอ */
body {
    background: linear-gradient(to bottom, #ddf5f7, #ffffff);
    background-repeat: no-repeat;
    background-attachment: fixed; /* ทำให้พื้นหลังนิ่ง */
    background-size: cover; /* ปรับอัตโนมัติให้ครอบคลุมพื้นที่ */
}

/* ป้องกันเมนูชั้นมากล้นจอ */
* {
    box-sizing: border-box;
}


/* กำหนดรูปลักษณ์ของ container */
.container {
    display: flex;
}
.fonth2{
    color: #fff;

    font-size: 20px;

}
/* Sidebar */
.sidebar {
    width: 250px;
   background-image: -webkit-gradient(linear, left top, left bottom, from(#5b0683), to(#e5c2f5));

    color: white;
    padding: 20px;
    height:100vh;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 20px;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

.sidebar ul li a:hover {
    margin-left: 20PX;
    background-color: #d3e01c9d;
    padding: 10px;
    border-radius: 15px;
    transition: 0.5s;
    box-shadow: #888 0px 4px 8px;
}

/* Content area */
.content {
    flex-grow: 1;
    padding: 20px;
    
}

/* Header */
.header {
    margin-bottom: 20px;
}

.header h1 {
    font-size: 28px;
    color: #333;
}

/* Cards for data */
.cards {
    display: flex;
    gap: 20px;
}

.card {
    background-color: #fff; /* พื้นสีขาว */
    padding: 0; /* เราจะจัด padding แยกส่วน */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
    overflow: hidden; /* กันสี h3 ล้น */
}

.card:hover {
    transform: translateY(-10px);
}

/* แท็บด้านบนสีฟ้าอ่อน */
.card h3 {
    background: linear-gradient(90deg, #045291, #02183b, #045291);
    background-size: 200% 100%; /* ขยาย gradient ให้สามารถเลื่อนได้ */
    color: #fff; /* สีข้อความให้อ่านง่าย */
    padding: 15px 20px;
    margin: 0;
    font-size: 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;

    animation: slideGradient 5s linear infinite;
}

@keyframes slideGradient {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%; /* เลื่อนไปทางขวาต่อเนื่อง */
    }
}


/* เนื้อหาภายใน card */
.card p {
    padding: 10px 10px;
    margin: 0;
    color: #555;
    font-size: 16px;
    border-top: 1px solid #eee; /* เพิ่มเส้นแบ่งระหว่าง h3 กับเนื้อหา */
}


.card p {
    font-size: 18px;
    color: #555;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #888;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .cards {
        flex-direction: column;
        gap: 10px;
       
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .content {
        margin-top: 20px;
    }
}
.link1{
    color: #007BFF;
    font-size: 20px;
    margin-top: 100px;
}

img {
    width: 100px;
    height: 100px;
    border-radius: 50%; /* ทำให้เป็นวงกลม */
    object-fit: cover; /* ทำให้ภาพพอดีกับกรอบ */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* นูนเล็กน้อย */
  }