/* 宣教行動月曆 v2 */
:root {
  --bg-color: #F4F9FB;
  --card-bg: #FFFFFF;
  --primary: #3498DB;
  --primary-dark: #2980B9;
  --text-main: #2C3E50;
  --text-light: #7F8C8D;
  --border: #E8F1F5;
  --tab-active-bg: #E3F2FD;
  --tab-active-text: #1976D2;
  --accent: #F59E0B; /* 溫暖的金色點綴 */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans TC', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  font-size: 18px; /* 加大基礎字體讓長輩好閱讀 */
}

#app {
  width: 100%;
  max-width: 600px;
  background: transparent;
  padding: 20px 16px 80px; /* 底部留白給導航按鈕 */
  display: flex;
  flex-direction: column;
}

/* ── SPA 視圖切換 ──────────────────────── */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}
.view-section.active {
  display: block;
}

/* ── 頁首 (全局) ───────────────────────── */
.main-header {
  text-align: center;
  margin-bottom: 24px;
  margin-top: 10px;
  cursor: pointer; /* 點擊回首頁 */
  transition: transform 0.2s;
}
.main-header:active {
  transform: scale(0.98);
}
.main-header h1 {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary-dark);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.main-header p {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

/* =========================================
   首頁視圖 (Home View)
   ========================================= */
.hero-section {
  background: linear-gradient(135deg, #2980B9, #3498DB);
  color: white;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(41, 128, 185, 0.2);
}
.hero-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}
.hero-text {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.9;
}

.pdf-downloads {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  text-align: center;
}
.pdf-downloads h3 {
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 16px;
}
.pdf-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.btn-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  color: var(--text-main);
  padding: 12px 8px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-pdf:hover {
  background: #e3f2fd;
  border-color: var(--primary);
  color: var(--primary-dark);
}
.pdf-note {
  font-size: 12px;
  color: #aaa;
  margin-top: 12px;
}

.iframe-section {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}
.iframe-section h3 {
  font-size: 16px;
  margin-bottom: 4px;
  text-align: center;
}
.iframe-title-link {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.2s;
}
.iframe-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.iframe-desc {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 16px;
}
.iframe-container {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fafafa;
}

/* 可點擊的字雲卡片 */
.cloud-card-link {
  text-decoration: none;
  display: block;
  margin-top: 4px;
}
.cloud-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #EBF5FB, #D6EAF8);
  border: 1px solid #AED6F1;
  border-radius: 16px;
  padding: 18px 20px;
  transition: all 0.2s;
}
.cloud-card:hover, .cloud-card:active {
  background: linear-gradient(135deg, #D6EAF8, #AED6F1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(41, 128, 185, 0.15);
}
.cloud-card-icon {
  font-size: 36px;
  flex-shrink: 0;
}
.cloud-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cloud-card-text strong {
  font-size: 16px;
  color: var(--primary-dark);
  font-weight: 900;
}
.cloud-card-text span {
  font-size: 13px;
  color: var(--text-light);
}
.cloud-card-arrow {
  font-size: 28px;
  color: var(--primary);
  font-weight: 300;
}

.footer-links {
  text-align: center;
  margin-bottom: 30px;
}
.btn-outline {
  display: inline-block;
  padding: 12px 24px;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}
.enter-calendar-box {
  text-align: center;
  margin-top: 0px;
  margin-bottom: 40px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 16px 36px;
  font-size: 18px;
  font-weight: 900;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  cursor: pointer;
  transition: transform 0.2s;
}
.btn-primary:active {
  transform: scale(0.95);
}

.copyright-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: #95a5a6;
  line-height: 1.6;
}
.copyright-footer a {
  color: #7f8c8d;
  text-decoration: none;
}
.copyright-footer a:hover {
  text-decoration: underline;
}

/* =========================================
   月曆視圖 (Calendar View)
   ========================================= */

/* ── 頁籤 ─────────────────────────────── */
.tabs-container {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.tab-icon {
  font-size: 20px;
}
.tab-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
}
.tab:hover {
  border-color: var(--primary);
}
.tab.active {
  background: var(--tab-active-bg);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(25, 118, 210, 0.1);
}
.tab.active .tab-text {
  color: var(--tab-active-text);
}

/* ── 經文副標題 ──────────────────────── */
.scripture-box {
  background: rgba(41, 128, 185, 0.05);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  color: var(--text-main);
  transition: opacity 0.3s;
  text-align: center;
}
#scriptureText {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 8px;
}
#scriptureSource {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 700;
}

/* ── 內容展示區與排版 ─────────────────── */
.content-container {
  flex: 1;
  margin-bottom: 20px;
}
.content-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
  animation: fadeIn 0.3s ease-out;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.big-date {
  font-family: 'Arial', sans-serif;
  color: var(--primary-dark);
  line-height: 1;
}
.big-date .month-num {
  font-size: 24px;
  font-weight: 700;
}
.big-date .slash {
  font-size: 24px;
  font-weight: 300;
  margin: 0 4px;
  color: #bdc3c7;
}
.big-date .day-num {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -2px;
}

.date-info {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}
.date-info .weekday {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  margin-top: 1px;
}
.date-info .topic-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-main);
  white-space: normal;
  word-break: break-word;
}
html[lang="en"] .date-info .topic-title {
  font-size: 18px;
}

.card-divider {
  border: 0;
  height: 1px;
  background: var(--border);
  margin-bottom: 20px;
}

.action-text {
  font-size: 18px; /* 放大大內文 */
  line-height: 1.8;
  color: #34495e;
}
.action-text strong {
  color: var(--primary-dark);
}

.extra-content {
  margin-top: 20px;
}

/* ── 畫面下方導航按鈕 ─────────────────── */
.bottom-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.nav-btn-large {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 14px 8px;
  border-radius: 16px;
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  transition: all 0.2s;
}
.today-btn {
  color: var(--text-light);
  font-size: 15px;
}
.nav-btn-large:hover:not(:disabled) {
  background: var(--tab-active-bg);
  border-color: var(--primary);
}
.nav-btn-large:active:not(:disabled) {
  transform: scale(0.98);
}
.nav-btn-large:disabled {
  color: #bdc3c7;
  background: #f8f9fa;
  cursor: not-allowed;
  box-shadow: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
