/*
 * Japan Utility Setup Guide - Stylesheet
 * Based on documentation-html-template by surjithctly (MIT License)
 * Brand colors: #C41E3A (Japanese red) + #FFFFFF (white)
 */

/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  background-color: #FAFAFA;
}

a {
  color: #C41E3A;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #9B1830;
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

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

/* ===== LAYOUT ===== */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: #1a1a2e;
  color: #ccc;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  background: #C41E3A;
  color: #fff;
  text-align: center;
}

.sidebar-header h1 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.sidebar-header .tagline {
  font-size: 12px;
  opacity: 0.85;
  font-weight: 400;
}

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

.sidebar-nav li {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-nav li a {
  display: block;
  padding: 12px 20px;
  color: #ccc;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: rgba(196, 30, 58, 0.15);
  color: #fff;
  border-left: 3px solid #C41E3A;
  padding-left: 17px;
}

.sidebar-nav li a .nav-icon {
  margin-right: 8px;
  font-size: 16px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 280px;
  flex: 1;
  padding: 0;
}

/* ===== TOP HEADER BAR ===== */
.top-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  padding: 4px 8px;
}

.top-header .breadcrumb {
  font-size: 14px;
  color: #888;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, #C41E3A 0%, #9B1830 100%);
  color: #fff;
  padding: 60px 40px;
  text-align: center;
}

.hero h2 {
  font-size: 32px;
  color: #fff;
  margin-bottom: 16px;
}

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

.hero .cta-subtitle {
  font-size: 14px;
  opacity: 0.75;
}

/* ===== CONTENT SECTIONS ===== */
.content-area {
  padding: 40px;
  max-width: 900px;
}

.section {
  margin-bottom: 60px;
  padding-top: 20px;
}

.section h2 {
  font-size: 28px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #C41E3A;
  display: inline-block;
}

.section h3 {
  font-size: 22px;
  margin: 30px 0 15px;
  color: #C41E3A;
}

.section h4 {
  font-size: 18px;
  margin: 20px 0 10px;
  color: #444;
}

.section p {
  margin-bottom: 16px;
}

.section ul, .section ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.section li {
  margin-bottom: 8px;
}

/* ===== STEP NUMBERS ===== */
.step {
  position: relative;
  padding-left: 60px;
  margin-bottom: 30px;
  min-height: 50px;
}

.step-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  background: #C41E3A;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.step h4 {
  margin-top: 0;
  font-size: 18px;
  color: #1a1a1a;
}

.step p {
  color: #555;
}

/* ===== INFO BOXES ===== */
.info-box {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 15px;
}

.info-box.tip {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
}

.info-box.warning {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
}

.info-box.important {
  background: #fce4ec;
  border-left: 4px solid #C41E3A;
}

.info-box.info {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
}

.info-box strong {
  display: block;
  margin-bottom: 4px;
}

/* ===== JAPANESE PHRASE BOX ===== */
.phrase-box {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}

.phrase-box .jp {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.phrase-box .romanji {
  font-size: 14px;
  color: #888;
  font-style: italic;
  margin-bottom: 4px;
}

.phrase-box .en {
  font-size: 14px;
  color: #555;
}

/* ===== COST TABLE ===== */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 15px;
}

.cost-table th {
  background: #1a1a2e;
  color: #fff;
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
}

.cost-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #e5e5e5;
}

.cost-table tr:nth-child(even) td {
  background: #f9f9f9;
}

/* ===== PROVIDER CARDS ===== */
.provider-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.provider-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.2s;
}

.provider-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.provider-card h5 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.provider-card .price {
  font-size: 14px;
  color: #C41E3A;
  font-weight: 600;
  margin-bottom: 8px;
}

.provider-card p {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.provider-card .btn-affiliate {
  display: inline-block;
  background: #C41E3A;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.provider-card .btn-affiliate:hover {
  background: #9B1830;
  color: #fff;
  text-decoration: none;
}

/* ===== FAQ ACCORDION ===== */
.faq-item {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  background: #fff;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  transition: background 0.2s;
}

.faq-question:hover {
  background: #f9f9f9;
}

.faq-question .arrow {
  transition: transform 0.3s;
  font-size: 12px;
}

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

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 20px 16px;
}

/* ===== WHAT YOU NEED BOX ===== */
.what-you-need {
  background: #fff;
  border: 2px solid #C41E3A;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 20px 0;
}

.what-you-need h4 {
  color: #C41E3A;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 16px;
}

.what-you-need ul {
  list-style: none;
  padding: 0;
}

.what-you-need li {
  padding: 4px 0 4px 24px;
  position: relative;
}

.what-you-need li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4caf50;
  font-weight: 700;
}

/* ===== LAST UPDATED ===== */
.last-updated {
  font-size: 12px;
  color: #999;
  margin-bottom: 16px;
}

/* ===== FOOTER ===== */
.footer {
  background: #1a1a2e;
  color: #aaa;
  padding: 30px 40px;
  text-align: center;
  font-size: 13px;
}

.footer a {
  color: #ccc;
}

.footer a:hover {
  color: #fff;
}

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

/* ===== MOBILE OVERLAY ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ===== AD PLACEHOLDERS ===== */
.ad-slot {
  background: #f0f0f0;
  border: 1px dashed #ccc;
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 13px;
  margin: 30px 0;
  border-radius: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

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

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

  .mobile-menu-btn {
    display: block;
  }

  .top-header {
    padding: 12px 20px;
  }

  .hero {
    padding: 40px 20px;
  }

  .hero h2 {
    font-size: 24px;
  }

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

  .content-area {
    padding: 20px;
  }

  .section h2 {
    font-size: 22px;
  }

  .section h3 {
    font-size: 18px;
  }

  .provider-cards {
    grid-template-columns: 1fr;
  }

  .step {
    padding-left: 50px;
  }

  .cost-table {
    font-size: 13px;
  }

  .cost-table th,
  .cost-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .hero h2 {
    font-size: 20px;
  }

  .content-area {
    padding: 16px;
  }

  .what-you-need {
    padding: 16px;
  }

  .phrase-box {
    padding: 12px 16px;
  }
}
