/* 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; /* เพิ่มการเลื่อนแบบสมูทสำหรับมือถือ */
}

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("../assets/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;
}

/* 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);
}

.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("../assets/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;
  }
}
