/* ===================================
   海外配送・転送サービスサイト
   Global Styles
   =================================== */

/* CSS Variables */
:root {
  --primary-color: #1a3a5c;
  --primary-light: #2c5282;
  --secondary-color: #e67e22;
  --accent-color: #3498db;
  --text-dark: #2d3748;
  --text-light: #4a5568;
  --text-muted: #718096;
  --bg-light: #f7fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.4;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

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

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo a {
  color: inherit;
}

/* 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(--radius-md);
  transition: var(--transition);
  font-size: 0.9rem;
  white-space: nowrap;
}

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

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  margin: 3px 0;
  transition: var(--transition);
}

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

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
  color: white;
}

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

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

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

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

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

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

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

/* 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.3rem 0;
}

.toc-list a:hover {
  color: var(--primary-color);
  padding-left: 0.5rem;
}

/* Article Sections */
.article-section {
  margin-bottom: 3rem;
}

.article-section h2 {
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--secondary-color);
  margin-bottom: 1.5rem;
}

.article-section h3 {
  color: var(--primary-light);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

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

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

.card-image {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.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-muted);
  margin-bottom: 1rem;
}

.card-link {
  display: inline-block;
  color: var(--accent-color);
  font-weight: 500;
  font-size: 0.9rem;
}

/* 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-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.news-summary {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Info Box */
.info-box {
  background: linear-gradient(135deg, #ebf4ff 0%, #f0f7ff 100%);
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

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

/* Warning Box */
.warning-box {
  background: #fffbeb;
  border-left: 4px solid var(--secondary-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

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

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

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

.data-table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--primary-color);
}

.data-table tr:hover {
  background: var(--bg-light);
}

/* Calculation Box */
.calc-box {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
}

.calc-box .formula {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.calc-box .result {
  font-size: 1.25rem;
  color: var(--secondary-color);
  font-weight: 700;
}

/* List Styles */
.feature-list {
  list-style: none;
  margin: 1rem 0;
}

.feature-list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: 700;
}

/* Banner Styles */
.amazon-banner {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  margin: 1rem 0;
}

.amazon-banner a {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.sidebar-ad {
  text-align: center;
  padding: 1rem;
}

.sidebar-ad img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

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

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

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

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

.footer-related {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 1.5rem;
}

.footer-related h4 {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

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

.footer-copyright {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-widget {
    flex: 1;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    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.5rem;
  }

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

  .nav-item {
    width: 100%;
  }

  .nav-item a {
    display: block;
    padding: 0.75rem 1rem;
  }

  .hamburger {
    display: flex;
  }

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

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

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

  .main-content {
    padding: 2rem 1rem;
  }

  .content-main {
    padding: 1.5rem;
  }

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

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

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

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

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

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

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

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



/* === 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 === */
