@font-face {
  font-family: "LINE Seed Sans TH";
  src: url("fonts/LINESeedSansTH_W_Rg.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "LINE Seed Sans TH", sans-serif;
  background-color: #eaf4fb;
  color: #4682b4;
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* SECTION CONTAINER */
.info-news-section-custom {
  background: #eaf4fb;
  padding: 4rem 0;
}
.info-news-section-custom .container {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

/* Section Title */
.section-title {
  color: #1976d2;
  font-size: 2.3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 2.8rem;
  letter-spacing: 1.2px;
  text-shadow: 0 2px 10px #ffffff90;
}

/* FLEX LAYOUT */
.info-news-flex-custom {
  display: flex;
  flex-direction: row;
  gap: 3.5rem;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

/* BOTH COLUMNS */
.activity-section-custom,
.announcement-section-custom {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
}

/* COLUMN TITLES */
.activity-title-custom,
.announcement-title-custom {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.6rem;
  color: #1976d2;
  text-align: center;
  letter-spacing: 0.5px;
}

.announcement-title-custom {
  color: #1976d2;
}

/* ACTIVITY GRID */
.activity-grid-custom {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 2rem;
  width: 100%;
}

/* ACTIVITY CARD */
.activity-card-custom {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 3px 12px rgba(70, 130, 180, 0.09);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  min-height: 230px;
  min-width: 0;
  width: 100%;
  max-width: 480px;
  border: 1.5px solid #e3f2fd;
  transition: box-shadow 0.18s, transform 0.15s;
}

.activity-card-custom:hover {
  box-shadow: 0 10px 24px rgba(25, 118, 210, 0.13);
  transform: translateY(-4px) scale(1.03);
}

.activity-img-custom {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #e4f0fa;
}

.activity-content-custom {
  flex: 1 1 auto;
  padding: 1rem 1rem 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-text-custom {
  font-size: 1.08rem;
  font-weight: 600;
  color: #1565c0;
  text-align: center;
  margin: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  min-height: 2.1em;
}

/* ANNOUNCEMENT */
.announcement-section-custom {
  background: transparent;
}

.announcement-card-custom {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 18px;
  border: 1.5px solid #f8bbd0;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0 auto 2rem auto;
  padding: 0;
  width: 75%;
  max-width: 700px;
}

.announcement-card-custom:last-child {
  margin-bottom: 0;
}

.announcement-card-custom:hover {
  box-shadow: 0 18px 48px rgba(233, 30, 99, 0.13);
  transform: translateY(-5px) scale(1.03);
}

.announcement-img-custom {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  border-bottom: 1px solid #f8bbd0;
  margin: 0 auto;
}

.announcement-content-custom {
  width: 100%;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  box-sizing: border-box;
  min-height: 100px;
}

.announcement-title-text-custom {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1976d2;
  margin-bottom: 0.7rem;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive Desktop */
@media (min-width: 1200px) {
  .info-news-flex-custom {
    gap: 5rem;
  }
}

/* Responsive Tablet */
@media (max-width: 1024px) {
  .info-news-flex-custom {
    flex-direction: column;
    align-items: stretch;
    gap: 3rem;
    max-width: none;
    padding: 0;
  }
  .activity-section-custom,
  .announcement-section-custom {
    max-width: none;
    margin: 0 auto;
  }
  .activity-grid-custom,
  .announcement-card-custom {
    max-width: none;
  }
}

/* Responsive Mobile */
@media (max-width: 730px) {
  .info-news-section-custom {
    padding: 2rem 0;
  }
  .info-news-flex-custom {
    flex-direction: column;
    gap: 2.5rem;
    max-width: none;
    padding: 0;
  }
  .activity-grid-custom {
    grid-template-columns: 1fr;
    max-width: none;
    gap: 1.2rem;
  }
}

/* Responsive Small Mobile */
@media (max-width: 600px) {
  .info-news-section-custom {
    padding: 1.2rem 0;
  }
  .section-title {
    font-size: 1.18rem;
    margin-bottom: 1.1rem;
  }
  .activity-title-custom,
  .announcement-title-custom {
    font-size: 1.07rem;
    margin-bottom: 0.8rem;
  }
  .activity-grid-custom {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: none;
    margin: 0 auto;
  }
}

/* ปุ่มสมัครเรียนออนไลน์ */
.btn-apply {
  display: inline-block;
  padding: 0.7rem 2rem;
  color: #fff;
  background: linear-gradient(90deg, #1976d2 0%, #42a5f5 100%);
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 30px;
  box-shadow: 0 3px 16px rgba(25, 118, 210, 0.14);
  border: none;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  text-decoration: none;
  letter-spacing: 1px;
  position: relative;
}

.btn-apply:hover,
.btn-apply:focus {
  background: linear-gradient(90deg, #1565c0 0%, #1976d2 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(25, 118, 210, 0.18);
  text-decoration: none;
}

.btn-apply i {
  margin-left: 0.6rem;
  font-size: 1.1em;
  vertical-align: middle;
}

/* ✅ Mobile Responsive: ข่าวประชาสัมพันธ์ */
@media (max-width: 768px) {
  #announcementNewsCarousel .carousel-item {
    width: 100% !important;   /* ให้ slide กินเต็มพื้นที่ */
  }

  .announcement-card-custom {
    width: 100% !important;
    max-width: 100% !important;  /* กันไม่ให้เกินจอ */
    margin: 0 auto 1.5rem auto !important;
    border-radius: 12px !important;
    padding: 10px !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    text-align: center !important;
    overflow: visible !important;  /* ✅ ให้สูงตามภาพจริง */
    height: auto !important;       /* ✅ ไม่ fix ความสูง */
  }

  .announcement-img-custom {
    width: 100% !important;        /* เต็มการ์ด */
    height: auto !important;       /* สูงตามสัดส่วนจริง */
    object-fit: contain !important;/* ✅ คงสัดส่วน ไม่ครอป */
    border-radius: 10px !important;
    display: block !important;
    margin: 0 auto !important;
    max-height: none !important;   /* ❌ ไม่จำกัดความสูง */
  }

  .announcement-title-text-custom {
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    margin-top: 8px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}
