/* Saint Barnabas' Society and Home - Flag Day 2026 */
/* Unified Styles for All Pages */

:root {
  --primary-red: #ce1126;
  --btn-dark-red: #8b0000;
  --btn-blue: #007bff;
  --btn-light-blue: #cfe2ff;
  --btn-text-dark: #084298;
  --text-main: #333333;
  --text-gray: #666666;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --base-font-size: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--base-font-size);
}

body {
  font-family: "Noto Sans TC", sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-white);
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

/* ============================================
   NAVIGATION
   ============================================ */
header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
}

.logo-area img {
  height: 50px;
  width: auto;
}

/* Mobile Menu Toggle */
#menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  white-space: nowrap;
  display: inline-block;
}

.btn-gold {
  background-color: orange;
  color: white;
}

.btn-gold:hover {
  background-color: #e69500;
}

.btn-eflag {
  background-color: #ffb6c1;
  color: #c71585;
}

.btn-eflag:hover {
  background-color: #ff99aa;
}

.btn-volunteer {
  background-color: #d32f2f;
  color: white;
}

.btn-volunteer:hover {
  background-color: #b71c1c;
}

.btn-login {
  background-color: #bae0ff;
  color: var(--btn-text-dark);
}

.btn-login:hover {
  background-color: #91caff;
}

.btn-lang {
  background-color: transparent;
  border: 1px solid #666;
  color: #555;
  font-weight: bold;
}

.btn-lang:hover {
  background-color: #666;
  color: #fff;
  border-color: #666;
}

/* ============================================
   FONT SIZE CONTROLS
   ============================================ */
.font-controls {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  margin-left: 10px;
}

.btn-font {
  background: #f9f9f9;
  border: none;
  border-right: 1px solid #ccc;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #555;
  transition: 0.2s;
}

.btn-font:last-child {
  border-right: none;
}

.btn-font:hover {
  background: #eee;
}

.btn-font.active {
  background: #666;
  color: #fff;
}

/* ============================================
   HERO / PAGE TITLE
   ============================================ */
.page-title {
  padding: 0 0 10px 0;
}

.page-title h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #222;
}

.page-title p {
  font-size: 1.5rem;
  color: #444;
}

/* ============================================
   MAIN CONTENT GRID
   ============================================ */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
  margin-bottom: 60px;
}

.content-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content-right {
  display: flex;
  flex-direction: column;
}

.text-block {
  font-size: 1.05rem;
  text-align: justify;
}

.highlight-volunteer {
  background-color: #d32f2f;
  color: white;
  padding: 0 4px;
  margin: 4px 0;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
}

.highlight-volunteer:hover {
  opacity: 0.85;
}

.highlight-eflag {
  background-color: #ffb6c1;
  color: #c71585;
  padding: 0 4px;
  margin: 4px 0;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
}

.highlight-eflag:hover {
  opacity: 0.85;
}

.highlight-donate {
  background-color: orange;
  color: white;
  padding: 0 4px;
  margin: 4px 0;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
}

.highlight-donate:hover {
  opacity: 0.85;
}

.section-header {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  display: inline-block;
  width: 100%;
}

/* ============================================
   VIDEO
   ============================================ */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ============================================
   POSTER
   ============================================ */
.poster-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   LEADERBOARD SECTION
   ============================================ */
.leaderboard-section {
  padding: 40px 0;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: 60px;
}

/* Leaderboard with iframe */
.leaderboard-frame {
  width: 100%;
  height: 1500px;
  border: none;
  background: white;
  border-radius: 8px;
}

.leaderboard-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 15px;
}

.leaderboard-label {
  font-weight: bold;
  font-size: 1.2rem;
  margin-right: 10px;
  white-space: nowrap;
}

.leaderboard-select {
  padding: 8px 16px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  font-family: inherit;
  flex: 1;
}

/* Leaderboard unavailable message */
.leaderboard-unavailable {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 8px;
  color: #666;
}

.leaderboard-unavailable h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #333;
}

.leaderboard-unavailable p {
  font-size: 1.1rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background-color: white;
  padding: 60px 0;
  font-size: 0.95rem;
  border-top: 1px solid #eee;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  max-width: 150px;
}

.mission-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 10px;
  text-align: center;
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-row {
  margin-bottom: 15px;
}

.contact-label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.social-link {
  color: #0056b3;
  text-decoration: underline;
  word-break: break-all;
}

/* ============================================
   RESPONSIVE - CHINESE PAGES (body.lang-zh)
   Mobile menu at 1000px
   ============================================ */
@media (max-width: 900px) {
  body.lang-zh .menu-icon {
    display: block;
  }

  body.lang-zh .nav-buttons {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 10px;
  }

  body.lang-zh #menu-toggle:checked + .menu-icon + .nav-buttons {
    display: flex;
  }

  body.lang-zh .btn {
    width: 100%;
    margin-bottom: 10px;
  }

  body.lang-zh .font-controls {
    margin: 10px 0;
    justify-content: center;
    width: auto;
  }
}

/* ============================================
   RESPONSIVE - ENGLISH PAGES (body.lang-en)
   Mobile menu at 1250px
   ============================================ */
@media (max-width: 1000px) {
  body.lang-en .menu-icon {
    display: block;
  }

  body.lang-en .nav-buttons {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 10px;
  }

  body.lang-en #menu-toggle:checked + .menu-icon + .nav-buttons {
    display: flex;
  }

  body.lang-en .btn {
    width: 100%;
    margin-bottom: 10px;
  }

  body.lang-en .font-controls {
    margin: 10px 0;
    justify-content: center;
    width: auto;
  }
}

/* ============================================
   RESPONSIVE - ALL PAGES (900px and below)
   ============================================ */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-frame {
    height: 2500px;
  }

  .content-right {
    order: -1;
    margin-bottom: 30px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
