/* AAAInfoWeb-Cloudflare 全站共用 CSS — 2026 Redesign */

/* CSS 變數 */
:root {
  --color-primary: #0F172A;
  --color-primary-600: #1E3A5F;
  --color-primary-500: #2563EB;
  --color-primary-400: #3B82F6;
  --color-primary-100: #DBEAFE;
  --color-accent: #F59E0B;
  --color-accent-hover: #D97706;
  --color-light-bg: #F8FAFC;
  --color-dark-bg: #0F172A;
  --color-text: #1E293B;
  --color-text-muted: #64748B;
  --color-white: #ffffff;
  --color-success: #10B981;
  --color-danger: #EF4444;
  --color-warning: #F59E0B;
  --color-info: #3B82F6;
  --color-border: #E2E8F0;
  --font-heading: 'Montserrat', 'Noto Sans TC', sans-serif;
  --font-body: 'Open Sans', 'Noto Sans TC', sans-serif;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基礎樣式 */
* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  padding-top: 72px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-light-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

a {
  color: var(--color-primary-500);
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-400);
}

/* 導覽列 — 毛玻璃效果 */
.navbar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.6rem 0;
  transition: background var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
}

.navbar-brand {
  color: var(--color-white) !important;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.navbar-brand i {
  color: var(--color-accent);
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.75) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--color-white) !important;
  background: rgba(255,255,255,0.08);
}

.nav-link.active {
  color: var(--color-white) !important;
  background: rgba(59,130,246,0.2);
}

.dropdown-menu {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  margin-top: 0.5rem;
  box-shadow: var(--shadow-xl);
}

.dropdown-item {
  color: rgba(255,255,255,0.8) !important;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  transition: all var(--transition);
}

.dropdown-item:hover {
  color: var(--color-white) !important;
  background: rgba(59,130,246,0.2);
}

.dropdown-divider {
  border-color: rgba(255,255,255,0.1);
}

/* 使用者選單 */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 8px;
  border: 2px solid rgba(255,255,255,0.2);
}

/* Hero 區塊 */
.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: -72px;
  padding-top: 72px;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 40%, #1E40AF 100%);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(245,158,11,0.1) 0%, transparent 50%);
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 0.75rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-section h2 {
  font-size: 1.3rem;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-section .lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
}

.text-white-75 {
  color: rgba(255,255,255,0.65) !important;
}

/* 按鈕樣式 */
.btn-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  color: var(--color-primary) !important;
  font-weight: 700;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-xl);
  transition: all var(--transition);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
  color: var(--color-primary) !important;
}

.btn-primary-outline {
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--color-white) !important;
  background: transparent;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-xl);
  transition: all var(--transition);
  font-weight: 600;
}

.btn-primary-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
  color: var(--color-white) !important;
  transform: translateY(-2px);
}

/* 區塊標題 */
.section-heading {
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary-500), var(--color-accent));
  border: none;
  border-radius: 2px;
  margin: 0 auto;
  opacity: 1;
}

/* 背景區塊 */
.bg-light-custom {
  background: var(--color-white);
}

.bg-primary-custom {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #1E40AF 100%);
}

/* 卡片 */
.feature-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 0;
  text-align: center;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary-100);
}

.feature-card .card-body {
  padding: 2rem;
}

.feature-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.feature-card .feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--color-primary-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.4rem;
  color: var(--color-primary-500);
}

.feature-card h3,
.feature-card h4,
.feature-card .card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.feature-card .card-text {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Hover lift for cards */
.hover-lift {
  transition: all var(--transition);
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

/* Service boxes (philosophy section) */
.service-box {
  padding: 1.5rem;
}

.service-box i {
  color: var(--color-primary-500) !important;
}

/* Page header (sub-pages) */
.page-header {
  background: linear-gradient(135deg, var(--color-light-bg) 0%, var(--color-white) 100%);
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.text-muted-custom {
  color: var(--color-text-muted) !important;
}

/* Footer */
footer {
  background: var(--color-dark-bg);
  color: rgba(255, 255, 255, 0.6);
  padding: 2.5rem 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

footer .footer-logo {
  height: 45px;
  margin-bottom: 1rem;
  opacity: 0.7;
  transition: opacity var(--transition);
}

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

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

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

/* 載入指示器 */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(248,250,252,0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

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

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

/* Badge 樣式修正 */
.badge-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  border-radius: var(--radius-xl);
  font-weight: 700;
}

/* 響應式調整 */
@media (max-width: 991.98px) {
  .navbar-brand {
    font-size: 1.1rem;
  }
  .hero-section h1 {
    font-size: 2.2rem;
  }
  .hero-section h2 {
    font-size: 1.1rem;
  }
  .dropdown-menu {
    background: rgba(15, 23, 42, 0.98);
    border: none;
    margin-top: 0;
  }
}

@media (max-width: 767.98px) {
  body {
    padding-top: 64px;
  }
  .hero-section {
    margin-top: -64px;
    padding-top: 64px;
    min-height: 70vh;
  }
  .hero-section h1 {
    font-size: 1.8rem;
  }
  .section-heading {
    font-size: 1.6rem;
  }
}
