/* ==========================================================================
   Layout Styles (Header, Footer, Grid, Sidebar)
   ========================================================================== */

/* Wrapper */
.l-wrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Navigation (Modern Rewrite)
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 4rem; /* Standard height */
  background-color: var(--color-bg-light);
  border-bottom: 3px solid var(--color-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header__logo {
  flex-shrink: 0;
  width: 220px;
  display: flex;
  align-items: center;
}

.header__logo img {
  max-width: 100%;
  height: auto;
}

.header__nav {
  display: none;
}

.header__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-left: var(--spacing-md);
}

/* Overlay for Mobile Menu */
.header-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1098;
  opacity: 0;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.55);
  transition: all 0.5s ease-in-out;
}

.header-overlay.active {
  opacity: 1;
  visibility: visible;
}


/* ==========================================================================
   Footer
   ========================================================================== */

.l-footer {
  position: relative;
  background: var(--color-primary-hover) url("../../img/footer_bg.d73a56850531.webp") no-repeat center center;
  background-size: cover;
  color: var(--color-bg-white);
  font-size: 1.3125rem; /* 21px */
}

.l-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
}

.l-footer__title {
  font-size: 1.5rem; /* 24px */
  font-weight: 700;
  color: var(--color-bg-white);
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.l-footer__title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 3px; width: 48px;
  background: var(--color-secondary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.l-footer__col:hover .l-footer__title::after {
  width: 72px;
}

.l-footer__links {
  list-style: none;
  padding: 0; margin: 0;
}

.l-footer__links li {
  margin-bottom: 10px;
}

.l-footer__link {
  color: rgba(255, 255, 255, 0.90);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s, font-weight 0.1s;
}

.l-footer__link:hover {
  color: var(--color-bg-white);
  text-decoration: none;
  font-weight: 700;
}

.l-footer__contact {
  line-height: 1.8;
}

.l-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.l-footer__contact-item i {
  color: var(--color-bg-white);
  font-size: 1.25rem; /* 20px */
  width: 22px;
  flex-shrink: 0;
  margin-top: 3px;
}

.l-footer__contact-main {
  font-size: 1.1rem;
  color: var(--color-bg-white);
  font-weight: 600;
  margin: 0 0 2px 0;
}

.l-footer__contact-sub {
  font-size: 0.9375rem; /* 15px */
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  line-height: 1.5;
}

.l-footer__credits {
  font-size: 1.1rem; /* 20px */
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
}

.l-footer__social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.l-footer__social-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 46px; height: 46px;
  font-size: 1.375rem; /* 22px */
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-bg-white);
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
}

.l-footer__social-link:hover {
  color: var(--color-bg-white);
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* 社群品牌色：保留品牌原色，無對應全站變數 */
.l-footer__social-link--facebook:hover { background: #1877f2; border-color: #1877f2; }
.l-footer__social-link--youtube:hover  { background: #ff0000; border-color: #ff0000; }
.l-footer__social-link--line:hover     { background: #06c755; border-color: #06c755; }
.l-footer__social-link--map:hover      { background: #ea4335; border-color: #ea4335; }

.l-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  padding: 12px 0;
}

.l-footer__copyright {
  text-align: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.6;
  margin-bottom: 0;
}

.l-footer__copyright a {
  color: var(--color-bg-white);
  font-weight: 700;
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.l-footer__copyright a:hover {
  color: var(--color-bg-white);
  text-decoration: underline !important;
}

/* ==========================================================================
   Bottom Navigation (Mobile Only)
   ========================================================================== */
nav.bottom-nav::before {
    background-color: transparent;
}
.bottom-nav {
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--color-bg-white);
    border-top: 1px solid var(--color-border-light);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.75rem;
    padding: 8px 12px;
    transition: all 0.3s ease;
    flex: 1;
}
.bottom-nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}
.bottom-nav-item .fa-facebook,
.bottom-nav-item .fa-calendar-alt {
    color: #1877f2;
}
.bottom-nav-item .fa-envelope {
    color: var(--color-secondary);
}
.bottom-nav-item .fa-line {
    color: #06c755;
}
.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--color-primary);
}
.bottom-nav-item.active i {
    color: var(--color-primary);
}

/* Sub-page Layout */

.l-sub-layout__main {
  position: relative;
  z-index: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.l-sub__bg {
  background-color: var(--color-bg-white) !important;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.5)), 
    var(--bg-sub-page) !important;
  background-attachment: fixed !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  transition: background-position 0.1s ease-out;
}

/* Sidebar */
.l-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  z-index: 10;
  margin-bottom: 1rem;
}

/* Panel Container (Main Content) */
.l-container-panel {
  max-width: 82.5rem;
  width: 100%;
  margin: 0 auto;
  height: auto;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border-light);
  padding: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* 確保 article 能夠延伸 */
.l-container-panel article {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* 右側主要內容區塊 */
.l-main-content {
    background-color: var(--color-bg-white);
    padding: 0 10px 10px 10px;
    border: 1px solid var(--color-accent-peach);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* 內容區內部的白色主體 */
.l-main-content__body {
    background-color: var(--color-bg-white);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Responsive Header adjustments */
@media (min-width: 992px) {
  .header {
    min-height: 4.5rem;
  }
  
  .header__nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .l-sub-layout__main{
    padding: 2rem 0 2.5rem 0;
  }

  .l-container-panel{
    padding: 2rem;
  }

  .l-main-content {
    padding: 0 25px 25px 25px;
  }

  /* 【-- Bottom Nav --】 */
  .bottom-nav {
      display: none;
  }
}



