﻿/* =========================================
   贊助夥伴?��?(Sponsor Partner Section)
   風格?��?來自?�山人壽永�??�康?�航?�網�?
   ========================================= */

/* --- Section Container --- */
.sponsor-partner {
  text-align: center;
  padding: 20px 0 0;
}

/* --- Section Title (gradient text) --- */
.sponsor-title {
  font-size: 3.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, #0e56c2, #00a0df, #85c134);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 36px;
  letter-spacing: 1px;
  text-align: center;
}

/* --- Carousel Container --- */
.sponsor-carousel {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- Individual Slide --- */
.sponsor-carousel .sponsor-slide {
  padding: 10px 16px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 110px;
  outline: none;
}

.sponsor-carousel .sponsor-slide img {
  max-height: 96px;
  max-width: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(20%);
  opacity: 0.85;
  transition: all 0.4s ease;
  margin: 0 auto;
}

.sponsor-carousel .sponsor-slide img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.08);
}

/* Slick Arrow Overrides */
.sponsor-carousel .slick-prev,
.sponsor-carousel .slick-next {
  width: 36px;
  height: 36px;
  z-index: 2;
  display: none;
}

.sponsor-carousel .slick-prev:before,
.sponsor-carousel .slick-next:before {
  font-size: 26px;
  color: #0e56c2;
  opacity: 0.5;
}

.sponsor-carousel .slick-prev:hover:before,
.sponsor-carousel .slick-next:hover:before {
  opacity: 1;
}

.sponsor-carousel .slick-prev {
  left: 0;
}

.sponsor-carousel .slick-next {
  right: 0;
}

/* --- "?�解?��?" Button (gradient) --- */
.sponsor-more-btn {
  display: inline-block;
  margin-top: 40px;
  padding: 16px 60px;
  background: linear-gradient(135deg, #0e56c2, #00a0df, #85c134);
  color: #ffffff !important;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s ease;
  letter-spacing: 2px;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(14, 86, 194, 0.25);
}

.sponsor-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(14, 86, 194, 0.4);
  color: #ffffff !important;
}

/* =========================================
   贊助夥伴彈窗 (Sponsor Popup Modal)
   藍色背景 + 左標題 + 右6欄LOGO網格
   ========================================= */

/* --- Overlay --- */
.sponsor-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.sponsor-popup-overlay.active {
  display: flex;
}

/* --- Popup Content Card --- */
.sponsor-popup-content {
  position: relative;
  /* background: linear-gradient(180deg, #1a5fb4 0%, #0e56c2 30%, #0a3d8a 100%); */
  background: rgba(0, 0, 0, 0.55);
  border-radius: 24px;
  width: 100%;
  max-width: 1100px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 50px 40px 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  animation: sponsorPopupIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes sponsorPopupIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Close Button --- */
.sponsor-popup-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  margin-bottom: 0px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.sponsor-popup-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* --- Popup Body --- */
.sponsor-popup-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- Each Category Row --- */
.sponsor-popup-row {
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sponsor-popup-row:last-child {
  border-bottom: none;
}

/* --- Left Category Label --- */
.sponsor-popup-label {
  flex-shrink: 0;
  width: 120px;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  letter-spacing: 1px;
}

.sponsor-popup-label span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.65;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* --- Right Logo Grid --- */
.sponsor-popup-logos {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: center;
  align-content: center;
}

.sponsor-popup-logos a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 12px 8px;
  min-height: 65px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.sponsor-popup-logos a:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.sponsor-popup-logos img {
  max-height: 72px;
  max-width: unset;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* =========================================
   贊助夥伴展開區塊 (foot-spons)
   藍色背景 + 左標題 + 右LOGO網格
   ========================================= */
.foot-spons {
  background: linear-gradient(180deg, #1a5fb4 0%, #0e56c2 30%, #0a3d8a 100%);
  border-radius: 24px;
  padding: 50px 40px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

/* 裝飾光暈 */
.foot-spons::before {
  content: "";
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 189, 233, 0.1) 0%, transparent 70%);
  top: -25vw;
  right: -15vw;
  z-index: 0;
  pointer-events: none;
}

.foot-spons .list.list-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0;
}

.foot-spons .list.list-main:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* 每個分類行 */
.foot-spons .list-impor {
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.foot-spons .list.list-main:last-child .list-impor:last-child,
.foot-spons .list-impor:last-child {
  border-bottom: none;
}

/* 左側分類標題 */
.foot-spons .list-impor .title {
  flex-shrink: 0;
  width: 130px;
  min-width: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  letter-spacing: 1px;
}

.foot-spons .list-impor .title b {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* 右側LOGO網格 */
.foot-spons .list-impor .spons {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  align-items: center;
}

.foot-spons .list-impor .spons a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 14px 10px;
  min-height: 70px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.foot-spons .list-impor .spons a:hover {
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.foot-spons .list-impor .spons img {
  max-height: 50px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* =========================================
   響應式調整 (Responsive)
   ========================================= */
@media (max-width: 1024px) {
  .sponsor-carousel {
    padding: 0 30px;
  }

  .foot-spons {
    padding: 40px 28px;
  }

  .foot-spons .list-impor .spons {
    grid-template-columns: repeat(5, 1fr);
  }

  .foot-spons .list-impor .title {
    width: 110px;
    min-width: 110px;
    font-size: 0.88rem;
  }
}

@media (max-width: 900px) {
  .sponsor-popup-logos {
    grid-template-columns: repeat(4, 1fr);
  }

  .sponsor-popup-content {
    padding: 40px 24px 30px;
  }

  .sponsor-popup-label {
    width: 100px;
    min-width: 100px;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .foot-spons {
    padding: 30px 16px;
    border-radius: 16px;
  }

  .foot-spons .list-impor {
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
  }

  .foot-spons .list-impor .title {
    width: 100%;
    min-width: unset;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
  }

  .foot-spons .list-impor .spons {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .foot-spons .list-impor .spons a {
    padding: 10px 8px;
    min-height: 60px;
  }

  .foot-spons .list-impor .spons img {
    max-height: 40px;
    max-width: 90px;
  }

  /* 彈窗手機版 */
  .sponsor-popup-row {
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
  }

  .sponsor-popup-label {
    width: 100%;
    min-width: unset;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
  }

  .sponsor-popup-logos {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .sponsor-popup-logos a {
    padding: 10px 6px;
    min-height: 55px;
  }

}

@media (max-width: 640px) {
  .sponsor-title {
    font-size: 2.6rem;
    margin-bottom: 24px;
  }

  .sponsor-carousel {
    padding: 0 20px;
  }

  .sponsor-carousel .sponsor-slide {
    height: 90px;
    padding: 8px 10px;
  }

  .sponsor-more-btn {
    padding: 14px 40px;
    font-size: 1rem;
    margin-top: 24px;
  }

  .sponsor-popup-content {
    padding: 16px;
    border-radius: 16px;
    max-height: 90vh;
  }
}

@media (max-width: 480px) {
  .foot-spons .list-impor .spons {
    grid-template-columns: repeat(2, 1fr);
  }

  .sponsor-popup-logos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 414px) {
  .sponsor-popup-overlay {
    padding: 20px 10px;
  }
}

/* Scrollbar styling for popup */
.sponsor-popup-content::-webkit-scrollbar {
  width: 5px;
}

.sponsor-popup-content::-webkit-scrollbar-track {
  background: transparent;
}

.sponsor-popup-content::-webkit-scrollbar-thumb {
  background: rgba(14, 86, 194, 0.15);
  border-radius: 3px;
}

.sponsor-popup-content::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 86, 194, 0.35);
}