/* Global Recruitment Site - Styles */
/* Color Palette: Professional blue with warm accents */

:root {
  --primary: #1e3a5f;
  --primary-light: #2d5a8c;
  --primary-dark: #0f2744;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --accent-dark: #d35400;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --text-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --bg-gray: #ecf0f1;
  --border: #dde4e6;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-strong: rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
  --radius: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

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;
}

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

/* Header */
.header {
  background: var(--bg-white);
  box-shadow: 0 2px 10px var(--shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

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

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

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

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-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-dark);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  transition: var(--transition);
  font-size: 0.9rem;
  white-space: nowrap;
}

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

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

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

.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, -6px);
}

/* Hero Section */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 80px;
  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;
  text-align: center;
  color: var(--text-white);
  padding: 2rem;
  max-width: 800px;
}

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

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

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

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

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

/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-main {
  min-width: 0;
}

.content-sidebar {
  min-width: 0;
}

/* Sidebar */
.sidebar-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid var(--border);
}

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

/* 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-dark);
  display: block;
  padding: 0.3rem 0;
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
}

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

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

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

.related-links a {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.related-links a::before {
  content: '▶';
  font-size: 0.6rem;
  color: var(--accent);
}

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

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

.amazon-banner a {
  color: var(--primary);
  font-weight: 500;
}

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

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

.section-subtitle {
  font-size: 1.3rem;
  margin: 2rem 0 1rem;
  color: var(--primary);
}

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

.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-strong);
}

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

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

.card-content {
  padding: 1.5rem;
}

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

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

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

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

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

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

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

.news-title {
  font-weight: 600;
  color: var(--text-dark);
}

/* Overview Section */
.overview {
  background: var(--bg-light);
  padding: 3rem;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.overview p {
  font-size: 1.05rem;
  line-height: 2;
}

/* Article Content */
.article-content {
  font-size: 1rem;
  line-height: 1.9;
}

.article-content h2 {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article-content h3 {
  margin-top: 2rem;
  color: var(--primary);
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1rem 2rem;
}

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

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-style: italic;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

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

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

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

/* Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--text-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.highlight-box h3 {
  color: var(--text-white);
  margin-bottom: 1rem;
}

/* Info Box */
.info-box {
  background: #e8f4f8;
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

/* CTA Section */
.cta-section {
  background: var(--bg-gray);
  padding: 3rem;
  text-align: center;
  border-radius: var(--radius-lg);
  margin: 3rem 0;
}

.cta-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

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

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

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

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

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

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

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

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

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

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

.footer-legal a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

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

.breadcrumb span {
  margin: 0 0.5rem;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--text-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--shadow);
  transition: var(--transition);
  z-index: 999;
}

.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.back-to-top.visible {
  display: flex;
}

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

  .content-sidebar {
    order: -1;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-white);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    box-shadow: -2px 0 10px var(--shadow);
    transition: var(--transition);
    align-items: flex-start;
    overflow-y: auto;
  }

  .nav-menu.active {
    right: 0;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero {
    height: 60vh;
    min-height: 400px;
  }

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

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

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

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

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

  .overview {
    padding: 1.5rem;
  }

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

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

  .footer-legal {
    flex-direction: column;
    gap: 0.5rem;
  }
}

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

  .header-inner {
    padding: 0.75rem 1rem;
  }

  .logo-text {
    font-size: 1rem;
  }

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

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

  .two-column {
    padding: 0 1rem;
  }

  .sidebar-section {
    padding: 1rem;
  }
}



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