/* ============================================
   海外移住コンサルティング - Overseas Relocation
   オリジナルデザイン: 洗練されたモダンビジネススタイル
   ============================================ */

/* CSS Variables */
:root {
  --primary-color: #1a4f7a;
  --primary-light: #2d6fa3;
  --primary-dark: #0f3554;
  --secondary-color: #d4a84b;
  --secondary-light: #e8c77a;
  --accent-color: #2ecc71;
  --text-dark: #2c3e50;
  --text-light: #5d6d7e;
  --text-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --bg-dark: #1a252f;
  --border-color: #e0e4e8;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --transition: all 0.3s ease;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.75rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* Header */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo span {
  color: var(--secondary-color);
}

/* Navigation */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 900px;
  justify-content: center;
}

.nav-item a {
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-item a:hover {
  background: var(--primary-color);
  color: var(--text-white);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26, 79, 122, 0.85), rgba(15, 53, 84, 0.9));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--text-white);
  padding: 2rem;
  max-width: 800px;
}

.hero-content h1 {
  color: var(--text-white);
  margin-bottom: 1rem;
  font-size: 3rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.hero-btn {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--text-dark);
  padding: 1rem 2.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
}

.hero-btn:hover {
  background: var(--secondary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Main Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

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

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

.section-title h2 {
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
}

/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
}

.main-content {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--secondary-color);
  margin-bottom: 1rem;
}

/* Table of Contents */
.toc-list {
  list-style: none;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

.toc-list a {
  color: var(--text-light);
  font-size: 0.9rem;
  display: block;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.toc-list a:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

/* News List */
.news-list {
  list-style: none;
}

.news-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
  border-bottom: none;
}

.news-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.news-item p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card-content p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  font-weight: 500;
}

.card-link:hover {
  color: var(--secondary-color);
}

/* Content Styles */
.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  color: var(--primary-color);
  font-size: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--secondary-color);
  margin-bottom: 1.5rem;
}

.content-section h3 {
  color: var(--primary-dark);
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content-section h4 {
  color: var(--text-dark);
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

.content-section p {
  text-align: justify;
  margin-bottom: 1.5rem;
}

.content-section ul, .content-section ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-light);
}

.content-section li {
  margin-bottom: 0.5rem;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--border-color);
}

.comparison-table th {
  background: var(--primary-color);
  color: var(--text-white);
  font-weight: 600;
}

.comparison-table tr:nth-child(even) {
  background: var(--bg-light);
}

.comparison-table tr:hover {
  background: rgba(26, 79, 122, 0.05);
}

/* Info Box */
.info-box {
  background: linear-gradient(135deg, var(--bg-light), rgba(26, 79, 122, 0.05));
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.info-box h4 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.info-box p {
  margin-bottom: 0;
}

/* Warning Box */
.warning-box {
  background: rgba(212, 168, 75, 0.1);
  border-left: 4px solid var(--secondary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.warning-box h4 {
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  font-size: 0.85rem;
}

.breadcrumb-list li::after {
  content: '>';
  margin: 0 0.5rem;
  color: var(--text-light);
}

.breadcrumb-list li:last-child::after {
  content: '';
}

.breadcrumb-list a {
  color: var(--text-light);
}

.breadcrumb-list a:hover {
  color: var(--primary-color);
}

/* About Section */
.about-section {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
}

.about-section h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Related Links */
.related-links {
  list-style: none;
}

.related-links li {
  margin-bottom: 0.75rem;
}

.related-links a {
  display: block;
  padding: 0.75rem;
  background: var(--bg-light);
  border-radius: var(--border-radius-sm);
  color: var(--text-dark);
  font-size: 0.9rem;
  transition: var(--transition);
}

.related-links a:hover {
  background: var(--primary-color);
  color: var(--text-white);
}

/* Amazon Banner */
.amazon-banner {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  text-align: center;
  margin: 1rem 0;
}

.amazon-banner a {
  color: var(--text-dark);
  font-size: 0.9rem;
}

.amazon-banner div {
  padding: 0.5rem;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

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

.footer-section h3 {
  color: var(--secondary-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin: 0;
}

.footer-required-links {
  margin-top: 1rem;
}

.footer-required-links a {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0.75rem;
  font-size: 0.85rem;
}

.footer-required-links a:hover {
  color: var(--secondary-color);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .two-column {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: -1;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    gap: 0;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item a {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
  }

  .hamburger {
    display: flex;
  }

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

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

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

  .hero {
    height: 50vh;
    min-height: 400px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 2rem 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 1.5rem;
  }

  .comparison-table {
    font-size: 0.85rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Print Styles */
@media print {
  .header, .footer, .sidebar {
    display: none;
  }

  .main-content {
    box-shadow: none;
    padding: 0;
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}



/* === Mobile fix v3 (auto-injected) === */
html, body { overflow-x: hidden; }
img, video, iframe, table { max-width: 100%; }

@media (max-width: 768px) {
  /* ヒーローテキストがviewportからはみ出さないようにする */
  h1, h2, h3 {
    font-size: clamp(1.3rem, 5vw, 2.5rem) !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  p, li, td, th, span, a {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  /* 全要素の幅を100vw以内に */
  .container, main, section, article, header, footer, nav,
  [class*="container"], [class*="wrapper"], [class*="content"] {
    max-width: 100vw;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}
/* === End Mobile fix v3 === */
