:root {
  --primary-color: #ff6fab;
  --secondary-color: #c39bd3;
  --accent-color: #ffd700;
  --warm-pink: #ffb3d1;
  --soft-lavender: #e1bee7;
  --background-color: #fef9f7;
  --surface-color: #ffffff;
  --text-color: #2d3748;
  --text-color-light: #ffffff;
  --border-color: #f0d8e6;
  --shadow-color: rgba(255, 107, 171, 0.1);

  --font-family-base: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --font-family-heading: 'Georgia', 'Times New Roman', 'Hiragino Mincho ProN', serif;

  --header-height: 70px;
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-family-base);
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  color: var(--secondary-color);
  line-height: 1.3;
  margin-bottom: 1rem;
}

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

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition-speed);
}

.header.scrolled {
  box-shadow: 0 2px 10px var(--shadow-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo a {
  font-family: var(--font-family-heading);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 800px;
}

.nav-item a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all var(--transition-speed);
  white-space: nowrap;
  font-size: 0.9rem;
}

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

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 30px;
  justify-content: center;
  align-items: center;
}

.hamburger-inner {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  transition: all var(--transition-speed);
  position: relative;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  transition: all var(--transition-speed);
}

.hamburger-inner::before {
  top: -8px;
}

.hamburger-inner::after {
  bottom: -8px;
}

.hamburger.active .hamburger-inner {
  background-color: transparent;
}

.hamburger.active .hamburger-inner::before {
  transform: rotate(45deg);
  top: 0;
}

.hamburger.active .hamburger-inner::after {
  transform: rotate(-45deg);
  bottom: 0;
}

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

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

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
}

.hero-content h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-color);
  line-height: 1.6;
}

/* Page Layout */
.page-wrapper {
  display: flex;
  gap: 2rem;
  margin: 2rem auto;
  padding: 0 20px;
}

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

.sidebar {
  flex: 0 0 300px;
  background: var(--surface-color);
  border-radius: 15px;
  padding: 1.5rem;
  height: fit-content;
  box-shadow: 0 5px 15px var(--shadow-color);
  border: 1px solid var(--border-color);
}

/* Article Content */
.article-content {
  background: var(--surface-color);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 15px var(--shadow-color);
  border: 1px solid var(--border-color);
}

.article-content h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--soft-lavender);
}

.article-content h3 {
  color: var(--secondary-color);
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem 0;
}

.article-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

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

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

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

.feature-grid-item {
  background: linear-gradient(135deg, var(--warm-pink), var(--soft-lavender));
  border-radius: 15px;
  padding: 1.5rem;
  color: var(--text-color);
  box-shadow: 0 5px 15px var(--shadow-color);
  transition: transform var(--transition-speed);
}

.feature-grid-item:hover {
  transform: translateY(-5px);
}

.feature-grid-item h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.btn-read-more {
  display: inline-block;
  background: var(--accent-color);
  color: var(--text-color);
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  font-weight: bold;
  margin-top: 1rem;
  transition: all var(--transition-speed);
}

.btn-read-more:hover {
  background: var(--primary-color);
  color: var(--text-color-light);
  transform: translateY(-2px);
}

/* Table of Contents */
.toc {
  background: linear-gradient(135deg, var(--warm-pink), var(--soft-lavender));
  border-radius: 15px;
  padding: 1.5rem;
  margin: 2rem 0;
}

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

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--text-color);
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all var(--transition-speed);
}

.toc a:hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--primary-color);
}

/* Sidebar */
.sidebar-widget {
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--soft-lavender);
}

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

.news-list li {
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

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

.news-list a {
  font-size: 0.9rem;
  line-height: 1.4;
}

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

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

.related-links a {
  display: block;
  padding: 0.5rem 1rem;
  background: var(--warm-pink);
  border-radius: 8px;
  transition: all var(--transition-speed);
  font-size: 0.9rem;
}

.related-links a:hover {
  background: var(--primary-color);
  color: var(--text-color-light);
}

.ad-space {
  background: linear-gradient(135deg, var(--soft-lavender), var(--accent-color));
  height: 200px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-weight: bold;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-color-light);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  text-align: center;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: var(--text-color-light);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all var(--transition-speed);
}

.footer-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    transform: translateX(-100%);
    transition: transform var(--transition-speed);
    overflow-y: auto;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-item {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .nav-item a {
    display: block;
    text-align: center;
    font-size: 1rem;
  }

  .page-wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  .sidebar {
    flex: none;
    order: -1;
  }

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

  .hero-content p {
    font-size: 1rem;
  }

  .feature-grid-container {
    grid-template-columns: 1fr;
  }

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

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

  .article-content {
    padding: 1.5rem;
  }

  .sidebar {
    padding: 1rem;
  }

  .hero-content {
    padding: 1.5rem;
  }

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