/* 全站頁首橫幅（2026-10 改版）：跟首頁同一種漸變風格——照片鋪滿，下半部淡成頁面底色，
   深酒紅宋體標題＋英文副標放在淡出處，跟下面的內容之間沒有切線。
   各頁的 CSS（member.css、annou.css…）都帶舊版 #top-pic 規則而且載入得比較晚，
   所以這裡一律加 html 前綴提高優先序。 */

/* 照片要淡成純色才接得起來，內容區原本的點點底紋改成跟首頁一樣的米白純色 */
html #main {
  background: #f3f1ee !important;
  padding-top: 0;
}

html #top-pic {
  height: 360px;
  max-height: none;
  border-bottom: 0;
  text-align: left;
  background: #f3f1ee;
  color: #3a0a0e;
}

html #top-pic > div:first-child {
  position: absolute;
  inset: 0;
}

/* 取景高度可由頁面指定：@section('top_pic_pos', '35%')（top_pic.blade.php 設成 --top-pic-y） */
html #top-pic img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  object-position: center var(--top-pic-y, 45%);
}

/* 只有底部約三成往下淡成底色，照片露出比較多 */
html #top-pic .mask {
  height: 100%;
  background: linear-gradient(180deg,
    rgba(243, 241, 238, 0) 0%,
    rgba(243, 241, 238, 0) 68%,
    rgba(243, 241, 238, 0.6) 80%,
    rgba(243, 241, 238, 0.9) 90%,
    #f3f1ee 98%);
}

/* 標題後面一圈淡淡的光暈：底下照片比較雜時字也看得清楚 */
html #top-pic h1 {
  top: auto;
  bottom: 22px;
  text-shadow: 0 0 14px rgba(243, 241, 238, 0.9), 0 0 3px rgba(243, 241, 238, 0.9);
  left: 70px;
  right: 24px;
  margin: 0;
  transform: none;
  font-family: 'Noto Serif TC', 'Noto Serif CJK TC', serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.1em;
  text-align: left;
  color: #3a0a0e;
}

html #top-pic .top-pic-en {
  display: block;
  margin-top: 10px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.22em;
  color: #832e33;
}

/* ---- 左上角系名：中文下面加英文正式名稱（導覽列固定 40px 高，兩行剛好放得下） ---- */

html #top-nav .navbar-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.1;
}

html #top-nav .brand-zh {
  font-size: 1.18rem;
  letter-spacing: 0.04em;
}

html #top-nav .brand-en {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.72);
}

/* ---- 導覽列選單鎖在 40px 高 ----
   選單 ul 自己有一層同色底色，高度跟著字的行高走；Windows 的微軟正黑體行高較大，
   選單會比 40px 的導覽列高出幾 px，底色就凸出一截。桌機版固定高度、文字垂直置中。 */
@media (min-width: 768px) {
  html #top-nav .navbar-collapse,
  html #top-nav .navbar-nav {
    height: 40px;
  }

  html #top-nav .navbar-nav {
    align-items: center;
  }

  html #top-nav .navbar-nav > .nav-item {
    height: 40px;
    display: flex;
    align-items: center;
  }

  html #top-nav .navbar-nav > .nav-item > .nav-link {
    padding-top: 0;
    padding-bottom: 0;
    line-height: 40px;
  }
}

/* 768–1199px 選單本來就很擠，先藏英文；更窄時選單收進漢堡鍵，英文再出現 */
@media (min-width: 768px) and (max-width: 1199.98px) {
  html #top-nav .brand-en {
    display: none;
  }
}

@media (max-width: 767.98px) {
  html #top-nav .brand-en {
    font-size: 9px;
    letter-spacing: 0.03em;
  }

  html #top-pic {
    height: 240px;
  }

  html #top-pic img {
    object-position: 30% var(--top-pic-y, 45%);
  }

  html #top-pic .mask {
    background: linear-gradient(180deg,
      rgba(243, 241, 238, 0) 0%,
      rgba(243, 241, 238, 0) 60%,
      rgba(243, 241, 238, 0.68) 76%,
      rgba(243, 241, 238, 0.93) 88%,
      #f3f1ee 97%);
  }

  html #top-pic h1 {
    left: 20px;
    right: 16px;
    bottom: 16px;
    font-size: 30px;
  }

  html #top-pic .top-pic-en {
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: 0.2em;
  }
}

/* ---- 全站頁尾優化（2026-10）：保留原本深灰底＋斜方格，只整理排版 ----
   各頁 CSS 都帶舊版 #footer 規則，這裡一律加 html 前綴提高優先序 */

html #footer a {
  color: #d4d4d4;
}

html #footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* 原本只佔 2/3 寬、七欄排成 4＋3，改成一整排 */
html #footer > .container {
  flex: none;
  width: 100%;
  max-width: 1200px;
  padding: 40px 24px 30px;
}

html #footer > .container > .row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 28px 20px;
  margin: 0;
}

html #footer .footer-list {
  flex: none;
  width: auto;
  max-width: none;
  margin-top: 0;
  padding: 0;
}

html #footer .footer-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

html #footer .footer-list ul li {
  margin: 0 0 7px;
  list-style: none;
  font-size: 14px;
  line-height: 1.5;
}

/* 分類標題：白字＋細線，左邊一小段酒紅強調 */
html #footer .footer-list ul li:nth-child(1) {
  position: relative;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
}

html #footer .footer-list ul li:nth-child(1)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 26px;
  height: 2px;
  background: #c65f66;
}

/* 底列：左邊地址電話、右邊連結 */
html #footer #footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding: 12px max(24px, calc((100% - 1152px) / 2));
  font-size: 13.5px;
  color: #c4c4c4;
}

html #footer #footer-bottom .text-center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  text-align: left;
}

html #footer #footer-bottom .text-center span {
  margin-left: 0;
}

@media (max-width: 1199.98px) {
  html #footer > .container > .row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  html #footer > .container {
    padding: 28px 20px 20px;
  }

  html #footer > .container > .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 18px;
  }

  html #footer #footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 20px 16px;
  }

  html #footer #footer-bottom .text-center {
    gap: 2px 16px;
  }
}
