/* 光回線比較ガイド - 共通スタイルシート */

:root {
  --bg: #f7f9fc;
  --card: #ffffff;
  --brand: #3b82f6;
  --brand-2: #10b981;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --warn: #b45309;
  --ok: #065f46;
  --error: #dc2626;
  --shadow: 0 6px 24px rgba(2,6,23,.08), 0 2px 8px rgba(2,6,23,.06);
  --shadow-lg: 0 10px 30px rgba(2,6,23,.12), 0 4px 12px rgba(2,6,23,.08);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.header,
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
}

.nav-menu a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--brand);
  background: rgba(59, 130, 246, 0.05);
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
  width: 80%;
}

/* Buttons */
.btn {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  font-size: 1rem;
}

.btn-primary {
  background: var(--brand);
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--brand-2);
  color: white;
}

.btn-secondary:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}

.btn-outline:hover {
  background: var(--brand);
  color: white;
}

.btn-large {
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}

.btn-block {
  width: 100%;
  display: block;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--card);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Tables */
.table-wrapper {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--bg);
  font-weight: 600;
  color: var(--ink);
}

.highlight-row {
  background: rgba(59, 130, 246, 0.05);
}

/* Lists */
.features-list {
  list-style: none;
  margin: 1.5rem 0;
}

.features-list li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.features-list li i {
  color: var(--ok);
  width: 16px;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.pros h4 {
  color: var(--ok);
  margin-bottom: 1rem;
}

.cons h4 {
  color: var(--error);
  margin-bottom: 1rem;
}

.pros li i,
.cons li i {
  width: 16px;
}

.pros li i {
  color: var(--ok);
}

.cons li i {
  color: var(--error);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--ink);
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--brand);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-primary {
  background: var(--brand);
  color: white;
}

.badge-success {
  background: var(--ok);
  color: white;
}

.badge-warning {
  background: var(--warn);
  color: white;
}

.badge-error {
  background: var(--error);
  color: white;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid var(--brand);
  color: var(--brand);
}

.alert-success {
  background: rgba(6, 95, 70, 0.1);
  border-left: 4px solid var(--ok);
  color: var(--ok);
}

.alert-warning {
  background: rgba(180, 83, 9, 0.1);
  border-left: 4px solid var(--warn);
  color: var(--warn);
}

.alert-error {
  background: rgba(220, 38, 38, 0.1);
  border-left: 4px solid var(--error);
  color: var(--error);
}

/* Pricing */
.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0.5rem 0;
}

.price small {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 400;
}

.price-comparison {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.price-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 1.2rem;
}

.price-save {
  background: var(--error);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Footer */
footer {
  background: var(--ink);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: white;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: block;
  margin: 0.5rem 0;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-list a {
  color: var(--brand);
  text-decoration: none;
}

.breadcrumb-list a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--muted);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.3s ease;
}

.nav-toggle:hover {
  background: rgba(59, 130, 246, 0.1);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--ink);
  margin: 2px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 3rem; }

.font-weight-bold { font-weight: 700; }
.text-muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.text-success { color: var(--ok); }
.text-warning { color: var(--warn); }
.text-error { color: var(--error); }

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

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

  .container,
  .container-narrow {
    padding: 0 15px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .pros-cons {
    grid-template-columns: 1fr;
  }

  .btn-large {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }

  th, td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 2rem 0;
  }

  .card {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .price {
    font-size: 1.5rem;
  }
}

/* FAQ Section */
.faq-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: var(--line);
}

.faq-question i {
  transition: transform 0.3s ease;
  color: var(--brand);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: var(--background);
}

.faq-answer.active {
  max-height: 500px; /* 十分な高さを確保 */
}

.faq-answer p {
  padding: 1.5rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}