/* ===== イラレブック 総合Index CSS ===== */
:root {
  --key-color: #bc4b26;
  --key-light: rgba(188, 75, 38, 0.1);
  --base-bg: #ffe6d9;
  --card-bg: #ffffff;
  --text-color: #000000;
  --text-sub: #555555;
  --text-white: #ffffff;
  --border-light: rgba(188, 75, 38, 0.2);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
}

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

body {
  font-family: 'Noto Sans JP', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', Arial, sans-serif;
  background-color: var(--base-bg);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 15px;
}

a { color: var(--key-color); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ===== ローディング ===== */
#loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--base-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loader {
  width: 40px; height: 40px;
  border: 4px solid var(--border-light);
  border-top-color: var(--key-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== サイトヘッダー ===== */
.site-header {
  text-align: center;
  padding: 24px 0 12px;
}
.site-header__logo-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.site-header__logo-link:hover {
  text-decoration: none;
}
.site-header__logo-text {
  font-size: 3em;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0;
  padding: 12px 0 4px;
}
.logo-accent {
  color: var(--key-color);
  text-shadow: 2px 2px 0 rgba(188, 75, 38, 0.15);
}
.logo-main {
  color: var(--text-color);
}
.site-header__logo-sub {
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.1em;
}
.site-header__tagline {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 6px;
  font-style: italic;
}
.site-header__date {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 8px;
  font-style: italic;
}

/* ===== トップカテゴリーナビ ===== */
.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 6px 0;
}
.top-nav a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.top-nav a:hover {
  color: var(--key-color);
  text-decoration: none;
}
.top-nav a i {
  font-size: 13px;
  color: var(--key-color);
}

/* ===== セクションタイトル ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3em;
  color: var(--key-color);
  border-bottom: 3px solid var(--key-color);
  padding-bottom: 8px;
  margin-bottom: 16px;
  font-weight: bold;
}
.section-title__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.section-title__date {
  font-size: 13px;
  font-weight: normal;
  color: var(--text-sub);
  margin-left: auto;
}

/* ===== ローテーションタイマー ===== */
.rotation-timer {
  text-align: right;
  font-size: 12px;
  color: var(--text-sub);
  margin-top: -8px;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

/* ===== Zone 1: ヒーローゾーン ===== */
.hero-zone { margin-bottom: 32px; }

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
}

.hero-item {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s;
}
.hero-item:hover { box-shadow: var(--shadow-hover); }

.hero-item--main {
  grid-row: 1 / 3;
  grid-column: 1;
}

.hero-item--sub {
  grid-column: 2;
}

.hero-item a {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.hero-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 800 / 450;
}
.hero-item--main img {
  aspect-ratio: 800 / 500;
}

.hero-item__date-badge {
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--key-color);
  color: var(--text-white);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
  letter-spacing: 0.05em;
}

.hero-item__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  z-index: 2;
}

.hero-item__title {
  color: var(--text-white);
  font-size: 16px;
  font-weight: bold;
  line-height: 1.4;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.hero-item--main .hero-item__title {
  font-size: 20px;
}
.hero-item--sub .hero-item__title {
  font-size: 14px;
}

.hero-item__cat {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: var(--text-white);
  padding: 2px 8px;
  font-size: 11px;
  margin-bottom: 4px;
}

/* ===== Zone 2: カテゴリーショーケース ===== */
.category-showcase { margin-bottom: 32px; }

.category-block {
  margin-bottom: 36px;
}

.category-block__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--key-color);
}
.category-block__header-icon {
  font-size: 28px;
  color: var(--key-color);
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.category-block__header h3 {
  font-size: 1.15em;
  color: var(--key-color);
  flex: 1;
}
.category-block__header-more {
  font-size: 13px;
  color: var(--key-color);
  font-weight: bold;
}

.category-block__featured {
  margin-bottom: 10px;
}

.category-card {
  display: block;
  background: var(--card-bg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid var(--key-color);
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.category-card--featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-left: 4px solid var(--key-color);
}
.category-card--featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 800 / 450;
}

.category-card__body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.category-card__body-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.5;
  color: var(--text-color);
}
.category-card__body-cat {
  font-size: 11px;
  color: var(--key-color);
  margin-top: 6px;
}

.category-block__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.category-card--small img {
  width: 100%;
  aspect-ratio: 800 / 450;
  object-fit: cover;
}

.category-card__text {
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-color);
}

/* ===== Zone 3: 発見ゾーン ===== */
.discovery-zone { margin-bottom: 32px; }

.discovery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.discovery-card {
  display: block;
  background: var(--card-bg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
}
.discovery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.discovery-card img {
  width: 100%;
  aspect-ratio: 800 / 450;
  object-fit: cover;
}

.discovery-card__cat {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--key-color);
  background: var(--key-light);
  margin: 6px 8px 0;
}

.discovery-card__text {
  padding: 4px 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-color);
}

/* ===== カテゴリーナビメニュー ===== */
.menu-container {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 12px;
}
.site-menu {
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  padding: 16px;
}
.menu-header h2 {
  font-size: 1.1em;
  color: var(--key-color);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.menu-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  text-decoration: none;
  color: var(--text-color);
  background: var(--base-bg);
  transition: background 0.2s;
  font-size: 12px;
  text-align: center;
}
.menu-item a:hover {
  background: var(--key-light);
  text-decoration: none;
}
.menu-item i {
  font-size: 24px;
  color: var(--key-color);
}

/* ===== フッター ===== */
.book-footer {
  background: var(--card-bg);
  margin-top: 32px;
  padding: 24px 16px;
  font-size: 13px;
  color: var(--text-sub);
}
.footer-paper {
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.section-header h3 {
  font-size: 1em;
  color: var(--key-color);
}
.section-header i { color: var(--key-color); }
.contact-section, .terms-section {
  margin-bottom: 16px;
}
.terms-list { padding-left: 20px; }
.terms-list li { margin-bottom: 4px; }
.mail-link { color: var(--key-color); }
.site-link { color: var(--key-color); }
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px 0;
  margin-top: 12px;
  border-top: 1px solid var(--border-light);
}
.footer-nav a {
  font-size: 12px;
  color: var(--text-sub);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--key-color);
  text-decoration: none;
}
.copyright-section {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
}

/* ===== SNSボタン ===== */
.header-details {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 16px;
}
.sns-buttons {
  display: flex;
  gap: 12px;
}
.sns-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-bg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.sns-button img { width: 20px; height: 20px; }
.sns-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* ===== AdSense ===== */
.ad-slot {
  margin: 24px 0;
  text-align: center;
}

/* ===== noscript ===== */
.noscript-links {
  padding: 20px;
  background: var(--card-bg);
}
.noscript-links a {
  display: inline-block;
  margin: 4px 8px;
  padding: 8px 16px;
  background: var(--key-light);
  color: var(--key-color);
  font-weight: bold;
}

/* ===== レスポンシブ ===== */
@media (max-width: 1024px) {
  .discovery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .hero-item--main {
    grid-row: auto;
    grid-column: auto;
  }
  .hero-item--sub {
    grid-column: auto;
  }
  .hero-item img {
    height: auto;
  }
  .hero-item--main .hero-item__title {
    font-size: 16px;
  }
  .category-block__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-card--featured {
    grid-template-columns: 1fr;
  }
  .discovery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .section-title {
    font-size: 1.1em;
  }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .container { padding: 0 8px; }
  .category-block__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .discovery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .hero-item__date-badge { font-size: 10px; padding: 3px 8px; }
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
