/* ==========================================================
   馬祖語語言能力測驗報名網站
   色彩系統：
   --sea-deep    #1B4B6B  深海藍（主色）
   --tears-blue  #2E9CCA  藍眼淚亮藍（重點色）
   --sand        #E8E2D6  沙灘米（背景中性色）
   --stone       #6B6558  石頭灰（文字/裝飾中性色）
   ========================================================== */

:root {
  --sea-deep: #1b4b6b;
  --sea-deep-dark: #123449;
  --tears-blue: #2e9cca;
  --tears-blue-light: #7fd4f0;
  --sand: #e8e2d6;
  --stone: #6b6558;
  --white: #ffffff;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 960px;
  --font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--sand);
  color: var(--sea-deep-dark);
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.redirect-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--tears-blue);
  color: var(--white);
  text-align: center;
  padding: 12px 16px;
}

.redirect-banner p {
  margin: 2px 0;
  font-size: 0.9rem;
}

.redirect-banner a {
  color: var(--white);
  text-decoration: underline;
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  background: linear-gradient(160deg, var(--sea-deep) 0%, var(--sea-deep-dark) 55%, var(--tears-blue) 130%);
  color: var(--white);
  padding: 64px 24px 96px;
  overflow: hidden;
}

.hero__waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  line-height: 0;
}

.hero__content {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.hero__eyebrow {
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  color: var(--tears-blue-light);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  margin: 0 0 40px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.org-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
}

.org-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  backdrop-filter: blur(4px);
}

.org-logo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--white);
  padding: 6px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.org-card__text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.org-card__role {
  font-size: 0.75rem;
  color: var(--tears-blue-light);
}

.org-card__name {
  font-size: 1rem;
  font-weight: 700;
}

.period-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--sea-deep-dark);
  border-radius: 999px;
  padding: 10px 24px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.period-badge__label {
  background: var(--tears-blue);
  color: var(--white);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.period-badge__date {
  font-weight: 700;
}

/* ---------------- Downloads ---------------- */

.downloads {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 40px;
  position: relative;
}

.downloads__title {
  text-align: center;
  color: var(--sea-deep);
  font-size: 1.5rem;
  margin: 0 0 8px;
}

.downloads__hint {
  text-align: center;
  color: var(--stone);
  margin: 0 0 28px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--sea-deep-dark);
  box-shadow: 0 12px 30px rgba(27, 75, 107, 0.16);
  border: 1px solid rgba(27, 75, 107, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.download-card:hover,
.download-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(27, 75, 107, 0.24);
  background: var(--sand);
}

.download-card__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tears-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-card__icon svg {
  width: 26px;
  height: 26px;
}

.download-card__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-card__title {
  font-size: 1.1rem;
  font-weight: 700;
}

.download-card__desc {
  font-size: 0.85rem;
  color: var(--stone);
}

/* ---------------- Stone divider ---------------- */

.stone-divider {
  line-height: 0;
  margin-top: -1px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--sea-deep-dark);
  color: var(--sand);
  text-align: center;
  padding: 28px 24px 36px;
  font-size: 0.9rem;
}

.site-footer__contact {
  font-weight: 700;
  margin: 0 0 6px;
}

.site-footer__org {
  margin: 0;
  color: rgba(232, 226, 214, 0.75);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 640px) {
  .hero {
    padding: 48px 16px 84px;
  }

  .org-row {
    flex-direction: column;
    align-items: stretch;
  }

  .org-card {
    justify-content: flex-start;
  }

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

  .downloads {
    padding: 24px 16px 32px;
  }

  .period-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (min-width: 1280px) {
  .hero__content,
  .downloads {
    max-width: 1040px;
  }
}
