* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: url('../img/bg.webp') no-repeat center center/cover;
    align-items: center;
}

header {
    font-family: 'Sarabun', sans-serif;
    width: 100%;
    background: rgba(0, 120, 215, 0.9);
    color: #fff;
    padding: 20px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

main {
    /* max-width: 1200px; */
    flex: 1;
    width: 100%;
    padding: 20px;

    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;

}

section {
    
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    padding: 20px;
    justify-content: center;
    align-items: center;
    
}

.logo {
    width: 100px;
    height: 100px;
   
    margin: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
   
}


.card {
    margin-top: 2%;
    padding: 25px;
    border-radius: 10px;
    border: 0.5px solid #760303;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 450px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:nth-child(1) {
    background: #fefae0;
}

.card:nth-child(2) {
    background: #9bf6ff;
}

.card:nth-child(3) {
    background: #fad2e1;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);

}

.card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

footer {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background: rgba(0, 120, 215, 0.9);
    color: #fff;
}
.welcome
{
    margin:2% 0 2% 0;
    text-align: center;
    font-size:28px;
    color: #760303;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.btn-sa{
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    padding: 13px 30px;
    border-radius: 50px;
    transition: 0.5s;
    line-height: 1;
   
      margin-top: 10px;
    -webkit-animation-delay: 0.8s;
    animation-delay: 0.8s;
    color: #760303;
    border: 2px solid #760303;
  }
  
.btn-sa:hover{
    background: #760303;
    color: #fff;
  }
  
/* POPUP ************************  */

  /* พื้นหลังโปร่งใส 80% */
  .popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* ให้เริ่มจากด้านบน */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* กล่อง Popup */
.popup-box {
    background: white;
    padding: 10px;
    /* width: 90%;
    max-width: 700px; */

    width: 100%;
    max-width: 980px;
    
    text-align: center;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 15%; /* ห่างจากขอบบน 20% */
    transform: translateY(-50px); /* เริ่มต้นเลื่อนขึ้นไป 50px */
    opacity: 0;
    transition: transform 0.5s ease 0.3s, opacity 0.5s ease 0.3s; /* Slide-Down + Delay */
}

/* แสดง Popup */
.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-overlay.active .popup-box {
    transform: translateY(0); /* เลื่อนลงมาตำแหน่งปกติ */
    opacity: 1;
}

/* ปุ่มปิด (ด้านบนขวา) */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 16px;
}

.close-btn:hover {
    background: darkred;
}


/* Responsive สำหรับมือถือ */
@media (max-width: 480px) {
    .popup-box {
        width: 95%;
        padding: 15px;
    }
}

.responsive-image {
    height: auto;
    width: 100%;
  }

/* =================== Black Ribbon =================== */
.black-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  width: 110px;
  height: 110px;
  background-image: url('../img/black_ribbon_top_left.png');
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 9999;
  pointer-events: none;
}

/* 📱 มือถือจอเล็ก (ต่ำกว่า 480px) */
@media (max-width: 480px) {
  .black-ribbon {
    width: 70px;
    height: 70px;
  }
}

/* 📱📲 มือถือทั่วไป (481–767px) */
@media (max-width: 767px) and (min-width: 481px) {
  .black-ribbon {
    width: 85px;
    height: 85px;
  }
}

/* 🧩 แท็บเล็ต (768–1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
  .black-ribbon {
    width: 100px;
    height: 100px;
  }
}

/* 💻 Desktop (ใหญ่กว่า 1024px) */
@media (min-width: 1025px) {
  .black-ribbon {
    width: 120px;
    height: 120px;
  }
}
/* ===================End Black Ribbon =================== */

/* body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background: #000;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
} */

.neon-text {
    font-size: 1.5rem;
    color: #0d0d0e;
    text-shadow: 0 0 5px #FFD700, 0 0 10px #FFD700, 0 0 20px #FFD700, 0 0 40px #FFD700, 0 0 80px #FFD700;
    animation: glow 0.5s infinite alternate;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px #FFD700, 0 0 10px #FFD700, 0 0 20px #FFD700, 0 0 40px #FFD700, 0 0 80px #FFD700;
    }
    100% {
        text-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff, 0 0 40px #00d4ff, 0 0 80px #00d4ff, 0 0 160px #00d4ff;
    }
}