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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.7;
  display: flex;
  min-height: 100vh;
}

a {
  color: #AE1303;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  overflow-y: auto;
  background: #f8f8f8;
  border-right: 1px solid #e5e5e5;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid #e5e5e5;
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #AE1303;
  display: block;
  line-height: 1.3;
}

.sidebar-title:hover {
  text-decoration: none;
  opacity: 0.85;
}

.sidebar-subtitle {
  font-size: 0.75rem;
  color: #777;
  margin-top: 4px;
  line-height: 1.4;
}

.sidebar-nav ul {
  list-style: none;
  padding: 8px 0;
}

.sidebar-nav li {
  border-bottom: 1px solid #efefef;
}

.sidebar-nav li a {
  display: block;
  padding: 10px 20px;
  color: #444;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav li a:hover {
  background: #efefef;
  text-decoration: none;
  color: #AE1303;
}

.sidebar-nav li.active a {
  background: #AE1303;
  color: #fff;
}

.sidebar-nav li.active .nav-desc {
  color: rgba(255,255,255,0.85);
}

.nav-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.nav-desc {
  display: block;
  font-size: 0.75rem;
  color: #888;
  margin-top: 2px;
}

/* ===== Main Content ===== */
.main-content {
  margin-left: 280px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Banner ===== */
.banner {
  width: 100%;
  height: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.banner-overlay {
  width: 100%;
  padding: 30px 40px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
}

.banner-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.banner-description {
  font-size: 1.1rem;
  margin-top: 6px;
  opacity: 0.9;
  font-weight: 300;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Page header (no banner fallback) */
.page-header {
  padding: 50px 40px 30px;
  border-bottom: 1px solid #eee;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
}

.page-description {
  font-size: 1.1rem;
  color: #666;
  margin-top: 6px;
}

/* ===== Page Content ===== */
.page-content {
  max-width: 800px;
  padding: 40px;
  flex: 1;
}

.page-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: #222;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

.page-content h1:first-child {
  margin-top: 0;
}

.page-content h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: #444;
}

.page-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
  color: #555;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.page-content li {
  margin-bottom: 0.35rem;
}

.page-content li ul {
  margin-top: 0.35rem;
}

.page-content em {
  font-style: italic;
}

.page-content strong {
  font-weight: 600;
}

.page-content a {
  color: #AE1303;
}

.page-content a:hover {
  text-decoration: underline;
}

/* ===== Home Page ===== */
.home-banner {
  width: 100%;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-banner-screen {
  position: absolute;
  inset: 0;
  background-color: #AE1303;
  opacity: 0.85;
}

.home-banner-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 60px 40px;
  max-width: 700px;
}

.home-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.home-subtitle {
  font-size: 1.2rem;
  margin-top: 12px;
  opacity: 0.9;
  font-weight: 300;
}

.home-links {
  margin-top: 24px;
  font-size: 1rem;
}

.home-links a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}

.home-links a:hover {
  border-color: #fff;
  text-decoration: none;
}

/* ===== Visual Path Cards ===== */
.visual-path {
  padding: 40px;
}

.visual-path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1200px;
}

.visual-card {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  background: #fff;
  color: #333;
}

.visual-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  text-decoration: none;
}

.visual-card-image {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: #ddd;
}

.visual-card-info {
  padding: 14px 16px;
}

.visual-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  margin: 0;
}

.visual-card-desc {
  font-size: 0.8rem;
  color: #777;
  margin-top: 4px;
}

/* ===== Prev/Next Navigation ===== */
.page-nav {
  display: flex;
  justify-content: space-between;
  padding: 30px 40px;
  border-top: 1px solid #eee;
  gap: 20px;
}

.page-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #444;
  max-width: 48%;
  transition: border-color 0.2s, background 0.2s;
}

.page-nav-link:hover {
  border-color: #AE1303;
  background: #fdf5f4;
  text-decoration: none;
}

.page-nav-next {
  margin-left: auto;
  text-align: right;
}

.page-nav-arrow {
  font-size: 1.5rem;
  color: #AE1303;
  flex-shrink: 0;
}

.page-nav-label {
  font-size: 0.85rem;
  line-height: 1.3;
}

.page-nav-label small {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  margin-bottom: 2px;
}

/* ===== Footer ===== */
.site-footer {
  padding: 20px 40px;
  border-top: 1px solid #eee;
  font-size: 0.75rem;
  color: #999;
  text-align: center;
}

/* ===== Hamburger ===== */
.hamburger {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #444;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 90;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

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

  .main-content {
    margin-left: 0;
  }

  .banner-overlay {
    padding: 20px 24px;
  }

  .banner-title {
    font-size: 1.5rem;
  }

  .page-content {
    padding: 24px;
  }

  .page-nav {
    padding: 20px 24px;
    flex-direction: column;
  }

  .page-nav-link {
    max-width: 100%;
  }

  .page-nav-next {
    margin-left: 0;
  }

  .visual-path {
    padding: 24px;
  }

  .visual-path-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }

  .home-title {
    font-size: 2rem;
  }

  .home-banner-content {
    padding: 40px 24px;
  }

  .home-banner {
    min-height: 320px;
  }
}

@media (max-width: 500px) {
  .visual-path-grid {
    grid-template-columns: 1fr;
  }

  .banner {
    height: 200px;
  }

  .home-title {
    font-size: 1.6rem;
  }
}
