/* ══════════════════════════════════════════════════
   社團法人暖晴社會福利協會 — 共用樣式
   背心天藍色系 #4182BE
══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap');

/* ── 色彩變數 ── */
:root {
  --vest:         #00A0E9;   /* 主藍（主色）*/
  --vest-deep:    #0077B6;   /* 深藍（標題）*/
  --vest-darker:  #005588;   /* 最深藍（hover、footer）*/
  --vest-light:   #B3E0F7;   /* 淡藍 */
  --vest-pale:    #E0F4FD;   /* 極淡藍 */
  --vest-cream:   #F0FAFF;   /* 頁面底色 */
  --logo-pink:    #E5607A;   /* Logo 粉紅雲 */
  --logo-yellow:  #FFC700;   /* Logo 黃太陽 */
  --green:        #52B788;
  --red:          #E05050;
  --text-main:    #0D2F45;
  --text-soft:    #3F6782;
  --white:        #FFFFFF;
  --shadow:       rgba(13,47,69,0.10);
  --nav-h:        72px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  background: var(--white);
  color: var(--text-main);
  line-height: 1.8;
  padding-top: var(--nav-h);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ══════════════════════════════════════════════════
   導覽列
══════════════════════════════════════════════════ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 3px solid var(--vest);
  box-shadow: 0 2px 16px var(--shadow);
  z-index: 1000;
  display: flex; align-items: center;
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; width: 100%;
  padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.nav-logo img { height: 44px; width: auto; }
.nav-logo-text {
  display: flex; flex-direction: column; line-height: 1.2;
}
.nav-logo-text .org  { font-size: 0.7rem; color: var(--text-soft); }
.nav-logo-text .name { font-size: 1rem; font-weight: 700; color: var(--vest-deep); }
.nav-links {
  display: flex; gap: 4px; margin-left: auto;
}
.nav-links a {
  color: var(--text-soft); font-weight: 500; font-size: 0.92rem;
  padding: 6px 14px; border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-links a:hover  { color: var(--vest-deep); background: var(--vest-pale); }
.nav-links a.active { color: var(--vest-deep); font-weight: 700; background: var(--vest-pale); }
.nav-cta {
  background: var(--logo-pink) !important;
  color: var(--white) !important;
  border-radius: 20px !important;
  font-weight: 700 !important;
  padding: 7px 20px !important;
  box-shadow: 0 3px 10px rgba(229,96,122,0.35);
  transition: background 0.2s !important, transform 0.15s !important;
}
.nav-cta:hover { background: #c94060 !important; transform: translateY(-1px); }

/* ── Hamburger ── */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px; margin-left: auto;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--vest-deep); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Nav Overlay ── */
.mobile-nav {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 999;
  flex-direction: column;
  padding: 32px 24px;
  gap: 8px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 1.2rem; font-weight: 600;
  color: var(--text-main); padding: 14px 0;
  border-bottom: 1px solid var(--vest-pale);
}
.mobile-nav a:hover { color: var(--vest-deep); }
.mobile-nav .mobile-cta {
  margin-top: 16px;
  background: var(--logo-pink);
  color: var(--white) !important;
  border-radius: 12px;
  padding: 16px 0 !important;
  text-align: center;
  border-bottom: none !important;
}

/* ══════════════════════════════════════════════════
   頁面 Hero（子頁共用）
══════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, var(--vest-deep) 0%, var(--vest) 60%, #33B5EE 100%);
  padding: 56px 24px;
  color: var(--white);
  text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 40px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-hero .breadcrumb {
  font-size: 0.82rem; opacity: 0.75; margin-bottom: 10px;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900; margin-bottom: 12px;
}
.page-hero p { font-size: 1rem; opacity: 0.88; max-width: 560px; margin: 0 auto; }

/* ══════════════════════════════════════════════════
   Section 通用
══════════════════════════════════════════════════ */
.section { padding: 72px 24px; }
.section-light  { background: var(--white); }
.section-tinted { background: var(--vest-cream); }
.section-pale   { background: var(--vest-pale); }
.container { max-width: 1120px; margin: 0 auto; }

.section-badge {
  display: inline-block;
  background: var(--vest-pale);
  color: var(--vest-deep);
  border: 1.5px solid var(--vest-light);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 0.8rem; font-weight: 700;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800; color: var(--vest-deep);
  margin-bottom: 10px;
}
.section-desc {
  color: var(--text-soft);
  max-width: 560px;
  font-size: 0.97rem;
  margin-bottom: 48px;
}
.section-head-center { text-align: center; }
.section-head-center .section-desc { margin: 0 auto 48px; }

/* ══════════════════════════════════════════════════
   按鈕
══════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 28px; padding: 12px 28px;
  font-size: 0.95rem; font-weight: 700; border: none;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--vest), var(--vest-deep));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0,160,233,0.38);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(0,160,233,0.48); }
.btn-pink {
  background: var(--logo-pink);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(229,96,122,0.38);
}
.btn-pink:hover { background: #c94060; }
.btn-outline {
  background: transparent;
  color: var(--vest-deep);
  border: 2px solid var(--vest);
}
.btn-outline:hover { background: var(--vest); color: var(--white); }
.btn-white {
  background: var(--white);
  color: var(--vest-deep);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* ══════════════════════════════════════════════════
   卡片
══════════════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 4px 18px var(--shadow);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 32px rgba(13,47,69,0.14);
}
.card-body { padding: 28px 24px; }

/* ══════════════════════════════════════════════════
   Footer
══════════════════════════════════════════════════ */
.site-footer {
  background: var(--vest-darker);
  color: rgba(255,255,255,0.85);
}
.footer-top {
  max-width: 1120px; margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.footer-brand img { height: 36px; filter: brightness(0) invert(1) opacity(0.9); margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.8; opacity: 0.78; margin-bottom: 18px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
}
.footer-socials a:hover { background: var(--vest); transform: translateY(-2px); }
.footer-col h4 {
  font-size: 0.88rem; font-weight: 700;
  color: var(--logo-yellow);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { font-size: 0.85rem; opacity: 0.78; transition: opacity 0.2s; }
.footer-col ul a:hover { opacity: 1; }
.footer-contact-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.85rem; margin-bottom: 10px; opacity: 0.82;
}
.footer-contact-item .ico { flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center; padding: 20px 24px;
  font-size: 0.8rem; opacity: 0.6;
}

/* ══════════════════════════════════════════════════
   彈窗（活動詳情）
══════════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(13,47,69,0.55);
  z-index: 2000; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--white); border-radius: 24px;
  max-width: 520px; width: 100%; padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(13,47,69,0.3);
  position: relative; animation: popIn 0.25s ease;
}
@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.modal-close {
  position: absolute; top: 16px; right: 18px;
  background: var(--vest-pale); border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; color: var(--text-soft);
}
.modal-close:hover { background: var(--vest); color: var(--white); }
.modal-box h2 { color: var(--vest-deep); font-size: 1.25rem; margin-bottom: 14px; }
.modal-meta {
  background: var(--vest-pale); border-radius: 12px;
  padding: 14px 16px; font-size: 0.86rem; color: var(--text-soft);
  margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px;
}
.modal-desc { font-size: 0.92rem; color: var(--text-soft); line-height: 1.8; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; }
.modal-reg-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--vest), var(--vest-deep));
  color: var(--white); border: none; border-radius: 22px;
  padding: 12px; font-size: 0.95rem; font-weight: 700;
}
.modal-reg-btn:hover { opacity: 0.88; }
.modal-reg-btn:disabled { background: #ccc; cursor: not-allowed; }
.modal-cancel {
  flex: 0 0 auto; background: var(--vest-pale);
  color: var(--text-soft); border: none; border-radius: 22px;
  padding: 12px 20px; font-size: 0.92rem; font-weight: 600;
}

/* ══════════════════════════════════════════════════
   活動卡（events.html）
══════════════════════════════════════════════════ */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.event-card {
  background: var(--white); border-radius: 18px;
  overflow: hidden; box-shadow: 0 3px 14px var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: column;
}
.event-card:hover { transform: translateY(-5px); box-shadow: 0 10px 28px rgba(13,47,69,0.14); }
.event-header {
  padding: 20px 22px 14px; border-bottom: 1px solid var(--vest-pale);
  display: flex; align-items: flex-start; gap: 14px;
}
.event-date-box {
  background: linear-gradient(135deg, var(--vest), var(--vest-deep));
  color: var(--white); border-radius: 12px;
  padding: 8px 12px; text-align: center; min-width: 54px; flex-shrink: 0;
}
.event-date-box .month { font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; }
.event-date-box .day   { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.event-title h3 { font-size: 1rem; font-weight: 700; color: var(--vest-deep); margin-bottom: 4px; }
.event-type-tag {
  font-size: 0.74rem; background: var(--vest-pale);
  color: var(--vest-deep); padding: 2px 10px;
  border-radius: 10px; display: inline-block; font-weight: 600;
}
.event-body { padding: 16px 22px 20px; flex: 1; }
.event-body p { font-size: 0.88rem; color: var(--text-soft); margin-bottom: 14px; }
.event-meta { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--text-soft); }
.event-footer {
  padding: 12px 22px; border-top: 1px solid var(--vest-pale);
  display: flex; justify-content: space-between; align-items: center;
}
.status-badge { font-size: 0.78rem; font-weight: 700; padding: 4px 12px; border-radius: 12px; }
.status-open  { background: #D5F0E0; color: #1B6B3A; }
.status-full  { background: #FDE8E8; color: #C0392B; }
.status-soon  { background: #FFF3C4; color: #8A6200; }
.status-ended { background: #EFEFEF; color: #888; }
.event-detail-btn { font-size: 0.85rem; color: var(--vest); font-weight: 600; cursor: pointer; }
.event-detail-btn:hover { color: var(--vest-deep); text-decoration: underline; }

/* ══════════════════════════════════════════════════
   RWD
══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links     { display: none; }
  .nav-hamburger { display: flex; }
  .section { padding: 52px 20px; }
  .footer-top { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  body { font-size: 15px; }
  .events-grid { grid-template-columns: 1fr; }
}
