/* ===========================
   Reset & Base Styles
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2c5aa0;
  --secondary-color: #4a7dc5;
  --accent-color: #f39c12;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #ffffff;
  --bg-gray: #f8f9fa;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  color: var(--text-color);
  background-color: var(--bg-color);
  font-size: 16px;
}

/* ===========================
   Header & Navigation
   =========================== */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  position: relative;
}

/* Header with background image */
header.with-bg-image {
  background-image: linear-gradient(135deg, rgba(44, 90, 160, 0.9), rgba(74, 125, 197, 0.9)),
                    url('../images/header-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Alternative: Full-width hero header image */
.header-hero-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.header-hero-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  margin-bottom: 0;
}

.header-hero-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(44, 90, 160, 0.65), rgba(74, 125, 197, 0.65));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 2rem;
}

.header-hero-content h1 {
  color: white;
  border: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  font-size: 4rem;
  font-weight: 800;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}

.header-hero-content p {
  font-size: 1.8rem;
  margin: 0;
  font-weight: 300;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.05em;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.site-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.site-description {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  opacity: 0.8;
  border-bottom-color: var(--accent-color);
}

/* ===========================
   Main Content
   =========================== */
main {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.breadcrumb {
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.content-wrapper {
  background: white;
  padding: 3rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* ===========================
   Typography
   =========================== */
h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  border-bottom: 3px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--accent-color);
}

h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.25rem;
}

strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* ===========================
   Lists
   =========================== */
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ===========================
   Tables
   =========================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  background: white;
}

thead {
  background: var(--primary-color);
  color: white;
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background-color: var(--bg-gray);
}

/* ===========================
   Special Elements
   =========================== */
.highlight-box {
  background: linear-gradient(135deg, #fff8e1, #ffe0b2);
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

blockquote {
  background: var(--bg-gray);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-light);
}

hr {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 3rem 0;
}

/* ===========================
   Links
   =========================== */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ===========================
   Footer
   =========================== */
footer {
  background: var(--text-color);
  color: white;
  padding: 3rem 2rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
  text-decoration: none;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ===========================
   Related Links
   =========================== */
.related-links {
  background: var(--bg-gray);
  padding: 2rem;
  border-radius: 8px;
  margin-top: 3rem;
}

.related-links h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.related-links ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.related-links li {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.related-links li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.related-links a {
  display: block;
  font-weight: 500;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .header-container {
    padding: 1rem 1.5rem;
  }

  .site-title {
    font-size: 1.5rem;
  }

  nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  main {
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .content-wrapper {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 0.75rem 0.5rem;
  }

  .footer-nav {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
  header, footer, nav {
    display: none;
  }

  main {
    max-width: 100%;
    margin: 0;
  }

  .content-wrapper {
    box-shadow: none;
  }

  a {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* ===========================
   Card & Image Components
   =========================== */

/* Feature Cards with Icons */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 4px solid var(--accent-color);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.feature-card-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Card Placeholder Images */
.card-placeholder-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.card-placeholder {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.card-placeholder:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
}

.card-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.card-placeholder-image {
  width: 100%;
  max-width: 300px;
  height: 190px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-placeholder-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.card-placeholder-description {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.card-placeholder-btn {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}

.card-placeholder-btn:hover {
  background: var(--secondary-color);
  transform: scale(1.05);
  text-decoration: none;
}

/* Icon List */
.icon-list {
  list-style: none;
  padding: 0;
}

.icon-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-left: 0;
}

.icon-list li::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

/* Comparison Cards */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.comparison-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.comparison-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.comparison-card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2rem;
  text-align: center;
}

.comparison-card-header h3 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
}

.comparison-card-body {
  padding: 2rem;
}

.comparison-feature {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.comparison-feature:last-child {
  border-bottom: none;
}

.comparison-feature-icon {
  color: var(--accent-color);
  margin-right: 1rem;
  font-size: 1.2rem;
}

.comparison-feature-text {
  flex: 1;
  color: var(--text-color);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-hover);
}

.hero-section h1 {
  color: white;
  border: none;
  padding: 0;
  margin-bottom: 1.5rem;
  font-size: 2.8rem;
}

.hero-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-section .cta-button {
  background: white;
  color: var(--primary-color);
  padding: 1rem 3rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-block;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero-section .cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

/* Benefits Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.benefit-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-gray);
  border-radius: 8px;
  transition: background 0.3s;
}

.benefit-item:hover {
  background: white;
  box-shadow: var(--shadow);
}

.benefit-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.benefit-title {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.benefit-description {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Image Note */
.image-note {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #856404;
}

.image-note strong {
  color: #856404;
}

/* Responsive adjustments for images */
@media (max-width: 768px) {
  .feature-cards {
    grid-template-columns: 1fr;
  }

  .card-placeholder-container {
    grid-template-columns: 1fr;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .header-hero-wrapper {
    height: 400px;
    margin-bottom: 0;
  }

  .header-hero-content h1 {
    font-size: 2.2rem;
  }

  .header-hero-content p {
    font-size: 1.2rem;
  }

  .main-container {
    flex-direction: column;
  }

  .sidebar {
    order: -1;
    margin-bottom: 2rem;
  }

  .sidebar-ad {
    max-width: 100%;
  }
}

/* ===========================
   Advertisement Sections
   =========================== */

/* 2-Column Layout with Sidebar */
.main-container {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  flex: 0 0 300px;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

/* Sidebar Ads */
.sidebar-ad {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.sidebar-ad-title {
  font-size: 0.85rem;
  color: #999;
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-ad a {
  display: block;
  text-decoration: none;
}

.sidebar-ad img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* In-Content Ads */
.in-content-ad {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

.in-content-ad-title {
  font-size: 0.85rem;
  color: #999;
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.in-content-ad a {
  display: inline-block;
  text-decoration: none;
}

.in-content-ad img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.in-content-ad-text {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 4px;
  font-weight: 500;
  transition: transform 0.3s, box-shadow 0.3s;
}

.in-content-ad-text:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

/* Footer Pre-Ad Section */
.footer-pre-ad {
  background: #f8f9fa;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

.footer-pre-ad-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-pre-ad-title {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-pre-ad a {
  display: inline-block;
  text-decoration: none;
}

.footer-pre-ad img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Ad Responsive */
@media (max-width: 768px) {
  .main-container {
    padding: 0 1rem;
  }

  .sidebar {
    position: static; /* Remove sticky positioning on mobile */
    width: 100%;
    flex: 1 1 100%;
  }

  .sidebar-ad {
    max-width: 100%;
    overflow: hidden; /* Prevent content overflow */
  }

  .sidebar-ad img {
    max-width: 100%;
    height: auto;
  }

  .footer-pre-ad img {
    max-width: 100%;
  }

  .in-content-ad {
    padding: 1rem;
  }
}
