/* General Styling */
html {
  scroll-behavior: smooth; /* การเลื่อนแบบสมูทสำหรับหน้าเว็บทั้งหมด */
}

body {
  font-family: "Inter", "Kanit", "Poppins", sans-serif;
  background-color: #000000;
  color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  height: 100%;
  -webkit-overflow-scrolling: touch; /* เพิ่มการเลื่อนแบบสมูทสำหรับมือถือ */
}

.logo-img {
  max-height: 40px; /* กำหนดความสูงสูงสุดสำหรับโลโก้บน Desktop */
  width: auto; /* รักษาอัตราส่วนของรูปภาพ */
  /* ถ้าโลโก้ของคุณกว้างมาก อาจจะต้องใช้ max-width ด้วย */
}

a {
  text-decoration: none;
}

/* Reusable Classes */
.bg-dark-transparent {
  background: rgba(0, 0, 0, 0.8) !important;
}

.text-cyan {
  color: #00d0ff !important;
}

.text-muted-light {
  color: rgba(255, 255, 255, 0.5) !important;
}

.cursor-pointer {
  cursor: pointer;
}

/* Header & Navigation */
header {
  z-index: 10; /* ลดจาก 1020 เป็น 10 เพื่อให้ต่ำกว่าระดับอื่นๆ ที่อาจเพิ่มมา */
  position: sticky;
  top: 0;
  background: rgba(105, 144, 211, 0.7); /* สีฟ้า #6990D3 กับความโปร่งใส 70% */
}

.nav-link:hover {
  color: #00d0ff !important;
  transition: color 0.3s ease;
}

/* .nav-item .nav-link.active {
  font-size: 1.25rem;
  font-weight: 600;
} */

.main-content {
  background: url("../images/img_backgroundblobservice1png.png") no-repeat right
    top !important;
  background-size: auto !important;
  min-height: 100vh;
  background-position: right top !important;
  position: relative;
  overflow: hidden;
  background-origin: content-box;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 100%; /* เต็มความสูงของ parent */
  min-height: 360px; /* ความสูงขั้นต่ำตามสัดส่วน 16:9 */
  margin-bottom: 0;
  overflow: hidden;
}

.carousel {
  height: 100%;
}

.carousel-inner,
.carousel-item {
  height: 100%;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 1440 / 620; /* สัดส่วนมาตรฐาน 16:9 */
  transition: transform 0.5s ease;
}

.carousel-item:hover img {
  transform: scale(1.05);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  /* background-color: rgba(0, 0, 0, 0.5); */
  border-radius: 50%;
  padding: 1rem;
}

/* -------------------------------------------------------------------------- */
/* Modal Styles                               */
/* -------------------------------------------------------------------------- */
.modal-content {
  background: linear-gradient(
    135deg,
    var(--primary-dark-bg) 0%,
    var(--secondary-dark-bg) 100%
  );
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px var(--shadow-dark);
  /* เงาเพื่อมิติ */
  color: var(--text-light);
  /* กำหนดสีข้อความใน modal ให้เป็นสีสว่าง */
}

.modal-header {
  border-bottom: none;
  /* ไม่มีเส้นคั่นส่วนหัว */
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  /* ปรับ padding */
}

.btn-close-white {
  /* ใช้ Bootstrap class นี้ได้เลย */
  filter: invert(1) grayscale(100%) brightness(200%);
  /* ทำให้ไอคอนกากบาทเป็นสีขาวชัดเจน */
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.btn-close-white:hover {
  opacity: 1;
}

.modal-body {
  padding: 1.5rem;
  text-align: center;
  /* จัดกลางเนื้อหาใน modal body */
}

.modal-img {
  max-height: 50vh;
  /* จำกัดความสูงของรูป */
  object-fit: contain;
  /* รักษาสัดส่วน */
  border-radius: 10px;
  /* ขอบรูปโค้งมน */
  box-shadow: 0 5px 15px var(--shadow-light);
  /* เงารูปภาพ */
  margin-bottom: 1.5rem;
  /* เพิ่มระยะห่างด้านล่างรูป */
}

/* -------------------------------------------------------------------------- */
/* Animation Styles                             */
/* -------------------------------------------------------------------------- */

/* ตั้งค่าเริ่มต้นสำหรับแอนิเมชัน */
.modal-title,
.modal-description,
.cta-button {
  opacity: 0;
}

/* แอนิเมชันเมื่อ Modal แสดงผล */
.modal.show .modal-img {
  animation: scaleIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  /* เปลี่ยน ease-in-out เป็น cubic-bezier ที่ละมุนกว่า */
}

.modal.show .modal-title {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

.modal.show .modal-description {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
}

.modal.show .cta-button {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

/* Keyframes สำหรับแอนิเมชัน */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
    /* เริ่มต้นจากขนาดที่เล็กลงเล็กน้อย */
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------------------------------- */
/* Button Styles                                */
/* -------------------------------------------------------------------------- */
.cta-button {
  background-color: var(--accent-color-cyan);
  /* ใช้ตัวแปรสี */
  color: var(--primary-dark-bg);
  /* สีข้อความในปุ่ม (ให้ตัดกับสีปุ่ม) */
  border: none;
  border-radius: 8px;
  padding: 12px 25px;
  /* ปรับ padding ปุ่มให้ใหญ่ขึ้นเล็กน้อย */
  font-weight: 600;
  /* เพิ่มความหนาของตัวอักษร */
  transition: transform 0.3s ease, background-color 0.3s ease,
    box-shadow 0.3s ease;
  text-decoration: none;
  /* ให้แน่ใจว่าไม่มีขีดเส้นใต้ */
  display: inline-block;
  /* ทำให้สามารถใช้ transform ได้ดี */
}

.cta-button:hover {
  background-color: var(--accent-color-cyan-hover);
  /* สีเข้มขึ้นเมื่อ hover */
  transform: translateY(-3px);
  /* ยกปุ่มขึ้นเล็กน้อยเมื่อ hover */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  /* เพิ่มเงาเมื่อ hover */
  color: var(--primary-dark-bg);
  /* ให้สีข้อความคงเดิม */
}

.cta-button:active {
  transform: translateY(0);
  /* ปุ่มกลับมาตำแหน่งเดิมเมื่อกด */
  background-color: var(--accent-color-cyan);
  box-shadow: none;
}

/* Music Player */
.music-player-section {
  padding: 0;
  position: relative;
  width: 100%;
  z-index: 30;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
  margin-top: -2rem; /* ปรับให้แนบชิด Hero Section */
}

.music-player {
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 1.5rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto;
  max-width: 1200px;
}

.music-player:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 208, 255, 0.4);
}

/* ส่วนนี้เพิ่มใน assets/style.css */
.music-player .player-controls {
  display: flex;
  align-items: center;
  gap: 10px; /* เพิ่มระยะห่างระหว่างปุ่มและ slider */
  flex-wrap: wrap; /* ให้มันขึ้นบรรทัดใหม่ได้ถ้าหน้าจอเล็ก */
}

.volume-slider {
  flex-grow: 1; /* ทำให้ slider ขยายเต็มพื้นที่ที่เหลือ */
  max-width: 150px; /* กำหนดความกว้างสูงสุดของ slider */
  -webkit-appearance: none; /* สำหรับ Chrome/Safari */
  appearance: none;
  height: 8px; /* ความสูงของ track */
  background: #d3d3d3; /* สีพื้นหลัง track */
  outline: none;
  opacity: 0.7;
  -webkit-transition: 0.2s;
  transition: opacity 0.2s;
  border-radius: 4px;
}

.volume-slider:hover {
  opacity: 1;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; /* ขนาดของ thumb */
  height: 18px;
  border-radius: 50%; /* ทำให้ thumb กลม */
  background: #00d0ff; /* สีของ thumb */
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00d0ff;
  cursor: pointer;
}

.player-content {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 1.5rem;
}

.album-art {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  margin-right: 1rem;
  transition: transform 0.3s ease;
}

.album-art:hover {
  transform: scale(1.1);
}

.album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-info h5 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 500;
}

.next-song {
  margin: 0;
  font-size: 0.9rem;
  color: #00d4ff;
  font-weight: 400;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn-play,
.btn-volume {
  background: #00d0ff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s ease;
}

.btn-play:hover,
.btn-volume:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

.progress-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
}

.progress {
  width: 60%;
  height: 100%;
  background: #00d0ff;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Studio Section */
.studio-section {
  padding-top: 2rem !important;
  padding-bottom: 2rem;
}

.studio-logo {
  width: 165px;
  height: 165px;
  min-width: 165px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border-radius: 15px;
  overflow: hidden;
}

.studio-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 208, 255, 0.3);
}

.studio-logo img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.studio-logo:hover img {
  opacity: 0.9;
}

/* What's Up Section */
.whats-up-section {
  background-size: cover !important;
  background-position: center !important;
  background-attachment: fixed;
  padding: 4rem 0;
}

.event-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 15px;
  overflow: hidden;
}

.event-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.event-card .card-img-top {
  height: 222px;
  object-fit: cover;
}

.event-card .card-body {
  padding-left: 1.5rem !important; /* เพิ่ม padding ซ้ายเป็น 24px */
  padding-right: 1.5rem !important; /* เพิ่ม padding ขวาเป็น 24px */
}

/* Music Recommendation Section */
.music-section {
  background: url("../images/img_sectionbefore.png") no-repeat center/cover;
  background-origin: border-box;
  padding: 4rem 0;
}

.music-list {
  max-width: 450px;
  margin: 0 auto;
}

.song-item {
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  border-radius: 10px;
}

.song-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateX(10px);
}

.song-artwork {
  width: 117px;
  height: 117px;
  min-width: 117px;
  object-fit: cover;
  border-radius: 10px;
}

/* Contact Section */
.contact-section .contact-item i {
  width: 24px;
  text-align: center;
}

.social-icons a {
  transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: #00d0ff !important;
}

/* Scroll to Top Button */
#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #00d0ff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 208, 255, 0.3);
}

#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
}

#scrollToTopBtn:hover {
  background-color: #0099cc;
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 208, 255, 0.5);
}

#scrollToTopBtn i {
  font-size: 20px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in {
  animation: slideIn 0.8s ease-out;
}

/* --- Responsive Adjustments --- */
/* For screens smaller than 768px (mobile) */
@media (max-width: 767.98px) {
  .main-content {
    background-size: cover;
    background-position: top !important; /* จัดกลางเพื่อให้เหมาะสม */
  }

  .hero-section {
    height: auto;
    min-height: 180px; /* ปรับเป็นครึ่งหนึ่งของ 360px (16:9) */
  }

  .music-player-section {
    position: relative;
    top: auto;
    padding: 0.5rem 0;
    background: none;
    margin-top: 0; /* ปรับให้แนบชิด */
  }

  .music-player {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 30px;
    max-width: 100%;
  }

  .player-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .album-art {
    width: 50px;
    height: 50px;
    margin-right: 0;
  }

  .song-info h5 {
    font-size: 1rem;
  }

  .next-song {
    font-size: 0.8rem;
  }

  .player-controls {
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
  }

  .btn-play,
  .btn-volume {
    width: 40px;
    height: 40px;
  }

  .progress-bar {
    width: 150px;
  }

  .studio-section {
    padding-top: 0 !important;
  }

  .event-card .card-body {
    padding-left: 1rem !important; /* ลดลงเป็น 16px ในมือถือ */
    padding-right: 1rem !important; /* ลดลงเป็น 16px ในมือถือ */
  }
}

/* For tablets and desktops (screen width 768px and up) */
@media (min-width: 768px) {
  .studio-section {
    padding-top: 2rem !important;
    padding-bottom: 3rem;
  }

  .footer .contact-section {
    text-align: left;
  }

  .footer .social-section {
    justify-content: flex-start;
  }
}

/* For screens smaller than 992px (tablets and small laptops) */
@media (max-width: 991.98px) {
  .navbar-nav {
    text-align: center;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1rem;
    border-radius: 0.5rem;
  }

  .music-player {
    padding: 1rem 1.5rem;
  }
}

/* For screens 1200px and up (large desktops) */
@media (min-width: 1200px) {
  .music-player {
    padding: 1.5rem 3rem;
  }

  .studio-section {
    padding-top: 2.5rem !important;
  }
}
