@import url(https://fonts.googleapis.com/css?family=Roboto:400,500);
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css);
*, *:before, *:after {
  box-sizing: border-box;
}

/* body {
  background-color: #eaeaea;
  opacity: 0.75;
} */
html, body{ 
    height: 100%;
    font-family: "Noto Sans Thai", serif;
    margin: 0;
    padding: 0;
    text-align: center;
  }
  
.header {
    padding: 20px 20px;
    color: white;
    background-image: radial-gradient(circle, #ffffff, #e8ecf3, #c7d2e1, #b7c3d3, #96a7bd, #8297b5, #627a9b, #48638a, #2e4b74, #243f65, #1c3962, #0d274d);
    background-image:#f6f2f2 ;
    z-index: 5;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    
}


.header .wave {
    background: rgb(255 255 255 / 25%);
    border-radius: 1000% 1000% 0 0;
    position: fixed;
    width: 200%;
    height: 7em;
    animation: wave 5s -3s linear infinite;
    transform: translate3d(0, 0, 0);
    opacity: 0.3;
    z-index: 1;
    left: 0;
    top: 6em;
}

.header .wave:nth-of-type(2) {
    top: 9em;
    animation: wave 7s linear reverse infinite;
    opacity: 0.3;
}

.header .wave:nth-of-type(3) {
    top: 8em;
    animation: wave 9s -1s reverse infinite;
    opacity: 0.3;
}

@keyframes wave {
    2% {
        transform: translateX(1);
    }

    25% {
        transform: translateX(-25%);
    }

    50% {
        transform: translateX(-50%);
    }

    75% {
        transform: translateX(-25%);
    }

    100% {
        transform: translateX(1);
    }
}


.logo {
    margin: 5px 5px;
    max-width: 250px;
    z-index: 2;
}
.content {
    padding: 20px;
    margin-top: 2vh;
}

.content #headtitle {
    color: #05144b;
    position: relative;
    text-decoration: none;
    z-index: 3;
}
  
.content #headtitle::before {
    content: '';
    position: absolute;
    width: 85%;
    height: 4px;
    border-radius: 4px;
    background-color: #05144b;
    bottom: 0;
    left: 0;
    transform-origin: right;
    transform: scaleX(0);
    transition: transform .3s ease-in-out;
}
  
.content #headtitle:hover::before {
    transform-origin: left;
    transform: scaleX(1);
    left: 7vw;
}

.content #threebox:hover{
    color: #964749;
}
.boxes {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
    z-index: 3;
}
.box {
    width: 340px;
    background: rgb(255, 251, 251);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    z-index: 4;
}

.box:hover{
    animation: rotate 0.7s ease-in-out both;
    }
    
    @keyframes rotate {
    0%{
      transform: rotate(0deg) translate3d(0, 0, 0)}
    25%
      {transform: rotate(3deg) translate3d(0, 0, 0)}
    50%{
      transform: rotate(-3deg) translate3d(0, 0, 0)}
    75%{
      transform: rotate(1deg) translate3d(0, 0, 0)}
    100%{
      transform: rotate(0deg) translate3d(0, 0, 0)
    }}
    
    @keyframes storm {
    0%{
      transform: translate3d( 0, 0, 0) translateZ(0)}
    25%{
      transform: translate3d( 4px, 0, 0) translateZ(0)}
    50%{
      transform: translate3d( -3px, 0, 0) translateZ(0)}
    75%{
      transform: translate3d( 2px, 0, 0) translateZ(0)}
    100%{
      transform: translate3d( 0, 0, 0) translateZ(0)}}

.details {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.details.show {
    display: block;
    opacity: 1;
    text-align: left;
}


.language-toggle {
  position: relative;
  margin: auto;
  z-index: 1;
  text-align: center;
  padding-bottom: 17px;
}

.language-toggle a {
  padding: 0.5rem 1rem;
  background: #535981;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
}

.language-toggle a:hover {
  background-image: radial-gradient(circle, rgb(166, 166, 249), rgb(129, 180, 238), rgb(148, 241, 238) );
  animation: gradient 5s ease infinite;
  background-size: 400% 400%;
  background-attachment: fixed;
}
@keyframes gradient {
  0% {
      background-position: 0% 0%;
  }
  50% {
      background-position: 100% 100%;
  }
  100% {
      background-position: 0% 0%;
  }
}







.activities-section {
    width: 100%;
    padding: 100px 8%;
    background: linear-gradient(135deg, #f8f9fa 0%, #f5f3ee 100%);
    position: relative;
    z-index: 3;
}

.activities-header {
    text-align: center;
    margin-bottom: 60px;
}

.activities-header h2 {
    font-size: 42px;
    color: #1c3962; /* ล้อไปกับสี Header */
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 1px;
}

.activities-header .header-line {
    width: 80px;
    height: 4px;
    background: #198754;
    margin: 0 auto 20px auto;
    border-radius: 2px;
}

.activities-header p {
    color: #535981;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- GRID LAYOUT --- */
.activities-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- MODERN CARD --- */
.modern-act-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.modern-act-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(28, 57, 98, 0.15);
}

/* --- IMAGE & BADGE --- */
.card-img-wrapper {
    position: relative;
    height: 230px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.modern-act-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
    pointer-events: none;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 16px;
    border-radius: 30px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}


/* --- CONTENT --- */
.card-content {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left
}

.card-content time {
    color: #8297b5;
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.card-content h3 {
    font-size: 22px;
    line-height: 1.4;
    color: #0d274d;
    margin: 0 0 15px 0;
    transition: color 0.3s ease;
}

.modern-act-card:hover .card-content h3 {
    color: #198754;
}

.card-content p {
    color: #666;
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* --- GHOST BUTTON --- */
a .read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #243f65;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

a .read-more-btn i {
    transition: transform 0.3s ease;
}

a .read-more-btn:hover {
    color: #198754;
    gap: 15px;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media(max-width: 768px) {
    .activities-section {
        padding: 60px 5%;
    }
    .activities-header h2 {
        font-size: 32px;
    }
}
.activity-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 39, 77, 0.8); /* สีพื้นหลังโปร่งแสงโทนน้ำเงิน */
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.activity-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.activity-modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 20px;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.activity-modal-overlay.active .activity-modal-content {
    transform: translateY(0) scale(1);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    color: #1c3962;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-modal-btn:hover {
    background: #964749;
    color: #fff;
    transform: rotate(90deg);
}

.modal-hero-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.modal-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body-wrapper {
    padding: 40px;
    text-align: left;
}

.modal-date {
    display: inline-block;
    color: #8297b5;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 15px;
}

.modal-title {
    color: #0d274d;
    font-size: 32px;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.modal-text-content {
    color: #444;
}

.modal-text-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Scrollbar สวยๆ สำหรับ Modal */
.activity-modal-content::-webkit-scrollbar {
    width: 8px;
}
.activity-modal-content::-webkit-scrollbar-thumb {
    background-color: #8297b5;
    border-radius: 10px;
}

/* Responsive */
@media(max-width: 768px) {
    .modal-hero-image { height: 200px; }
    .modal-body-wrapper { padding: 25px; }
    .modal-title { font-size: 24px; }
}






@media screen and (max-width:950px){
 
  .sponsor .sponsors img{
    width: 16vw;
    padding: 0;
  }
  .header .wave{
  display: none;
  }
}

@media screen and (max-width:650px){
  .sponsor #sponsorbar{
    padding: 5px 0 0 0;
    font-size: 12px;
  }
  .sponsor #study_period{
    padding: 3px 0 5px 0;
    font-size: 10px;
  }
  p{
    font-size: 12px;
  }
  .sponsor h4{
    padding: 10px;
  }
  .box {
    width: 250px;
    background: rgb(255, 251, 251);
    padding: 8px;
  }
  .box h3{
    font-size:16px;
  }
  .content #headtitle {
    font-size: 18px;
  }
  .boxes{
    padding: 10px;
    gap: 15px;
  }
  .content{
    padding: 10px;
    margin-top: 1.5vh;
  }
  .logo{
    max-width: 120px;
    margin: 6px 3px;
  }
}

.sponsor{
    width: 100%;
    justify-content: center;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;

  }
.sponsor .sponsors{
    display: flex;
   align-items: center;
   justify-content: space-evenly;
   background-color: transparent;
}

.sponsor .sponsors img{
    width: 10vw;
    padding: 15px;
    align-items: center;

}
.sponsor #sponsorbar{
    padding: 5px 0 0 0;
}
.sponsor #study_period{
    padding: 10px 0 20px 0;
}

.more_presto{
    display: flex;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef1f5 100%);
}
.more_presto button{
    padding: 10px;
    background-color:rgb(72, 94, 103);
    border-radius: 5px;
    margin : 10px 15px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    top: 4em;
}
.more_presto button:hover{
    background-color: #6abce8;
    transition: 0.4s;
    
}
.more_presto button a{
    text-decoration: none;
    color: rgb(244, 244, 244);
}
