/* ============================================================
   NCUT Alumni Association — Main Stylesheet
   Primary: hsl(188,100%,35%) = #00b3ba (teal/cyan)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
  --primary: #00a0b0;
  --primary-dark: #006d7a;
  --primary-light: #00c8d8;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --bg-light: #f8f9fa;
  --bg-dark: #111827;
  --border: #e5e7eb;
  --white: #ffffff;
  --font: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-weight: 400;
}

a { text-decoration: none; color: inherit; transition: color .2s; }
img { max-width: 100%; display: block; }

/* ── Utility ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.text-primary { color: var(--primary); }
.bg-primary { background-color: var(--primary); }
.section-title { margin-bottom: 2.5rem; }
.section-title .en {
  font-size: .7rem; letter-spacing: .35em; text-transform: uppercase;
  color: rgba(0,160,176,.55); margin-bottom: .5rem; display: block;
}
.section-title h2 {
  font-size: 1.5rem; font-weight: 300; letter-spacing: .15em; color: var(--text);
}
.section-title .accent {
  display: block; width: 2.5rem; height: 2px; background: var(--primary); margin-top: .75rem;
}
.section-title.light .en { color: rgba(255,255,255,.45); }
.section-title.light h2 { color: var(--white); }
.section-title.light .accent { background: rgba(255,255,255,.6); }

/* ── Top Info Bar ── */
#top-bar {
  background: #222;
  color: #bbb;
  font-size: .75rem;
  padding: 6px 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
}
#top-bar a { color: #bbb; }
#top-bar a:hover { color: var(--primary); }
.top-bar-right { display: flex; gap: 1rem; }

/* ── Home Bottom Navbar ── */
#home-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--bg-dark);
  display: flex;
  height: 64px;
}
.home-nav-brand {
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1.5rem;
  background: var(--primary-dark);
  color: var(--white);
  min-width: 140px;
}
.home-nav-brand .logo-box {
  width: 36px; height: 36px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: white;
}
.home-nav-brand .brand-text { font-size: .7rem; letter-spacing: .05em; line-height: 1.4; }
.home-nav-links {
  display: flex; flex: 1; list-style: none;
}
.home-nav-links li a {
  display: flex; align-items: center; justify-content: center;
  height: 64px; padding: 0 1.2rem;
  color: rgba(255,255,255,.65);
  font-size: .8rem; letter-spacing: .08em;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.home-nav-links li a:hover,
.home-nav-links li a.active { color: var(--white); background: rgba(255,255,255,.08); }

/* ── Inner Top Navbar ── */
#inner-nav {
  position: fixed;
  top: 28px; left: 0; right: 0;
  z-index: 999;
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  display: flex;
  height: 60px;
}
#inner-nav .home-nav-brand {
  background: #ffffff !important;
  border-right: 1px solid #e5e7eb;
}
#inner-nav .home-nav-links li a {
  height: 60px;
  color: #374151 !important;
  background: #ffffff !important;
}
#inner-nav .home-nav-links li a:hover,
#inner-nav .home-nav-links li a.active {
  color: #ffffff !important;
  background: var(--primary) !important;
}

/* ── HERO SLIDER ── */
#hero {
  position: relative;
  overflow: hidden;
}
.hero-slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; color: white;
  opacity: 0; transition: opacity .9s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide .geo {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.hero-slide .geo::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 350px; height: 350px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.1);
}
.hero-slide .geo::after {
  content: '';
  position: absolute; bottom: 60px; left: -60px;
  width: 280px; height: 280px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.08);
}
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 0 2rem; }
.hero-sub {
  font-size: .65rem; letter-spacing: .45em; text-transform: uppercase;
  opacity: .5; font-weight: 300; margin-bottom: 1.2rem;
}
.hero-title {
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  font-weight: 300; letter-spacing: .15em; line-height: 1.5;
  margin-bottom: 1rem;
}
.hero-desc { font-size: .85rem; color: rgba(255,255,255,.55); letter-spacing: .2em; margin-bottom: 2.5rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-btn {
  padding: .75rem 2rem; font-size: .8rem; letter-spacing: .15em;
  cursor: pointer; transition: all .3s;
}
.hero-btn-outline {
  border: 1px solid rgba(255,255,255,.6); color: white; background: transparent;
}
.hero-btn-outline:hover { background: white; color: var(--primary); }
.hero-btn-solid { background: white; color: var(--primary); border: 1px solid white; }
.hero-btn-solid:hover { background: var(--primary); color: white; }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,.4);
  color: white; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); backdrop-filter: blur(4px);
  cursor: pointer; z-index: 10; transition: background .2s;
}
.hero-arrow:hover { background: rgba(255,255,255,.2); }
.hero-arrow.prev { left: 1.5rem; }
.hero-arrow.next { right: 1.5rem; }

.hero-dots {
  position: absolute; bottom: 3rem; right: 2rem;
  display: flex; gap: .5rem; z-index: 10;
}
.hero-dot {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.35); width: 12px;
  cursor: pointer; transition: all .3s;
}
.hero-dot.active { background: white; width: 32px; }

/* News ticker */
.hero-ticker {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; z-index: 10;
}
.ticker-label {
  background: var(--primary);
  padding: .75rem 1.5rem;
  color: white; font-size: .7rem; font-weight: 700; letter-spacing: .25em;
  display: flex; align-items: center; white-space: nowrap;
}
.ticker-items {
  flex: 1; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  padding: .75rem 1.25rem;
  display: flex; align-items: center; gap: 2.5rem; overflow: hidden;
}
.ticker-item { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.ticker-item:hover { color: var(--primary); }
.ticker-tag {
  font-size: .65rem; background: rgba(0,160,176,.12);
  color: var(--primary); padding: .1rem .5rem; border-radius: 2px; font-weight: 500;
}
.ticker-date { color: #9ca3af; font-size: .7rem; }
.ticker-text { font-size: .8rem; color: #374151; }

/* ── Stats Strip ── */
#stats { background: var(--primary); padding: 2.5rem 0; }
#stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat-item { text-align: center; color: white; }
.stat-number { font-size: 2.5rem; font-weight: 300; letter-spacing: .1em; }
.stat-label { font-size: .65rem; letter-spacing: .25em; text-transform: uppercase; opacity: .6; margin-top: .3rem; }

/* ── News Cards ── */
#news-section { padding: 4rem 0; }
.news-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2.5rem; }
.more-link { font-size: .8rem; color: var(--primary); letter-spacing: .1em; }
.more-link:hover { text-decoration: underline; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.news-card {
  border: 1px solid var(--border);
  transition: border-color .25s, box-shadow .25s;
  overflow: hidden;
  display: block; color: inherit;
}
.news-card:hover { border-color: rgba(0,160,176,.4); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.news-card-bar { height: 4px; }
.news-card-bar.activity { background: var(--primary); }
.news-card-bar.notice { background: #f59e0b; }
.news-card-bar.affair { background: #3b82f6; }
.news-card-body { padding: 1.5rem; }
.news-meta { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.news-tag {
  font-size: .65rem; padding: .1rem .5rem; border-radius: 2px; font-weight: 500;
}
.news-tag.activity { background: rgba(0,160,176,.08); color: var(--primary); }
.news-tag.notice { background: rgba(245,158,11,.1); color: #b45309; }
.news-tag.affair { background: rgba(59,130,246,.1); color: #1d4ed8; }
.news-date { font-size: .7rem; color: var(--text-muted); }
.news-title { font-size: .95rem; font-weight: 500; color: var(--text); line-height: 1.5; margin-bottom: 1rem; }
.news-card:hover .news-title { color: var(--primary); }
.news-read-more { font-size: .75rem; color: var(--primary); letter-spacing: .05em; }

/* ── Chairman ── */
#chairman-section { background: var(--bg-light); padding: 4rem 0; }
.chairman-inner { display: flex; gap: 3rem; align-items: center; }
.chairman-photo {
  flex-shrink: 0; width: 180px; height: 230px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; position: relative;
}
.chairman-photo::after {
  content: ''; position: absolute; bottom: -10px; right: -10px;
  width: 100%; height: 100%;
  border: 2px solid var(--primary); z-index: -1;
}
.chairman-avatar { font-size: 3.5rem; margin-bottom: .5rem; }
.chairman-role { font-size: .7rem; letter-spacing: .2em; opacity: .7; }
.chairman-text p { color: #4b5563; line-height: 2; text-align: justify; margin-bottom: 1rem; font-size: .95rem; }
.chairman-link { color: var(--primary); font-size: .85rem; letter-spacing: .05em; }
.chairman-link:hover { text-decoration: underline; }

/* ── Services ── */
#services-section { padding: 4rem 0; }
.services-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2.5rem; }
.services-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.service-card {
  border: 1px solid var(--border);
  padding: 1.5rem 1rem; text-align: center;
  transition: border-color .25s, box-shadow .25s;
  display: block; color: inherit;
}
.service-card:hover { border-color: var(--primary); box-shadow: 0 8px 24px rgba(0,160,176,.12); }
.service-icon { font-size: 2rem; margin-bottom: .75rem; display: block; transition: transform .2s; }
.service-card:hover .service-icon { transform: scale(1.1); }
.service-title { font-size: .8rem; font-weight: 500; color: var(--text); margin-bottom: .4rem; }
.service-card:hover .service-title { color: var(--primary); }
.service-desc { font-size: .7rem; color: var(--text-muted); line-height: 1.5; }

/* ── Quick Links ── */
#quick-links { background: var(--bg-dark); padding: 3.5rem 0; }
.quick-links-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.5rem; }
.quick-link-card {
  border: 1px solid rgba(255,255,255,.2);
  padding: 2rem 1rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .6rem; color: white;
  transition: background .25s, border-color .25s;
}
.quick-link-card:hover { background: var(--primary); border-color: var(--primary); }
.quick-link-icon { font-size: 1.8rem; transition: transform .2s; }
.quick-link-card:hover .quick-link-icon { transform: scale(1.1); }
.quick-link-label { font-size: .85rem; letter-spacing: .1em; font-weight: 300; }

/* ── Inner Page Layout ── */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #004d5e 100%);
  color: white; padding: 5rem 0 3rem;
  position: relative; overflow: hidden;
}
.page-banner::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 300px; height: 300px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
}
.page-banner-en {
  font-size: .65rem; letter-spacing: .35em; text-transform: uppercase;
  opacity: .5; margin-bottom: .5rem; display: block;
}
.page-banner h1 { font-size: 2rem; font-weight: 300; letter-spacing: .2em; }
.page-content { padding: 4rem 0; }
.inner-page-body { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ── Contact Form ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; }
.contact-info-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-info-icon { color: var(--primary); font-size: 1.2rem; margin-top: .1rem; }
.contact-label { font-size: .75rem; color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .25rem; }
.contact-value { font-size: .9rem; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: .4rem; letter-spacing: .08em; }
.form-input, .form-textarea {
  width: 100%; border: 1px solid var(--border);
  padding: .75rem 1rem; font-family: var(--font); font-size: .9rem; color: var(--text);
  transition: border-color .2s; outline: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--primary); }
.form-textarea { resize: vertical; min-height: 130px; }
.submit-btn {
  background: var(--primary); color: white;
  border: none; padding: .85rem 2.5rem;
  font-family: var(--font); font-size: .85rem; letter-spacing: .15em;
  cursor: pointer; transition: background .2s;
}
.submit-btn:hover { background: var(--primary-dark); }

/* ── Footer ── */
#site-footer { background: #111827; color: white; }
.footer-main { padding: 3.5rem 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.1fr; gap: 2.5rem; }
.footer-brand-logo {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem;
}
.footer-logo-box {
  width: 40px; height: 40px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: white; flex-shrink: 0;
}
.footer-brand-name { font-size: .8rem; font-weight: 500; letter-spacing: .05em; line-height: 1.4; }
.footer-brand-sub { font-size: .7rem; color: #9ca3af; letter-spacing: .1em; }
.footer-about { font-size: .78rem; color: #6b7280; line-height: 1.8; }
.footer-col-title {
  font-size: .65rem; letter-spacing: .2em; text-transform: uppercase;
  color: #6b7280; margin-bottom: 1.25rem; padding-bottom: .75rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-nav { list-style: none; }
.footer-nav li { margin-bottom: .6rem; }
.footer-nav a {
  font-size: .82rem; color: #9ca3af;
  display: flex; align-items: center; gap: .4rem; transition: color .2s;
}
.footer-nav a::before { content: '›'; color: rgba(0,160,176,.5); font-size: .9rem; }
.footer-nav a:hover { color: var(--primary); }
.footer-contact-item { display: flex; gap: .6rem; margin-bottom: .75rem; align-items: flex-start; }
.footer-contact-icon { color: var(--primary); margin-top: .1rem; }
.footer-contact-text { font-size: .8rem; color: #9ca3af; line-height: 1.6; }
.footer-contact-text a { color: #9ca3af; }
.footer-contact-text a:hover { color: var(--primary); }
.footer-contact-btn {
  display: inline-block; margin-top: 1.25rem;
  padding: .5rem 1.25rem;
  border: 1px solid var(--primary); color: var(--primary);
  font-size: .75rem; letter-spacing: .12em; transition: all .2s;
}
.footer-contact-btn:hover { background: var(--primary); color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0;
}
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .75rem;
}
.footer-copy { font-size: .72rem; color: #6b7280; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .72rem; color: #6b7280; }
.footer-links a:hover { color: var(--primary); }

/* ── Animations ── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .service-desc { display: none; }
}
@media (max-width: 768px) {
  .news-grid { grid-template-columns: 1fr; }
  #stats .container { grid-template-columns: repeat(2, 1fr); }
  .chairman-inner { flex-direction: column; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-links-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .home-nav-links { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── WordPress Admin Bar 補正 ── */
/* 當 WP 管理員工具列顯示時（登入後），整體往下移以免被遮住 */
.admin-bar #top-bar {
  top: 32px;
}
.admin-bar #inner-nav {
  top: 60px; /* 32px 管理列 + 28px 資訊列 */
}
.admin-bar .page-content,
.admin-bar #hero {
  margin-top: 32px;
}
/* 手機版管理列高度為 46px */
@media (max-width: 782px) {
  .admin-bar #top-bar  { top: 46px; }
  .admin-bar #inner-nav { top: 74px; }
  .admin-bar .page-content,
  .admin-bar #hero { margin-top: 46px; }
}
