/* =============================================
   ATLAS Manual Site - style.css
   ============================================= */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: system-ui, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #333333;
  background-color: #FFFFFF;
}

a {
  color: #1A6EC2;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #E67E22;
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Typography --- */
h1 {
  font-size: 32px;
  font-weight: 700;
  color: #1A6EC2;
  margin-bottom: 16px;
  line-height: 1.4;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1A6EC2;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid #1A6EC2;
  line-height: 1.4;
}

h3 {
  font-size: 20px;
  font-weight: 700;
  color: #333333;
  margin-top: 32px;
  margin-bottom: 12px;
  line-height: 1.4;
}

p {
  margin-bottom: 16px;
}

/* =============================================
   Header
   ============================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #1A6EC2;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 36px;
  height: 36px;
  background-color: #FFFFFF;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1A6EC2;
  font-size: 14px;
  flex-shrink: 0;
}

.header-title a {
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.header-title a:hover {
  opacity: 0.9;
  text-decoration: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  color: #FFFFFF;
  font-size: 14px;
  text-decoration: none;
  opacity: 0.9;
}

.header-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #FFFFFF;
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   Layout
   ============================================= */
.page-body {
  margin-top: 60px;
  display: flex;
  min-height: calc(100vh - 60px);
}

/* --- Sidebar --- */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background-color: #E8F1FA;
  border-right: 1px solid #DDDDDD;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 24px 0;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: #124A82;
  padding: 0 20px 12px;
  border-bottom: 1px solid #DDDDDD;
  margin-bottom: 8px;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav a {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  color: #333333;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color 0.2s, border-color 0.2s;
}

.sidebar-nav a:hover {
  background-color: rgba(26, 110, 194, 0.08);
  text-decoration: none;
}

.sidebar-nav a.active {
  border-left-color: #1A6EC2;
  background-color: #FFFFFF;
  color: #1A6EC2;
  font-weight: 600;
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 900;
}

.sidebar-overlay.active {
  display: block;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  padding: 32px 40px;
  max-width: 980px;
}

.content-inner {
  max-width: 900px;
}

/* No-sidebar layout (top page) */
.main-content-full {
  flex: 1;
  padding: 0;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
  background-color: #124A82;
  color: #FFFFFF;
  text-align: center;
  padding: 24px;
  font-size: 13px;
}

.site-footer a {
  color: #FFFFFF;
  opacity: 0.85;
}

.site-footer a:hover {
  opacity: 1;
}

.footer-links {
  margin-bottom: 8px;
}

.footer-links a {
  margin: 0 12px;
}

/* =============================================
   Top Page - Hero
   ============================================= */
.hero {
  background: linear-gradient(135deg, #1A6EC2 0%, #124A82 100%);
  color: #FFFFFF;
  text-align: center;
  padding: 80px 24px 64px;
}

.hero h1 {
  color: #FFFFFF;
  font-size: 36px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto;
}

/* =============================================
   Top Page - Role Cards
   ============================================= */
.role-section {
  padding: 64px 24px;
  background-color: #FFFFFF;
}

.role-section-title {
  text-align: center;
  font-size: 24px;
  color: #1A6EC2;
  margin-bottom: 40px;
  border-bottom: none;
  margin-top: 0;
}

.role-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.role-card {
  background-color: #FFFFFF;
  border: 1px solid #DDDDDD;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  text-decoration: none;
  color: #333333;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.role-card:focus-visible {
  outline: 2px solid #E67E22;
  outline-offset: 2px;
}

.role-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #E8F1FA;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.role-icon svg {
  width: 32px;
  height: 32px;
  fill: #1A6EC2;
}

.role-card h3 {
  font-size: 20px;
  color: #1A6EC2;
  margin-bottom: 8px;
  margin-top: 0;
}

.role-card p {
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
  margin-bottom: 0;
}

/* =============================================
   Top Page - System Overview
   ============================================= */
.overview-section {
  background-color: #E8F1FA;
  padding: 64px 24px;
}

.overview-inner {
  max-width: 800px;
  margin: 0 auto;
}

.overview-section h2 {
  text-align: center;
  border-bottom: none;
  margin-top: 0;
}

.overview-section p {
  font-size: 16px;
  text-align: center;
}

/* =============================================
   Screenshot Placeholder (Dummy Image)
   ============================================= */
.screenshot {
  margin: 20px 0 8px;
}

.screenshot-placeholder {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  background-color: #E0E0E0;
  border: 1px dashed #CCCCCC;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888888;
  font-size: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.screenshot-caption {
  font-size: 13px;
  color: #888888;
  margin-top: 6px;
  margin-bottom: 20px;
}

/* =============================================
   Step (numbered procedure)
   ============================================= */
.step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #1A6EC2;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-body {
  flex: 1;
}

.step-body p {
  margin-bottom: 8px;
}

/* =============================================
   Notice / Supplement boxes
   ============================================= */
.box-notice,
.box-supplement {
  padding: 16px 20px;
  border-radius: 4px;
  margin: 20px 0;
  font-size: 15px;
}

.box-notice {
  background-color: #FEF5E7;
  border-left: 4px solid #E67E22;
}

.box-notice .box-label {
  color: #E67E22;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.box-supplement {
  background-color: #E8F1FA;
  border-left: 4px solid #1A6EC2;
}

.box-supplement .box-label {
  color: #1A6EC2;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

/* =============================================
   FAQ Accordion
   ============================================= */
.faq-list {
  margin-top: 16px;
}

.faq-item {
  border: 1px solid #DDDDDD;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background-color: #FFFFFF;
  border: none;
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  color: #333333;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background-color 0.2s;
}

.faq-question:hover {
  background-color: #F5F5F5;
}

.faq-question:focus-visible {
  outline: 2px solid #E67E22;
  outline-offset: -2px;
}

.faq-q-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #1A6EC2;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq-question-text {
  flex: 1;
  font-weight: 600;
}

.faq-toggle {
  font-size: 18px;
  color: #1A6EC2;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 16px 60px;
  font-size: 15px;
  line-height: 1.8;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-a-mark {
  color: #1A6EC2;
  font-weight: 700;
  margin-right: 4px;
}

/* =============================================
   Tables
   ============================================= */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

thead th {
  background-color: #1A6EC2;
  color: #FFFFFF;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #DDDDDD;
}

tbody tr:nth-child(even) {
  background-color: #F5F5F5;
}

tbody tr:nth-child(odd) {
  background-color: #FFFFFF;
}

/* =============================================
   Back to Top Button
   ============================================= */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #1A6EC2;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background-color 0.2s;
  z-index: 800;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #124A82;
}

.back-to-top:focus-visible {
  outline: 2px solid #E67E22;
  outline-offset: 2px;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: #FFFFFF;
}

/* =============================================
   Section Spacing
   ============================================= */
.manual-section {
  margin-bottom: 48px;
}

.manual-section:first-of-type h2 {
  margin-top: 0;
}

/* =============================================
   Breadcrumb (optional visual aid)
   ============================================= */
.breadcrumb {
  font-size: 13px;
  color: #888888;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: #1A6EC2;
}

/* =============================================
   Responsive: Tablet (768 - 1023)
   ============================================= */
@media screen and (max-width: 1023px) {
  .sidebar {
    width: 220px;
  }

  .main-content {
    padding: 24px 24px;
  }

  .role-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================
   Responsive: Smartphone (~ 767)
   ============================================= */
@media screen and (max-width: 767px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 18px;
  }

  .header-nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  /* Sidebar transforms into slide-in menu */
  .sidebar {
    position: fixed;
    top: 60px;
    left: -280px;
    width: 280px;
    height: calc(100vh - 60px);
    z-index: 950;
    transition: left 0.3s ease;
    box-shadow: none;
  }

  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
  }

  .page-body {
    display: block;
  }

  .main-content {
    padding: 20px 16px;
    max-width: 100%;
  }

  /* Hero */
  .hero {
    padding: 56px 16px 48px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 15px;
  }

  /* Role cards */
  .role-cards {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 400px;
  }

  .role-section {
    padding: 40px 16px;
  }

  .overview-section {
    padding: 40px 16px;
  }

  /* Screenshots */
  .screenshot-placeholder {
    font-size: 13px;
  }

  /* Steps */
  .step {
    gap: 12px;
  }

  /* FAQ */
  .faq-answer {
    padding-left: 20px;
  }

  /* Table */
  table {
    font-size: 14px;
  }

  /* Back to top */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  /* Sidebar nav font */
  .sidebar-nav a {
    font-size: 13px;
  }

  /* Footer */
  .site-footer {
    font-size: 12px;
  }
}
