/* =============================================
   東北ラヂエーター株式会社 - 共通スタイルシート
   ============================================= */

/* --- Base & Typography --- */
body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* --- Sticky Header --- */
.header-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* --- Mobile Menu --- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.mobile-menu.open {
  max-height: 80vh;
  overflow-y: auto;
}

.hamburger-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger-active .hamburger-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.hamburger-active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-active .hamburger-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* --- Page Hero --- */
.page-hero {
  background: linear-gradient(135deg, #003366 0%, #004d80 50%, #002244 100%);
}

/* --- Sidebar --- */
.sidebar-category-title {
  background-color: #003366;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  letter-spacing: 0.05em;
}

.sidebar-link {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}
.sidebar-link:hover {
  background-color: #eff6ff;
  color: #003366;
  padding-left: 1.25rem;
}
.sidebar-link-active {
  background-color: #eff6ff;
  color: #003366;
  font-weight: 600;
  border-left: 3px solid #0066cc;
}

/* --- Section Title --- */
.section-title {
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 3px;
  background-color: #31a88d;
  border-radius: 2px;
}

/* --- Process Steps --- */
.process-step {
  position: relative;
  padding-left: 3.5rem;
  padding-bottom: 0.5rem;
}
.process-step::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  background-color: #003366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.process-step + .process-step {
  border-top: 1px dashed #e5e7eb;
  padding-top: 1rem;
}

/* --- Product Cards --- */
.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Footer Links --- */
.footer-link {
  transition: color 0.15s ease;
}

/* --- Map Section (Access page) --- */
.map-topline {
  border-top: 2px dotted #ccc;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

/* --- Responsive Table --- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .table-stack thead {
    display: none;
  }
  .table-stack tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
  }
  .table-stack tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.8rem;
  }
  .table-stack tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #003366;
    margin-right: 1rem;
    flex-shrink: 0;
  }
  .table-stack tbody td:last-child {
    border-bottom: none;
  }
}

/* --- Index Page: Product Nav Buttons --- */
.product-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.product-nav-btn {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  color: #1f2937;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  min-height: 64px;
}
.product-nav-btn:hover {
  background-color: #eff6ff;
  border-color: #0066cc;
  transform: translateY(-1px);
}
.product-nav-btn .btn-icon {
  margin-right: 0.75rem;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.product-nav-btn.full-width {
  grid-column: 1 / -1;
}

/* Category header for product nav */
.product-nav-category {
  grid-column: 1 / -1;
  background: #003366;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}
.product-nav-category:first-child {
  margin-top: 0;
}

/* Accent button variants */
.product-nav-btn.btn-green {
  background: #f0fdf4;
  border-color: #31a88d;
  color: #166534;
}
.product-nav-btn.btn-green:hover {
  background: #dcfce7;
}
.product-nav-btn.btn-orange {
  background: #fffbeb;
  border-color: #d97706;
  color: #92400e;
}
.product-nav-btn.btn-orange:hover {
  background: #fef3c7;
}

/* --- Index Page: Info Boxes (left sidebar on original) --- */
.info-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.info-box:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}
.info-box-header {
  background: linear-gradient(135deg, #31a88d, #28967d);
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.info-box-body {
  padding: 1rem;
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.7;
}

/* --- News Section --- */
.news-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.85rem;
}
.news-item:last-child {
  border-bottom: none;
}
.news-date {
  flex-shrink: 0;
  color: #6b7280;
  font-size: 0.8rem;
  min-width: 6rem;
}

/* --- Scroll to top --- */
.back-to-top {
  background: #fbfbe6;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.back-to-top:hover {
  background: #fef9c3;
}

/* --- Print --- */
@media print {
  .header-sticky { position: relative; }
  .mobile-menu, #mobile-menu-btn, #sidebar-toggle { display: none !important; }
  .fade-in { opacity: 1; transform: none; }
}
