/* ============================================
   Vertical Edge - 産業用ロープアクセス業界
   Deep alpine green + safety orange + glacier white
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+JP:wght@300;400;500;600;700;800&display=swap');

:root {
  --green-deep: #0d3b2e;
  --green-mid: #145c47;
  --green-light: #1a7a5c;
  --orange: #ff6b2b;
  --orange-hover: #e55a1f;
  --orange-glow: rgba(255, 107, 43, 0.25);
  --white-glacier: #f7f9fc;
  --white-pure: #ffffff;
  --gray-100: #f0f3f5;
  --gray-200: #e2e7eb;
  --gray-300: #c5cdd3;
  --gray-500: #6b7b8a;
  --gray-700: #3a4a56;
  --gray-900: #1a2530;
  --text-main: #1e2d38;
  --text-sub: #4a5e6d;
  --shadow-sm: 0 2px 8px rgba(13, 59, 46, 0.08);
  --shadow-md: 0 4px 20px rgba(13, 59, 46, 0.12);
  --shadow-lg: 0 12px 40px rgba(13, 59, 46, 0.18);
  --shadow-card: 0 2px 12px rgba(13, 59, 46, 0.06);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
  background-color: var(--white-glacier);
}

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

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

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

/* ============================================
   Header
   ============================================ */
header {
  background: var(--green-deep);
  color: var(--white-pure);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo a {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white-pure);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo a::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 28px;
  background: var(--orange);
  border-radius: 2px;
}

.logo a:hover {
  color: var(--orange);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

nav ul li a {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--white-pure);
  background: rgba(255, 255, 255, 0.12);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white-pure);
  list-style: none;
  min-width: 200px;
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
  z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-dropdown-menu li a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0;
}

.nav-dropdown-menu li a:hover {
  background: var(--green-deep);
  color: var(--white-pure);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white-pure);
  border-radius: 2px;
  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(5px, -5px);
}

/* ============================================
   Hero - Main Index
   ============================================ */
.hero {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white-pure);
  background-image: url('images/hero-main.png');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,59,46,0.35) 0%, rgba(13,59,46,0.55) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 2rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.3);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  line-height: 1.6;
}

.hero-subtitle a {
  color: var(--white-pure);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================
   Page Hero (content pages)
   ============================================ */
.page-hero,
.hero.page-hero-style {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white-pure);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,59,46,0.4) 0%, rgba(13,59,46,0.6) 100%);
  z-index: 1;
}

.page-hero h1 {
  position: relative;
  z-index: 2;
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.3);
  padding: 0 2rem;
  line-height: 1.3;
}

/* Page-specific hero backgrounds */
.page-01 .hero { background-image: url('images/page-01-safety-equipment.png'); }
.page-02 .hero { background-image: url('images/page-02-irata-training.png'); }
.page-03 .hero { background-image: url('images/page-03-bridge-inspection.png'); }
.page-04 .hero { background-image: url('images/page-04-wind-turbine.png'); }
.page-05 .hero { background-image: url('images/page-05-oil-platform.png'); }
.page-06 .hero { background-image: url('images/page-06-drone-ai.png'); }
.page-07 .hero { background-image: url('images/page-07-training-facility.png'); }
.page-08 .hero { background-image: url('images/page-08-market-growth.png'); }
.page-09 .hero { background-image: url('images/page-09-standards.png'); }
.page-10 .hero { background-image: url('images/page-10-future.png'); }

/* ============================================
   Container / Layout
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

.content-section {
  margin-bottom: 0;
}

.content-section .container {
  background: var(--white-pure);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-top: -60px;
  position: relative;
  z-index: 3;
  padding: 3rem 3.5rem;
}

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

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

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
  background: var(--gray-100);
  padding: 0.8rem 0;
}

.breadcrumb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.breadcrumb ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.breadcrumb li::after {
  content: '›';
  margin-left: 0.5rem;
  color: var(--gray-500);
}

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

.breadcrumb a {
  color: var(--green-mid);
}

/* ============================================
   Typography (content sections)
   ============================================ */
.content-section h2,
section h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 3px solid var(--green-deep);
  position: relative;
  line-height: 1.3;
}

.content-section h2::after,
section h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--orange);
}

.content-section h3,
section h3 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--green-deep);
  margin: 2rem 0 0.8rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--orange);
}

.content-section h4,
section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 1.5rem 0 0.8rem;
}

.content-section p,
section p {
  margin-bottom: 1.2rem;
  line-height: 1.9;
  color: var(--text-sub);
}

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

.content-section li {
  margin-bottom: 0.6rem;
  line-height: 1.7;
}

.content-section li strong {
  color: var(--text-main);
}

/* Glossary links */
a.glossary-link {
  color: var(--green-mid);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  font-weight: 500;
}

a.glossary-link:hover {
  color: var(--orange);
  text-decoration-style: solid;
}

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

.card-grid > div {
  padding: 1.5rem;
  background: var(--white-glacier);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.card-grid > div:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-grid > div h3 {
  margin-top: 0;
  border-left: none;
  padding-left: 0;
}

.card-grid > div h3 a {
  color: var(--green-deep);
  font-weight: 700;
}

.card-grid > div h3 a:hover {
  color: var(--orange);
}

/* ============================================
   Latest News Section
   ============================================ */
.latest-news {
  background: var(--gray-100);
  padding: 3rem 0;
}

.latest-news .container {
  background: transparent;
  box-shadow: none;
  margin-top: 0;
  padding: 0 2rem;
}

.latest-news h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--green-deep);
}

.news-list {
  list-style: none;
}

.news-item {
  padding: 1.2rem 1.5rem;
  margin-bottom: 0.8rem;
  background: var(--white-pure);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--orange);
  transition: var(--transition);
}

.news-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

.news-date {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 600;
}

.news-item a {
  color: var(--text-main);
  font-weight: 500;
}

.news-item a:hover {
  color: var(--orange);
}

.view-all-link,
.news-link a {
  display: inline-block;
  color: var(--orange);
  font-weight: 600;
  margin-top: 1rem;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar-section {
  background: var(--white-pure);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.sidebar-section h3 {
  font-size: 1.1rem;
  color: var(--green-deep);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--green-deep);
  border-left: none;
  padding-left: 0;
}

.sidebar-section ul {
  list-style: none;
}

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

.sidebar-section a {
  color: var(--text-sub);
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.sidebar-section a:hover {
  background: var(--gray-100);
  color: var(--orange);
  padding-left: 1rem;
}

/* Ad Space */
.ad-space {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  border: 1px dashed var(--gray-300);
}

/* TOC */
.toc {
  background: var(--white-pure);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.toc h3 {
  font-size: 1.05rem;
  color: var(--green-deep);
  margin-bottom: 0.8rem;
  border-left: none;
  padding-left: 0;
}

.toc ul {
  list-style: none;
}

.toc li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.toc li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-size: 0.8rem;
}

.toc a {
  color: var(--text-sub);
  font-size: 0.92rem;
}

.toc a:hover {
  color: var(--orange);
}

/* ============================================
   Related Links
   ============================================ */
.related-links {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--gray-100);
  border-radius: var(--radius-md);
}

.related-links h3 {
  border-left: none;
  padding-left: 0;
}

.related-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.related-link-item {
  padding: 1rem;
  background: var(--white-pure);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--orange);
  transition: var(--transition);
}

.related-link-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Footer
   ============================================ */
footer {
  background: var(--gray-900);
  color: var(--white-pure);
  padding: 2.5rem 0 1.5rem;
  margin-top: 0;
}

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

.footer-links {
  text-align: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

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

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

.copyright {
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

/* ============================================
   IntersectionObserver Reveal
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .sidebar {
    position: static;
  }

  .content-section .container {
    margin-top: -40px;
    padding: 2.5rem 2rem;
  }
}

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

  .logo a {
    font-size: 1.1rem;
  }

  .hamburger {
    display: flex;
  }

  #nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--green-deep);
    z-index: 999;
    box-shadow: var(--shadow-lg);
  }

  #nav-menu.active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    padding: 0.5rem 0;
    gap: 0;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    display: block;
    padding: 0.8rem 1.5rem;
    border-radius: 0;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
  }

  nav ul li a:hover {
    background: rgba(255,255,255,0.08);
  }

  .nav-dropdown-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: rgba(0,0,0,0.15);
    box-shadow: none;
    border-radius: 0;
    transform: none;
    padding: 0;
    min-width: auto;
  }

  .nav-dropdown.active .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-menu li a {
    padding-left: 2.5rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
  }

  .nav-dropdown-menu li a:hover {
    background: rgba(255,255,255,0.08);
    color: var(--orange);
  }

  .hero {
    height: 450px;
  }

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

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

  .page-hero {
    height: 320px;
  }

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

  .container {
    padding: 2rem 1rem;
  }

  .content-section .container {
    margin-top: -30px;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
  }

  .content-section h2,
  section h2 {
    font-size: 1.5rem;
  }

  .content-section h3,
  section h3 {
    font-size: 1.2rem;
  }

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

  .two-column-layout {
    padding: 2rem 1rem;
  }
}

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

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

  .page-hero h1 {
    font-size: 1.5rem;
  }

  .content-section h2,
  section h2 {
    font-size: 1.3rem;
  }
}

/* Mobile overflow fix */
html, body { overflow-x: hidden; }
img, video, iframe, table { max-width: 100%; }

@media (max-width: 768px) {
  h1, h2, h3 {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  p, li, td, th, span, a {
    overflow-wrap: break-word;
    word-break: break-word;
  }
}
