/* AAAInfoWeb-Cloudflare 全站共用 CSS */

/* CSS 變數 */
:root {
  --color-primary: #1E3A8A;
  --color-accent: #FACC15;
  --color-light-bg: #F3F4F6;
  --color-dark-bg: #111827;
  --color-text: #333;
  --color-white: #ffffff;
  --color-success: #22c55e;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', 'Noto Sans TC', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
  --border-radius: 8px;
}

/* 基礎樣式 */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  padding-top: 70px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* 導覽列 */
.navbar {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2563EB 100%);
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  color: var(--color-accent) !important;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.navbar-brand:hover {
  color: var(--color-white) !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white) !important;
}

/* 使用者選單 */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 8px;
}

.user-menu .dropdown-item {
  padding: 0.5rem 1.5rem;
}

/* Hero 區塊 */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-top: -70px;
  padding-top: 70px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 58, 138, 0.7);
}

.hero-section .hero-content,
.hero-section > .container {
  position: relative;
  z-index: 1;
  color: var(--color-white);
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-section h2 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

/* 按鈕樣式 */
.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-primary);
  font-weight: 600;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background-color: #eab308;
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-outline {
  border: 2px solid var(--color-white);
  color: var(--color-white);
  background: transparent;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.btn-primary-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

/* 卡片 */
.feature-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-card .icon {
  font-size: 2.8rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* 區塊標題 */
.section-heading {
  font-size: 2.2rem;
  color: var(--color-primary);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

/* Footer */
footer {
  background-color: var(--color-dark-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 2rem 0;
  text-align: center;
}

footer .footer-logo {
  height: 45px;
  margin-bottom: 1rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

footer .footer-logo:hover {
  opacity: 1;
}

footer .footer-text {
  font-size: 0.9rem;
}

/* 通知 Toast */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
}

/* 載入指示器 */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-light-bg);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 響應式調整 */
@media (max-width: 991.98px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 767.98px) {
  body {
    padding-top: 60px;
  }
  .hero-section {
    margin-top: -60px;
    padding-top: 60px;
  }
  .section-heading {
    font-size: 1.8rem;
  }
}
