/* =========================================================
   臺北市排球協會 Website
   Bootstrap 5 + RWD
   ========================================================= */

:root {
  --tpvba-red: #d93636;
  --tpvba-red-dark: #a91f2a;
  --tpvba-blue: #172a68;
  --tpvba-blue-dark: #0e193f;
  --tpvba-blue-light: #284993;
  --tpvba-yellow: #ffd45a;
  --tpvba-ink: #172033;
  --tpvba-muted: #6b7280;
  --tpvba-light: #f5f7fb;
  --tpvba-border: #e5e9f1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--tpvba-ink);
  background: #fff;
  font-family: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
}

/* ============ Bootstrap Override ====================== */
.btn {
  border-radius: 10px;
  font-weight: 700;
}

.btn-primary {
  --bs-btn-bg: var(--tpvba-red);
  --bs-btn-border-color: var(--tpvba-red);
  --bs-btn-hover-bg: var(--tpvba-red-dark);
  --bs-btn-hover-border-color: var(--tpvba-red-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--tpvba-blue);
  --bs-btn-border-color: var(--tpvba-blue);
  --bs-btn-hover-bg: var(--tpvba-blue);
  --bs-btn-hover-border-color: var(--tpvba-blue);
}

.btn-outline-light {
  border-width: 1px;
}

.section-padding {
  padding: 40px 0;
}

.section-light {
  background: var(--tpvba-light);
}

/* ================== Header ====================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(14, 25, 63, 0.97);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
}

.navbar {
  padding: 12px 0;
}

.brand-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

.brand-text strong {
  display: block;
  color: #fff;
  font-size: 2.00rem;
  line-height: 1.15;
}

.brand-text small {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.55);
  font-size: 0.90rem;
  letter-spacing: .13em;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255,255,255,.78);
  font-weight: 500;
  padding: 8px 11px;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: #fff;
}

.member-btn {
  color: var(--tpvba-blue);
  font-weight: 800;
}

/* ================ Hero =============================== */
.hero-section {
    position: relative;
    overflow: hidden;

    min-height: 625px;

    background-image: url("../images/homeBanner.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* =================== 手機版 Banner ========================= */
@media (max-width: 767.98px) {
  .hero-section {
    min-height: 620px;

    background-image: url("../images/homeBannerMobile.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image:
    linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px);
  background-size: 50px 50px;
  transform: perspective(650px) rotateX(60deg) scale(1.4);
  transform-origin: center bottom;
}

.hero-row {
  min-height: 625px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: rgba(255,255,255,.7);
}

.hero-content h1 {
  margin: 18px 0;
  max-width: 760px;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.hero-content h1 span {
  display: block;
  color: var(--tpvba-yellow);
}

.hero-content p {
  max-width: 620px;
  margin-bottom: 30px;
  color: rgba(255,255,255,.78);
  font-size: 1.08rem;
}

.hero-buttons {
  display: flex;
  padding: 400px 0 0;
  flex-wrap: wrap;
  gap: 12px;
}

/* ================== Decorative Volleyball ===================== */
.hero-ball-area {
  position: relative;
  height: 520px;
}

.volleyball {
  position: absolute;
  z-index: 2;
  top: 115px;
  left: 115px;
  width: 230px;
  height: 230px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #ffffff 0, #dce2f3 30%, #8b97ba 72%, #56658e 100%);
  box-shadow:
    inset -20px -25px 40px rgba(34,47,91,.3),
    0 35px 70px rgba(0,0,0,.28);
}

.volleyball-line {
  position: absolute;
  border: 5px solid rgba(255,255,255,.78);
  border-radius: 50%;
}

.line-1 {
  width: 180px;
  height: 300px;
  left: 65px;
  top: -35px;
  transform: rotate(-35deg);
}

.line-2 {
  width: 270px;
  height: 180px;
  left: -20px;
  top: 20px;
  transform: rotate(30deg);
}

.line-3 {
  width: 160px;
  height: 270px;
  left: -15px;
  top: 70px;
  transform: rotate(62deg);
}

.line-4 {
  width: 270px;
  height: 270px;
  left: -20px;
  top: -15px;
  transform: rotate(-65deg);
  border-color: rgba(44,57,105,.45);
}

.ball-shadow {
  position: absolute;
  z-index: 1;
  left: 75px;
  bottom: 55px;
  width: 330px;
  height: 55px;
  border-radius: 50%;
  background: rgba(0,0,0,.25);
  filter: blur(25px);
}

.ball-ring {
  position: absolute;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 50%;
  width: 420px;
  height: 170px;
  top: 145px;
  left: 20px;
  transform: rotate(-25deg);
}

.ring-2 {
  transform: rotate(55deg);
  border-color: rgba(255,212,90,.4);
}

/* ======================= Quick Actions ========================== */
.quick-actions {
  position: relative;
  z-index: 5;
  margin-top: -58px;
}

.quick-card {
  min-height: 112px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  color: var(--tpvba-ink);
  background: #fff;
  border: 1px solid rgba(20,35,75,.06);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(20,35,75,.12);
  transition: transform .25s ease, box-shadow .25s ease;
}

.quick-card:hover {
  color: var(--tpvba-blue);
  transform: translateY(-6px);
  box-shadow: 0 22px 45px rgba(20,35,75,.16);
}

.quick-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--tpvba-red), var(--tpvba-red-dark));
  border-radius: 15px;
  font-size: 1.35rem;
}

.quick-card small {
  display: block;
  margin-bottom: 2px;
  color: var(--tpvba-muted);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.quick-card strong {
  display: block;
  font-size: 1.05rem;
}

/* ==================== Section ========================= */
.section-heading h2,
.section-heading-row h2,
.member-panel h2 {
  margin: 5px 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.2;
}

.section-heading p,
.section-heading-row p {
  margin: 0;
  color: var(--tpvba-muted);
}

.section-kicker {
  color: var(--tpvba-red);
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 35px;
}

.more-link {
  color: var(--tpvba-red);
  font-weight: 800;
  white-space: nowrap;
}

.more-link:hover {
  color: var(--tpvba-red-dark);
}

/* ============================ News ============================ */
.news-card {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--tpvba-border);
  border-radius: 20px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(20,35,75,.09);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.news-meta span {
  color: var(--tpvba-red);
  font-size: .9rem;
  font-weight: 800;
}

.news-meta time {
  color: var(--tpvba-muted);
  font-size: .85rem;
}

.news-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  font-weight: 800;
}

.news-card p {
  min-height: 78px;
  margin-bottom: 18px;
  color: var(--tpvba-muted);
}

/* ======================== About ================================= */
.about-logo-wrap {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
}

.about-logo {
  position: relative;
  z-index: 2;
  width: min(290px, 75%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 20px 55px rgba(20,35,75,.12);
}

.about-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(217,54,54,.2);
}

.about-circle-1 {
  width: 360px;
  height: 360px;
}

.about-circle-2 {
  width: 430px;
  height: 430px;
  border-color: rgba(23,42,104,.12);
}

.about-lead {
  max-width: 680px;
  margin: 18px 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.8;
}

.stat-card {
  padding: 18px;
  background: var(--tpvba-light);
  border-radius: 15px;
}

.stat-card strong {
  display: block;
  color: var(--tpvba-red);
  font-size: 1.55rem;
  line-height: 1.2;
}

.stat-card span {
  color: var(--tpvba-muted);
  font-size: .9rem;
}

/* ============================ Services ================================ */
.service-card {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--tpvba-border);
  border-radius: 20px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(20,35,75,.08);
}

.service-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: var(--tpvba-red);
  background: #fff1f1;
  border-radius: 16px;
  font-size: 1.7rem;
}

.service-card h3 {
  margin: 20px 0 10px;
  font-size: 1.2rem;
  font-weight: 800;
}

.service-card p {
  min-height: 72px;
  color: var(--tpvba-muted);
}

.service-card a {
  color: var(--tpvba-red);
  font-weight: 800;
}

/* ========================== Competition =========================== */
.competition-section {
  padding: 100px 0;
  color: #000;
  /*background:
    radial-gradient(circle at 85% 30%, rgba(255,255,255,.12), transparent 25%),
    linear-gradient(115deg, var(--tpvba-blue), #263f87 62%, var(--tpvba-red-dark));*/
}

.competition-section h2 {
  margin: 8px 0 15px;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
}

.competition-section p {
  max-width: 680px;
  color: rgba(255,255,255,.75);
}

.match-preview {
  padding: 28px;
  background: rgba(255,255,255,.97);
  color: var(--tpvba-ink);
  border-radius: 20px;
  box-shadow: 0 25px 55px rgba(0,0,0,.16);
}

.match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
  color: var(--tpvba-muted);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.match-status {
  padding: 5px 10px;
  color: #16834c;
  background: #e9f8ef;
  border-radius: 999px;
  letter-spacing: 0;
}

.match-preview h3 {
  margin-bottom: 20px;
  font-size: 1.35rem;
  font-weight: 900;
}

.match-info > div {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  color: var(--tpvba-muted);
}

.match-info i {
  color: var(--tpvba-red);
}

/* ======================== Registration ======================== */
.registration-card {
  height: 100%;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--tpvba-border);
  border-radius: 20px;
}

.registration-type {
  display: inline-block;
  margin-bottom: 15px;
  padding: 5px 10px;
  color: var(--tpvba-red);
  background: #fff0f0;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}

.registration-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.registration-card p {
  color: var(--tpvba-muted);
}

.registration-date {
  color: var(--tpvba-muted);
  font-size: .9rem;
}

.registration-date i {
  margin-right: 6px;
  color: var(--tpvba-red);
}

/* ============================= Member ========================== */
.member-section {
  padding: 0 0 100px;
}

.member-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 10px;
  background: linear-gradient(135deg, #f4f7fc, #fff);
  border: 1px solid var(--tpvba-border);
  border-radius: 25px;
}

.member-panel p {
  margin: 8px 0 0;
  color: var(--tpvba-muted);
}

.member-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ========================== Contact ============================ */
.contact-info {
  margin-top: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 0;
  border-bottom: 1px solid var(--tpvba-border);
}

.contact-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--tpvba-red);
  background: #fff0f0;
  border-radius: 13px;
}

.contact-item small {
  display: block;
  color: var(--tpvba-muted);
}

.contact-item strong {
  display: block;
}

.contact-form {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--tpvba-border);
  border-radius: 22px;
  box-shadow: 0 15px 45px rgba(20,35,75,.06);
}

.form-label {
  font-weight: 700;
}

.form-control {
  padding: 12px 15px;
  border-radius: 11px;
  border-color: #dfe4ed;
}

.form-control:focus {
  border-color: var(--tpvba-blue);
  box-shadow: 0 0 0 .2rem rgba(23,42,104,.1);
}

/* ======================== Footer ============================ */
.site-footer {
  color: #fff;
  background: #101936;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.footer-brand img {
  width: 58px;
  height: 58px;
  padding: 3px;
  background: #fff;
  border-radius: 50%;
}

.footer-brand h5 {
  margin: 0;
  font-weight: 800;
}

.footer-brand small {
  color: rgba(255,255,255,.5);
}

.footer-description {
  max-width: 500px;
  margin: 0;
  color: rgba(255,255,255,.55);
}

.site-footer h6 {
  margin-bottom: 18px;
  font-weight: 800;
}

.site-footer .col-lg-2 a {
  display: block;
  margin-bottom: 9px;
  color: rgba(255,255,255,.58);
}

.site-footer .col-lg-2 a:hover {
  color: #fff;
}

.social-links {
  display: flex;
  gap: 9px;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  transition: .2s ease;
}

.social-links a:hover {
  color: var(--tpvba-blue);
  background: #fff;
}

.footer-bottom {
  padding: 15px 0;
  color: rgba(255,255,255,.4);
  background: #0a1129;
  font-size: .8rem;
}

/* ======================= Responsive ========================= */
@media (max-width: 991.98px) {
  .hero-section {
    min-height: 600px;
  }

  .hero-row {
    min-height: 600px;
  }

  .navbar-nav {
    padding-top: 15px;
  }

  .member-btn {
    display: inline-block;
  }

  .section-padding {
    padding: 75px 0;
  }

  .quick-actions {
    margin-top: -35px;
  }

  .member-section {
    padding-bottom: 75px;
  }

  .member-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 767.98px) {
  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .brand-text strong {
    font-size: 1.25rem;
  }

  .brand-text small {
    font-size: .48rem;
  }

  .hero-section,
  .hero-row {
    min-height: 570px;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-logo-wrap {
    min-height: 330px;
  }

  .about-circle-1 {
    width: 290px;
    height: 290px;
  }

  .about-circle-2 {
    width: 340px;
    height: 340px;
  }

  .member-panel {
    padding: 30px;
  }
}

@media (max-width: 575.98px) {
  .navbar {
    padding: 9px 0;
  }

  .brand-text small {
    display: none;
  }

  .hero-content h1 {
    font-size: 2.35rem;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .quick-actions {
    margin-top: -25px;
  }

  .quick-card {
    min-height: 92px;
    padding: 14px;
    gap: 10px;
  }

  .quick-icon {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .quick-card strong {
    font-size: .92rem;
  }

  .quick-card small {
    font-size: .56rem;
  }

  .section-padding {
    padding: 60px 0;
  }

  .about-logo {
    width: 230px;
  }

  .about-circle-1 {
    width: 260px;
    height: 260px;
  }

  .about-circle-2 {
    width: 300px;
    height: 300px;
  }

  .competition-section {
    padding: 70px 0;
  }

  .match-preview,
  .contact-form,
  .member-panel {
    padding: 24px;
  }

  .member-buttons {
    width: 100%;
  }

  .member-buttons .btn {
    width: 100%;
  }
}

/* ============= 會員登入資訊 =============== */
.member-user-area {
  margin-left: 10px;
}

.member-name {
  white-space: nowrap;
}

.logout-form {
  margin: 0;
}

.logout-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* ==================== 手機版 ================== */
@media (max-width: 991.98px) {
  .member-user-area {
    margin-left: 0;
    margin-top: 10px;
  }

  .member-name {
    display: inline-block;
    color: #fff !important;
  }

  .logout-form {
    display: inline-block;
  }

  .logout-btn {
    display: inline-block;
    color: #ffd800 !important;
  }
}

/* ========================================
   電腦版 Navbar
   第一行：主選單 + 會員專區
   第二行：會員名稱 + 登出
======================================== */
@media (min-width: 992px) {
  /* 右側整體 */
  .navbar-right-area {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;  /* 不讓整個右側被壓縮 */
  }

  /* =============== 第一行 ================== */
  .navbar-menu-row {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    white-space: nowrap;
  }

  .navbar-menu-row .navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  /* ================= 第二行 =============== */
  .navbar-member-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;        /* 非常重要：禁止會員名稱、登出換行 */
    white-space: nowrap;
    gap: 16px;
    margin-top: 4px;
    min-height: 28px;
  }

  /* 會員名稱 */
  .navbar-member-row .member-name {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    color: #ffffff !important;
    font-size: 16px;
    line-height: 1.5;
  }

  /* 登出 */
  .navbar-member-row .logout-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
  }

  .navbar-member-row .logout-btn {
    display: inline-block;
    border: 0;
    background: transparent;
    color: #ffd800 !important;
    padding: 0;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
  }
}

/* Navbar 背景 */
.tpvba-navbar {
  background-color: #17244f;
}

/* Navbar 文字 */
.tpvba-navbar .nav-link {
  color: #ffffff;
}

/* Navbar 滑鼠移上去 */
.tpvba-navbar .nav-link:hover {
  color: #ffffff;
}

/* 協會名稱 */
.tpvba-navbar .brand-text strong {
  color: #ffffff;
}

.tpvba-navbar .brand-text small {
  color: rgba(255, 255, 255, 0.6);
}

/* 會員專區 */
.tpvba-navbar .btn-member {
  background-color: #ffffff;
  color: #17244f;
}

/* ========== 首頁中間內容 ============ */
.home-content {
  background: #f4f6fa;
  padding: 32px 0 55px;
}

/* ========== 最新消息 ================ */
.home-news {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.home-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 3px solid #17244f;
}

.home-section-title > span {
  color: #17244f;
  font-size: 1.5rem;
  font-weight: 800;
}

.home-section-title > a {
  color: #17244f;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.home-section-title > a:hover {
  color: #d62839;
}

/* ========== 最新消息列表 ============== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item {
  display: flex;
  align-items: center;
  min-height: 105px;
  background: #ffffff;
  border: 1px solid #d9dde4;
  border-left: 5px solid #17244f;
  border-radius: 5px;
  padding: 14px 18px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.news-item:hover {
  border-left-color: #d62839;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  transform: translateX(3px);
}

/* 日期 */
.news-item-date {
  flex: 0 0 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-right: 1px solid #e1e3e7;
}

.news-item-date strong {
  color: #17244f;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.news-item-date span {
  color: #888;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15;
}

/* 消息內容 */
.news-item-content {
  flex: 1;
  padding-left: 20px;
}

.news-category {
  display: inline-block;
  margin-bottom: 5px;
  color: #d62839;
  font-size: 0.72rem;
  font-weight: 800;
}

.news-item-content h3 {
  margin: 0;
  color: #222;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}

.news-item-content p {
  margin: 3px 0 0;
  color: #888;
  font-size: 0.82rem;
}

.news-arrow {
  color: #aaa;
  font-size: 1.1rem;
}

/* =========== 會員專區 ============== */
.member-panel {
  overflow: hidden;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* 紅色標題 */
.member-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #d62839;
  color: #ffffff;
  padding: 14px 17px;
  font-size: 1.05rem;
  font-weight: 800;
}

.member-panel-title i {
  font-size: 1.1rem;
}

/* 會員內容 */
.member-panel-body {
  padding: 18px;
}

.member-input {
  margin-bottom: 15px;
}

.member-input label {
  display: block;
  margin-bottom: 6px;
  color: #555;
  font-size: 0.85rem;
  font-weight: 700;
}

.member-input label i {
  width: 18px;
  color: #d62839;
}

.member-input .form-control {
  border-radius: 4px;
  border: 1px solid #d5d8dd;
  font-size: 0.9rem;
}

.member-input .form-control:focus {
  border-color: #d62839;
  box-shadow: 0 0 0 0.15rem rgba(214, 40, 57, 0.12);
}

/* 記住我 */
.member-option {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
  color: #777;
  font-size: 0.8rem;
}

/* 登入按鈕 */
.member-login {
  width: 100%;
  padding: 9px;
  background: #d62839;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  transition: background 0.2s ease;
}

.member-login:hover {
  background: #b51f30;
}

/* 會員連結 */
.member-links {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.member-links a {
  color: #777;
  font-size: 0.78rem;
  text-decoration: none;
}

.member-links a:hover {
  color: #d62839;
}

/* =========================== 右側功能卡片 ================================= */
.home-service-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 15px;
  background: #ffffff;
  border-radius: 8px;
  text-decoration: none;
  color: #17244f;
  border-top: 3px solid #17244f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.home-service-card:hover {
  color: #17244f;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.1rem;
}

.service-icon.competition {
  background: #17244f;
}

.service-icon.news {
  background: #d62839;
}

.service-icon.registration {
  background: #17244f;
}

.home-service-card small {
  display: block;
  color: #999;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.home-service-card strong {
  display: block;
  margin-top: 2px;
  color: #333;
  font-size: 0.95rem;
}

/* =================== RWD ==================== */
@media (max-width: 991.98px) {
  .home-content {
    padding: 25px 0 45px;
  }
}

@media (max-width: 575.98px) {
  .home-news {
    padding: 16px;
  }

  .home-section-title > span {
    font-size: 1.3rem;
  }

  .news-item {
    align-items: flex-start;
    padding: 13px;
  }

  .news-item-date {
    flex: 0 0 60px;
    display: block;
    text-align: center;
  }

  .news-item-date strong {
    display: block;
    font-size: 1.5rem;
  }

  .news-item-date span {
    display: block;
  }

  .news-item-content {
    padding-left: 12px;
  }

  .news-item-content h3 {
    font-size: 0.95rem;
  }

  .news-item-content p {
    display: none;
  }

  .news-arrow {
    display: none;
  }
}

/* ======================== 首頁會員專區 - 最終版 ============================= */
.member-panel {
  display: block !important;
  width: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e1e5eb;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* 會員專區標題 */
.member-panel-title {
  display: flex !important;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  box-sizing: border-box;
  padding: 14px 18px;
  background: #d62839;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
}

.member-panel-title i {
  flex: 0 0 auto;
  font-size: 1.1rem;
}

/* 會員內容 */
.member-panel-body {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
}

/* 帳號 / 密碼 */
.member-input {
  display: block;
  width: 100%;
  margin-bottom: 16px;
}

.member-input label {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  color: #444;
  font-size: 0.9rem;
  font-weight: 700;
}

.member-input label i {
  display: inline-block;
  width: 20px;
  color: #d62839;
}

.member-input .form-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  border: 1px solid #d5d8dd;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.member-input .form-control:focus {
  border-color: #d62839;
  box-shadow: 0 0 0 0.15rem rgba(214, 40, 57, 0.12);
}

/* 記住我 */
.member-option {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 12px;
  color: #777;
  font-size: 0.8rem;
}

.member-option label {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 登入 */
.member-login {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 9px;
  background: #d62839;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.member-login:hover {
  background: #b51f30;
  color: #ffffff;
}

/* 註冊 / 忘記密碼 */
.member-links {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 12px;
}

.member-links a {
  color: #777;
  font-size: 0.8rem;
  text-decoration: none;
}

.member-links a:hover {
  color: #d62839;
}

/* ============== Navbar Dropdown =================== */
.main-navbar .dropdown-menu {
  border: none;
  border-radius: 10px;
  padding: 8px;
  min-width: 190px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 下拉選單文字 */
.main-navbar .dropdown-item {
  padding: 10px 15px;
  font-size: 15px;
  color: #172451;
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* 滑鼠移過 */
.main-navbar .dropdown-item:hover {
  background-color: #f1f3f8;
  color: #d9273f;
}

/* Dropdown 箭頭 */
.main-navbar .dropdown-toggle::after {
  margin-left: 6px;
  vertical-align: middle;
}

/* 最新消息完整列表 */
.news-table-list {
  width: 100%;
  border-top: 1px solid #e5e7eb;
}

.news-table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 12px;
  min-height: 33px;
  color: #52657b;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.news-table-row:nth-child(odd) {
  background-color: #f1f1f1;
}

.news-table-row:nth-child(even) {
  background-color: #ffffff;
}

.news-table-row:hover {
  background-color: #e8edf5;
  color: #172d50;
}

.news-table-title {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.6;
}

.news-table-date {
  flex-shrink: 0;
  min-width: 100px;
  text-align: right;
  color: #172d50;
  font-size: 15px;
  white-space: nowrap;
}

.news-pagination {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.news-pagination .pagination {
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  margin-bottom: 0;
}

.news-pagination .page-link {
  border: 0;
  color: #26364b;
  border-radius: 3px;
  padding: 7px 11px;
}

.news-pagination .page-item.active .page-link {
  background-color: #ed6872;
  color: #ffffff;
}

.news-pagination .page-link:focus {
  box-shadow: none;
}

/* 手機版 */
@media (max-width: 575.98px) {
  .news-table-row {
    gap: 12px;
    padding: 10px 8px;
  }

  .news-table-title {
    font-size: 14px;
  }

  .news-table-date {
    min-width: 82px;
    font-size: 13px;
  }
}

.custom-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.custom-pagination .page-link {
  border: none;
  border-radius: 3px !important;
  background: transparent;
  color: #26364b;
  padding: 5px 9px;
  line-height: 1.5;
  box-shadow: none;
}

.custom-pagination .page-item.active .page-link {
  background-color: #ed6872;
  color: #fff;
}

.custom-pagination .page-item.disabled .page-link {
  background: transparent;
  color: #999;
}

.custom-pagination .page-link:hover {
  background-color: #f1f1f1;
  color: #26364b;
}

.custom-pagination .page-item.active .page-link:hover {
  background-color: #ed6872;
  color: #fff;
}

/* 最新消息詳細內容 */
.news-detail {
  max-width: 1000px;
  margin: 0 auto;
  padding: 36px 40px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.news-detail-header {
  margin-bottom: 24px;
}

.news-detail-title {
  color: #172d50;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}

.news-detail-date {
  color: #7b8794;
  font-size: 14px;
}

.news-detail-content {
  color: #444e5b;
  font-size: 16px;
  line-height: 2;
  overflow-wrap: anywhere;
  min-height: 200px;
}

@media (max-width: 575.98px) {
  .news-detail {
    padding: 24px 18px;
  }

  .news-detail-title {
    font-size: 23px;
  }

  .news-detail-content {
    font-size: 15px;
  }
}

/* ==============================
   搜尋區域
============================== */

.competition-search {
    padding: 0;
}

.competition-search .form-label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.competition-search .form-control,
.competition-search .form-select {
    min-height: 48px;
    border-radius: 10px;
    background-color: #f3f3f3;
    border: 1px solid #eeeeee;
    padding-left: 15px;
}

.competition-search .form-control:focus,
.competition-search .form-select:focus {
    background-color: #fff;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, .15);
}

/* ==============================
   搜尋按鈕
============================== */

.btn-search {
    min-height: 48px;
    padding: 0 25px;
    border-radius: 10px;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    color: #fff;
    font-weight: 600;
}

.btn-search:hover,
.btn-search:focus {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: #fff;
}

.btn-clear {
    min-height: 48px;
    padding: 0 25px;
    border-radius: 10px;
    background-color: #f3f3f3;
    border: 1px solid #f3f3f3;
    color: #333;
    font-weight: 600;
}

.btn-clear:hover {
    background-color: #e7e7e7;
    border-color: #ddd;
    color: #333;
}

/* ==============================
   外部賽事說明
============================== */

.external-info-notice {
    padding: 12px 16px;
    border-radius: 8px;
    background-color: #eaf2ff;
    color: #31569a;
    font-size: 14px;
}

.external-info-notice i {
    margin-right: 6px;
}

/* ==============================
   搜尋結果數量
============================== */

.competition-result-count {
    color: #777;
    font-size: 14px;
}

.competition-result-count strong {
    color: #0d6efd;
    font-size: 17px;
}

/* ==============================
   月份標題
============================== */

.competition-month-heading {
    margin-top: 28px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.competition-month-heading h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 23px;
    font-weight: 700;
    color: #252b33;
}

.competition-month-heading i {
    color: #0d6efd;
}

/* ==============================
   賽事列表
============================== */

.competition-month-list {
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background-color: #fff;
}

/* ==============================
   單筆賽事卡片
============================== */

.external-competition-card {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 185px;
    padding: 20px;
    background-color: #fff;
}

.external-competition-card + .external-competition-card {
    border-top: 1px solid #eaeaea;
}

/* ==============================
   賽事圖片
============================== */

.competition-image {
    flex: 0 0 200px;
    width: 200px;
    height: 115px;
    overflow: hidden;
    border-radius: 10px;
}

.competition-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.competition-image img:hover {
    transform: scale(1.05);
}

.competition-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f1f3f5;
    color: #6c757d;
    font-size: 42px;
}

/* ==============================
   賽事文字
============================== */

.competition-content {
    flex: 1;
    min-width: 0;
}

.competition-title {
    margin-bottom: 8px;
    color: #252b33;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}

.competition-organizer {
    margin-bottom: 8px;
    color: #777;
    font-size: 14px;
}

.competition-organizer i {
    margin-right: 5px;
}

.competition-info-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 7px;
    color: #666;
    font-size: 14px;
}

.competition-info-row i {
    margin-right: 4px;
}

/* ==============================
   地點
============================== */

.info-location {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 20px;
    background-color: #e8efff;
    color: #31569a;
    line-height: 1.5;
}

/* ==============================
   報名期間
============================== */

.info-registration {
    color: #0d6efd;
    font-weight: 600;
}

/* ==============================
   比賽日期
============================== */

.info-date {
    color: #31569a;
    font-weight: 600;
}

/* ==============================
   報名費
============================== */

.info-fee {
    color: #dc3545;
    font-weight: 600;
}

/* ==============================
   賽事狀態
============================== */

.competition-status {
    display: flex;
    flex: 0 0 145px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* 報名中：藍色 */

.status-open {
    background-color: #0d6efd;
    color: #fff;
}

/* 尚未開放：紅色 */

.status-upcoming {
    background-color: #fce8e8;
    color: #dc3545;
}

/* 報名截止：灰色 */

.status-closed {
    background-color: #eeeeee;
    color: #777;
}

/* 報名資訊未提供：灰色 */

.status-unknown {
    background-color: #f1f3f5;
    color: #6c757d;
}

.external-status-note {
    color: #999;
    font-size: 11px;
}

/* ==============================
   無搜尋結果
============================== */

.competition-empty {
    padding: 60px 20px;
    text-align: center;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background-color: #fff;
}

.competition-empty > i {
    color: #aaa;
    font-size: 48px;
}

.competition-empty h5 {
    margin-top: 15px;
    color: #444;
    font-weight: 700;
}

.competition-empty p {
    color: #888;
}

.competition-empty .btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

.competition-empty .btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* ==============================
   手機版 RWD
============================== */

@media (max-width: 767px) {

    .competition-month-heading h4 {
        font-size: 20px;
    }

    .external-competition-card {
        flex-wrap: wrap;
        gap: 12px;
        padding: 15px;
    }

    .competition-image {
        flex: 0 0 115px;
        width: 115px;
        height: 90px;
    }

    .competition-content {
        flex: 1 1 calc(100% - 130px);
    }

    .competition-title {
        font-size: 16px;
    }

    .competition-organizer,
    .competition-info-row {
        font-size: 13px;
    }

    .competition-status {
        flex: 1 1 100%;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }

    .status-badge {
        padding: 7px 14px;
    }

    .external-status-note {
        font-size: 11px;
    }
}

@media (max-width: 400px) {

    .competition-image {
        flex: 0 0 100px;
        width: 100px;
        height: 80px;
    }

    .competition-content {
        flex-basis: calc(100% - 112px);
    }

    .competition-info-row {
        gap: 5px;
    }
}

.schedule-table {
    min-width: 1100px;
    border-color: #555;
}

.schedule-table th {
    background-color: #f2f2f2;
    vertical-align: middle;
    white-space: nowrap;
}

.schedule-table td {
    min-width: 210px;
    height: 150px;
    vertical-align: middle;
}

.schedule-cell {
    padding: 10px 6px !important;
}

.score-input {
    width: 48px;
    text-align: center;
    padding: 3px;
}

.score-total {
    font-size: 18px;
}

/* Excel 式賽程表 */
.schedule-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
}

.schedule-table {
    min-width: 1000px;
    margin-bottom: 0;
    background: #fff;
}

/* 表頭 */
.schedule-table thead th {
    background: #edf1f7;
    color: #26344d;
    padding: 14px 10px;
    white-space: nowrap;
    vertical-align: middle;
}

.schedule-table .time-column {
    width: 110px;
    min-width: 110px;
    background: #f5f6f8;
    font-weight: 700;
}

.schedule-table .venue-column {
    min-width: 260px;
}

/* 比賽儲存格 */
.schedule-table .schedule-cell {
    min-width: 260px;
    padding: 10px;
    vertical-align: top;
}

/* 單場比賽 */
.match-card {
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    text-align: left;
}

.match-card:last-child {
    margin-bottom: 0;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

/* 隊伍及比分 */
.match-score {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.team-name {
    font-weight: 600;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.team-a {
    text-align: left;
}

.team-b {
    text-align: right;
}

.score-result {
    font-size: 20px;
    font-weight: 800;
    color: #b42332;
    white-space: nowrap;
}

/* 每局比分 */
.set-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 12px;
}

.set-score {
    padding: 4px 7px;
    border-radius: 5px;
    background: #f1f3f5;
    color: #495057;
    font-size: 11px;
    white-space: nowrap;
}

.match-note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    color: #6c757d;
    font-size: 12px;
}
