/* ============================================
   Skyline Horizon Design System
   Sky blue (#0ea5e9) to deep navy (#0c2d57)
   Electric cyan (#22d3ee) accents
   ============================================ */

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

/* --- CSS Variables --- */
:root {
  --sky-blue: #0ea5e9;
  --deep-navy: #0c2d57;
  --electric-cyan: #22d3ee;
  --light-sky: #e0f2fe;
  --pale-sky: #f0f9ff;
  --white: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 24px rgba(14, 165, 233, 0.08);
  --card-hover-shadow: 0 8px 40px rgba(14, 165, 233, 0.16);
  --gradient-header: linear-gradient(135deg, var(--sky-blue) 0%, var(--deep-navy) 100%);
  --gradient-hero: linear-gradient(180deg, rgba(12, 45, 87, 0.55) 0%, rgba(14, 165, 233, 0.35) 100%);
  --font-main: 'Outfit', 'Noto Sans JP', sans-serif;
  --max-width: 1200px;
  --header-height: 64px;
  --z-header: 1000;
  --z-hamburger: 1010;
  --z-overlay: 999;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--pale-sky);
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--electric-cyan);
}

ul, ol {
  padding-left: 1.5rem;
}

/* --- Header --- */
header, .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: var(--gradient-header);
  height: var(--header-height);
  box-shadow: 0 2px 16px rgba(12, 45, 87, 0.2);
  backdrop-filter: blur(12px);
}

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

.logo a {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.02em;
}

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

/* --- Navigation --- */
.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 900px;
}

.nav-menu ul li a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}

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

/* --- Hamburger --- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: var(--z-hamburger);
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 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 Section --- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--header-height);
  overflow: hidden;
  background: var(--deep-navy);
}

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

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-hero);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: 800px;
}

.hero-content h1 {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* --- Page Hero (subpages) --- */
.page-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--header-height);
  overflow: hidden;
  background: var(--deep-navy);
}

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

.page-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-hero);
  z-index: 2;
}

.page-hero .hero-content {
  position: relative;
  z-index: 3;
}

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

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.breadcrumb ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb ul li + li::before {
  content: '>';
  margin-right: 0.5rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--sky-blue);
}

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

.content-section {
  padding: 3rem 0;
}

.two-column-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
}

/* --- Main Content --- */
.main-content {
  min-width: 0;
}

.main-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--deep-navy);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.main-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--deep-navy);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--electric-cyan);
  line-height: 1.4;
}

.main-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--deep-navy);
  margin: 1.5rem 0 0.75rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--sky-blue);
}

.main-content p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.main-content section {
  margin-bottom: 2rem;
}

.main-content ul li,
.main-content ol li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.main-content strong {
  color: var(--deep-navy);
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: 12px;
  border-left: 4px solid var(--sky-blue);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all var(--transition);
}

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

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 0.5rem;
  border: none;
  padding: 0;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- CTA Section --- */
.cta-section {
  margin: 3rem 0;
}

.cta-section h2 {
  text-align: center;
  border: none;
  margin-bottom: 2rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.cta-card {
  display: block;
  background: var(--white);
  border-radius: 12px;
  border-left: 4px solid var(--electric-cyan);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all var(--transition);
  text-decoration: none;
}

.cta-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-3px);
  border-left-color: var(--sky-blue);
}

.cta-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 0.5rem;
}

.cta-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- News Items --- */
.news-item {
  background: var(--white);
  border-radius: 10px;
  border-left: 4px solid var(--sky-blue);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--card-shadow);
  transition: all var(--transition);
}

.news-item:hover {
  box-shadow: var(--card-hover-shadow);
}

.news-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--deep-navy);
  margin-bottom: 0.5rem;
  border: none;
  padding: 0;
}

.news-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- News List --- */
.latest-news, .latest-news-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.latest-news h2, .latest-news-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 1.5rem;
  text-align: center;
}

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

.news-list li {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--sky-blue);
  margin-bottom: 0.75rem;
  background: var(--white);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.news-list li:hover {
  border-left-color: var(--electric-cyan);
  box-shadow: var(--card-shadow);
}

.news-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-items .news-item {
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.news-items .news-item time {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

.news-icon { display: none; }
.news-title { font-weight: 500; }
.news-date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-left: 0.5rem;
}
.news-item-title { font-weight: 500; }
.news-item-source {
  font-size: 0.8rem;
  color: var(--text-light);
}

.view-all-news, .news-link a, .news-more-link a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.5rem;
  background: var(--sky-blue);
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  text-align: center;
}

.view-all-news:hover, .news-link a:hover, .news-more-link a:hover {
  background: var(--deep-navy);
  color: var(--white);
}

/* --- Sidebar --- */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  align-self: start;
}

.sidebar-widget, .sidebar-section {
  background: var(--white);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}

.sidebar-widget h3, .sidebar-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--electric-cyan);
}

.sidebar-widget ul, .sidebar-section ul {
  list-style: none;
  padding: 0;
}

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

.sidebar-widget ul li a, .sidebar-section ul li a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  display: block;
  padding: 0.3rem 0;
}

.sidebar-widget ul li a:hover, .sidebar-section ul li a:hover {
  color: var(--sky-blue);
}

.market-data .highlight {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sky-blue);
  margin-bottom: 1rem;
}

.cta-button {
  display: block;
  text-align: center;
  padding: 0.75rem;
  background: var(--gradient-header);
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  transition: all var(--transition);
}

.cta-button:hover {
  opacity: 0.9;
  color: var(--white);
  transform: translateY(-1px);
}

/* --- Amazon Banner --- */
.amazon-banner {
  background: var(--light-sky);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  text-align: center;
  font-size: 0.85rem;
}

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

/* --- Read More Link --- */
.read-more {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--sky-blue);
  color: var(--white);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  margin-top: 0.5rem;
}

.read-more:hover {
  background: var(--deep-navy);
  color: var(--white);
}

/* --- Related Pages --- */
.related-pages {
  background: var(--light-sky);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.related-pages h2 {
  border: none;
  margin-top: 0;
  font-size: 1.2rem;
}

.related-pages ul {
  list-style: none;
  padding: 0;
}

.related-pages ul li {
  margin-bottom: 0.5rem;
}

.related-pages ul li a {
  font-weight: 500;
}

/* --- Footer --- */
footer {
  background: var(--deep-navy);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3rem;
}

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

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-section h3 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-section p {
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.4rem;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-section ul li a:hover {
  color: var(--electric-cyan);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --- Scroll-to-top Button --- */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--gradient-header);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(12, 45, 87, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 100;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(12, 45, 87, 0.4);
}

/* --- Fade-in Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Table --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

th {
  background: var(--deep-navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--pale-sky);
}

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

  .sidebar {
    position: static;
  }

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

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

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--deep-navy);
    padding: 5rem 1.5rem 2rem;
    transition: right var(--transition);
    z-index: var(--z-overlay);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
  }

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

  .nav-menu ul {
    flex-direction: column;
    gap: 0;
    max-width: none;
  }

  .nav-menu ul li a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
  }

  .hero {
    min-height: 400px;
  }

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

  .page-hero {
    min-height: 280px;
  }

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

  .main-content h1 {
    font-size: 1.5rem;
  }

  .main-content h2 {
    font-size: 1.25rem;
  }

  .main-content h3 {
    font-size: 1.1rem;
  }

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

  .news-items .news-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  body {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

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

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

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

/* --- Overlay for mobile menu --- */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-overlay) - 1);
}

.nav-overlay.active {
  display: block;
}

/* --- Section inner --- */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
