/* 海外不動産投資仲介サイト - スタイルシート */

/* CSS Variables */
:root {
  --primary-color: #1a3a5c;
  --primary-light: #2d5a87;
  --primary-dark: #0d2840;
  --secondary-color: #c9a962;
  --secondary-light: #dfc98a;
  --accent-color: #e8b923;
  --text-dark: #2c3e50;
  --text-light: #5d6d7e;
  --text-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-dark: #1a2332;
  --bg-card: #ffffff;
  --border-color: #e1e8ed;
  --shadow: 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: 12px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.4;
  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.1rem; }
h6 { font-size: 1rem; }

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

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

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

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-white);
}

.logo-sub {
  font-size: 0.7rem;
  color: var(--secondary-light);
  display: block;
}

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

.nav-item a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--secondary-light);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-white);
  border-radius: 3px;
  transition: var(--transition);
}

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

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

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

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

/* Page Hero (smaller) */
.page-hero {
  height: 40vh;
  min-height: 300px;
}

.page-hero .hero-title {
  font-size: 2.2rem;
}

/* Main Content */
.main-content {
  padding: 4rem 0;
}

/* Two Column Layout */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

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

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

.sidebar-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.sidebar-title {
  font-size: 1.1rem;
  color: var(--primary-color);
  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 {
  font-size: 0.9rem;
  color: var(--text-light);
  display: block;
  padding: 0.3rem 0;
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
}

.toc-list a:hover {
  color: var(--primary-color);
  border-left-color: var(--secondary-color);
}

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

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

.related-list a {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.related-list a::before {
  content: '→';
  color: var(--secondary-color);
}

/* Ad Space */
.ad-space {
  text-align: center;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
}

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

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

.article-section:last-child {
  margin-bottom: 0;
}

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

.section-content p {
  text-align: justify;
}

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

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

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

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

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

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

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

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

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

.news-date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.news-title {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* Site Overview */
.site-overview {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-white);
  padding: 3rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.site-overview h2 {
  color: var(--secondary-light);
  margin-bottom: 1rem;
}

.site-overview p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  line-height: 1.9;
}

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

.amazon-banner a {
  color: #333;
  font-size: 0.9rem;
}

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

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

.footer-section h3 {
  color: var(--secondary-light);
  font-size: 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;
}

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

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

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

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
}

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

.breadcrumb span {
  color: var(--text-light);
  margin: 0 0.5rem;
}

/* Info Box */
.info-box {
  background: var(--bg-light);
  border-left: 4px solid var(--secondary-color);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

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

.data-table th,
.data-table td {
  padding: 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);
}

/* Button */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--secondary-color);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background: var(--secondary-light);
  color: var(--primary-dark);
}

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

  .sidebar {
    order: 2;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 1rem 0;
    gap: 0;
  }

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

  .nav-item {
    width: 100%;
  }

  .nav-item a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

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

  .page-hero .hero-title {
    font-size: 1.6rem;
  }

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

  .site-overview {
    padding: 2rem 1.5rem;
  }

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

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

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

  .content-wrapper {
    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 === */
