/* SYRIUS9 Design System — Apple-like, white/grey/sky-blue */
:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-light: #e8f0fe;
  --sky-light: #e8f4fd;
  --sky-mid: #b3d9f7;
  --border: #d2d2d7;
  --border-light: #e5e5ea;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.03);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
  --max-w: 1200px;
  --header-h: 56px;
  --transition: 200ms ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text-primary);
  line-height: 1.6; font-size: 16px; min-height: 100vh; padding-top: var(--header-h);
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
svg { display: inline-block; vertical-align: middle; }
::selection { background: var(--accent); color: #fff; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 60px 0; }
.section-alt { background: var(--bg-card); }
.section-sky { background: linear-gradient(180deg, var(--sky-light), var(--bg)); }

/* Header — fixed, frosted glass */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: var(--header-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.header-logo img { height: 32px; width: auto; }

/* Nav */
.nav { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
  display: block; padding: 8px 14px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); border-radius: var(--radius-md);
  transition: all var(--transition); cursor: pointer;
}
.nav-link:hover { color: var(--text-primary); background: rgba(0,0,0,0.04); }
/* Bridge gap between nav-item and mega-menu */
.nav-item::after {
  content: ''; position: absolute; bottom: -12px; left: 0; right: 0; height: 12px; z-index: 2001;
}

/* Mega Menu — SOLID white, no transparency */
.mega-menu {
  display: none;
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 24px;
  min-width: 720px; z-index: 2000;
}
.nav-item:hover .mega-menu,
.mega-menu:hover { display: grid; }
.mega-menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mega-group h4 {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
  margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border-light);
}
.mega-group a { display: block; font-size: 13px; padding: 4px 0; color: var(--text-secondary); line-height: 1.5; }
.mega-group a:hover { color: var(--accent); }

/* Header Search */
.header-search { position: relative; width: 200px; }
.header-search input {
  width: 100%; padding: 6px 12px 6px 32px; border: 1px solid var(--border-light);
  border-radius: 20px; font-size: 13px; background: rgba(0,0,0,0.03);
  outline: none; transition: all var(--transition);
}
.header-search input:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15); width: 260px;
}
.header-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 14px; height: 14px; }
.search-results {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); max-height: 360px; overflow-y: auto; z-index: 3000; margin-top: 4px;
}
.search-results a { display: block; padding: 10px 14px; font-size: 14px; color: var(--text-primary); border-bottom: 1px solid var(--border-light); }
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--accent-light); }

/* Mobile toggle */
.menu-toggle { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 4px; }
.menu-toggle span { width: 20px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all var(--transition); }

/* Hero */
.hero {
  padding: 80px 24px 60px; text-align: center;
  background: linear-gradient(180deg, var(--sky-light) 0%, var(--bg) 100%);
  position: relative; overflow: hidden;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.hero p { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-secondary); max-width: 640px; margin: 0 auto 32px; line-height: 1.6; }
.hero-search { max-width: 480px; margin: 0 auto; position: relative; }
.hero-search input {
  width: 100%; padding: 14px 20px 14px 44px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); font-size: 16px; background: var(--bg-card);
  outline: none; box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.hero-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,113,227,0.15), var(--shadow-md); }
.hero-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 18px; height: 18px; }

/* Stats */
.stats { display: flex; justify-content: center; gap: 48px; padding: 32px 0; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 700; background: linear-gradient(135deg, var(--accent), #5ac8fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* Section Headings */
.section-heading { text-align: center; margin-bottom: 40px; }
.section-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.section-heading p { color: var(--text-secondary); font-size: 1rem; max-width: 480px; margin: 0 auto; }

/* Tool Grid */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tool-card {
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 20px; transition: all var(--transition); cursor: pointer; position: relative;
}
.tool-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tool-card-icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--accent-light); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; color: var(--accent); }
.tool-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.tool-card p { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.tool-card .view-link { position: absolute; inset: 0; border-radius: var(--radius-lg); z-index: 1; }
.section-footer { text-align: center; margin-top: 24px; }
.section-footer a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent); }

/* Ad placements */
.ad-wrap { text-align: center; padding: 16px 0; min-height: 90px; overflow: hidden; }
.ad-leaderboard { min-height: 90px; }
.ad-rectangle { min-height: 250px; }
.ad-in-content { min-height: 120px; margin: 32px 0; }
.ad-anchor { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); z-index: 999; padding: 8px; text-align: center; min-height: 60px; }
.ad-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; text-align: center; }

/* Footer */
.footer { background: #1d1d1f; color: #a1a1a6; padding: 48px 0 24px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.footer-col h4 { font-size: 13px; font-weight: 600; color: #f5f5f7; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.footer-col a { display: block; font-size: 13px; color: #a1a1a6; padding: 3px 0; }
.footer-col a:hover { color: #f5f5f7; }
.footer-bottom { max-width: var(--max-w); margin: 32px auto 0; padding: 16px 24px 0; border-top: 1px solid #333; font-size: 12px; color: #6e6e73; text-align: center; }

/* Breadcrumbs */
.breadcrumbs { padding: 16px 0; font-size: 13px; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); margin: 0 4px; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 4px; color: var(--border); }

/* Calculator Page */
.calc-page { padding: 24px 0 60px; }
.calc-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }
.calc-main { min-width: 0; }
.calc-sidebar { min-width: 0; }
.calc-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; margin-bottom: 32px; box-shadow: var(--shadow-sm); }
.calc-box h1 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.calc-box .subtitle { color: var(--text-secondary); margin-bottom: 24px; }
.calc-widget { display: flex; flex-direction: column; gap: 16px; }
.calc-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.calc-row label { font-size: 14px; font-weight: 500; min-width: 100px; color: var(--text-secondary); }
.calc-row input, .calc-row select { flex: 1; min-width: 120px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 15px; font-family: var(--font); outline: none; transition: border-color var(--transition); }
.calc-row input:focus, .calc-row select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); }
.calc-btn { background: var(--accent); color: #fff; border: none; padding: 12px 32px; border-radius: var(--radius-md); font-size: 15px; font-weight: 500; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.calc-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.calc-result { display: none; background: var(--sky-light); border: 1px solid var(--sky-mid); border-radius: var(--radius-md); padding: 16px 20px; font-size: 1.2rem; font-weight: 600; color: var(--text-primary); margin-top: 8px; }

/* Article Content */
.article-content { line-height: 1.8; }
.article-content h2 { font-size: 1.4rem; font-weight: 700; margin: 32px 0 12px; letter-spacing: -0.01em; }
.article-content h3 { font-size: 1.15rem; font-weight: 600; margin: 24px 0 8px; }
.article-content p { margin-bottom: 16px; color: var(--text-secondary); }
.article-content ul, .article-content ol { margin: 0 0 16px 20px; color: var(--text-secondary); }
.article-content li { margin-bottom: 6px; }

/* FAQ */
.faq { margin: 32px 0; }
.faq-item { border: 1px solid var(--border-light); border-radius: var(--radius-md); margin-bottom: 8px; overflow: hidden; }
.faq-q { padding: 16px 20px; font-weight: 600; font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); transition: background var(--transition); }
.faq-q:hover { background: var(--accent-light); }
.faq-q::after { content: '+'; font-size: 20px; color: var(--text-muted); transition: transform var(--transition); }
.faq-item.open .faq-q::after { content: '\2212'; }
.faq-a { display: none; padding: 0 20px 16px; font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.faq-item.open .faq-a { display: block; }

/* Related Links */
.related-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 24px 0; }
.related-links a { display: block; padding: 8px 12px; font-size: 14px; background: var(--bg); border-radius: var(--radius-sm); color: var(--text-secondary); transition: all var(--transition); }
.related-links a:hover { background: var(--accent-light); color: var(--accent); }

/* Category Page */
.category-header { padding: 60px 24px 40px; text-align: center; }
.category-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.category-header p { color: var(--text-secondary); max-width: 500px; margin: 0 auto; }
.category-filters { display: flex; gap: 12px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.category-filters input { padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 15px; min-width: 280px; outline: none; }
.category-filters input:focus { border-color: var(--accent); }

/* About Page */
.about-page { padding: 60px 24px; }
.about-page h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 16px; }
.about-page h2 { font-size: 1.3rem; font-weight: 600; margin: 32px 0 12px; color: var(--text-secondary); }
.about-page p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; max-width: 720px; }

/* Service Cards */
.service-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 24px; transition: all var(--transition); }
.service-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.service-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.service-card p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.service-card .price { font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.service-card .btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; padding: 10px 24px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; transition: all var(--transition); }
.service-card .btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 32px 0; }

/* Sidebar */
.sidebar-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.sidebar-card h3 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 12px; }
.sidebar-links a { display: block; padding: 6px 0; font-size: 14px; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); }
.sidebar-links a:last-child { border-bottom: none; }
.sidebar-links a:hover { color: var(--accent); }

/* Service Page */
.service-page { padding: 60px 24px; }
.service-page h1 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.service-hero { margin-bottom: 40px; }
.service-content h2 { font-size: 1.3rem; font-weight: 600; margin: 32px 0 12px; }
.service-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }

/* 404 */
.error-page { padding: 120px 24px; text-align: center; }
.error-page h1 { font-size: 4rem; font-weight: 700; margin-bottom: 8px; color: var(--text-muted); }
.error-page p { color: var(--text-secondary); margin-bottom: 24px; }

/* Responsive */
@media (max-width: 768px) {
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 16px; }
  .menu-toggle { display: flex; }
  .header-search { width: 140px; }
  .mega-menu { min-width: auto; left: 0; right: 0; transform: none; border-radius: 0; }
  .mega-menu-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-sidebar { display: none; }
  .stats { gap: 24px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card { padding: 14px; }
  .tool-card h3 { font-size: 13px; }
  .tool-card p { display: none; }
  .mega-menu-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero { padding: 60px 16px 40px; }
}
