/* ============================================
   芸トピ (GEITOPI) - Main Stylesheet
   ============================================ */

:root {
  --primary: #c0392b;
  --primary-dark: #96281b;
  --accent: #e74c3c;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-light: #888;
  --bg: #f5f5f5;
  --white: #fff;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 6px;
  --font: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', Meiryo, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ===== HEADER ===== */
.site-header {
  background: var(--primary);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.05em;
  text-decoration: none;
}
.site-logo span { font-size: 0.7rem; font-weight: 400; margin-left: 8px; opacity: 0.85; vertical-align: middle; }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.site-nav a:hover { background: rgba(255,255,255,0.15); text-decoration: none; color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: 0.3s;
}

/* ===== HERO / TICKER ===== */
.news-ticker {
  background: var(--primary-dark);
  color: #fff;
  padding: 6px 0;
  font-size: 0.8rem;
  overflow: hidden;
}
.ticker-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.ticker-label {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.ticker-text { white-space: nowrap; overflow: hidden; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 32px 0;
}

/* ===== SECTION HEADING ===== */
.section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  padding: 8px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: 0;
}

/* ===== FEATURED ARTICLES ===== */
.featured-section { margin-bottom: 32px; }

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.featured-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.featured-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }

.featured-card .card-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f8d7d5 0%, #fde8e7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.featured-card .card-body { padding: 16px; }
.featured-card .card-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}
.featured-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--text);
}
.featured-card .card-title:hover { color: var(--primary); }
.featured-card .card-meta {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ===== ARTICLE LIST ===== */
.article-list-section { margin-bottom: 32px; }

.article-list {
  background: var(--white);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.article-item:last-child { border-bottom: none; }
.article-item:hover { background: #fafafa; }

.article-item .item-img {
  width: 72px;
  height: 54px;
  min-width: 72px;
  background: linear-gradient(135deg, #f8d7d5, #fde8e7);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.article-item .item-content { flex: 1; min-width: 0; }
.article-item .item-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}
.article-item .item-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  display: block;
}
.article-item .item-title:hover { color: var(--primary); }
.article-item .item-meta { font-size: 0.72rem; color: var(--text-light); margin-top: 4px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 24px 0;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
}
.pagination a { background: var(--white); color: var(--text); box-shadow: var(--shadow); }
.pagination a:hover { background: var(--primary); color: #fff; text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sidebar-widget .widget-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  padding: 10px 16px;
}
.sidebar-widget .widget-body { padding: 12px 0; }

.sidebar-list { list-style: none; }
.sidebar-list li {
  border-bottom: 1px solid var(--border);
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list li a {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  align-items: flex-start;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.5;
  transition: background 0.15s;
}
.sidebar-list li a:hover { background: #fafafa; text-decoration: none; color: var(--primary); }
.sidebar-list .rank {
  min-width: 22px;
  height: 22px;
  background: var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 1px;
}
.sidebar-list li:nth-child(1) .rank { background: #f0c040; color: #7a5e00; }
.sidebar-list li:nth-child(2) .rank { background: #c0c8d0; color: #444; }
.sidebar-list li:nth-child(3) .rank { background: #d4956a; color: #5a2e00; }

.cat-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.cat-list a {
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.cat-list a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* ===== AD PLACEHOLDER ===== */
.ad-block {
  background: var(--white);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.75rem;
  text-align: center;
  padding: 10px;
}
.ad-block-banner { width: 100%; height: 90px; margin: 20px 0; }
.ad-block-square { width: 100%; height: 250px; }
.ad-block-rect { width: 100%; height: 200px; }

/* ===== ARTICLE PAGE ===== */
.article-header { margin-bottom: 28px; }

.article-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.article-title {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 14px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-light);
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.article-meta .author { color: var(--text-secondary); font-weight: 600; }

.article-hero {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f8d7d5 0%, #fde8e7 50%, #ffeae8 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  margin-bottom: 28px;
  overflow: hidden;
}

.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}
.article-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 14px;
  padding: 10px 14px;
  background: #fff5f5;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px dotted var(--border);
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  background: #f9f9f9;
  border-left: 4px solid var(--primary);
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.article-body strong { color: var(--primary-dark); }

.article-tags { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.article-tags span { font-size: 0.78rem; color: var(--text-secondary); margin-right: 8px; font-weight: 600; }
.article-tags a {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin: 3px 3px 3px 0;
  transition: all 0.15s;
}
.article-tags a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

.share-buttons {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  color: #fff;
}
.share-btn:hover { opacity: 0.85; text-decoration: none; color: #fff; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.line { background: #06c755; }
.share-btn.copy { background: #666; cursor: pointer; border: none; }

.related-articles { margin-top: 32px; }
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}
.related-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.related-card:hover { transform: translateY(-2px); }
.related-card .rc-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #f8d7d5, #fde8e7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.related-card .rc-body { padding: 10px 12px; }
.related-card .rc-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}
.related-card .rc-title:hover { color: var(--primary); }
.related-card .rc-meta { font-size: 0.7rem; color: var(--text-light); margin-top: 4px; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-light);
  padding: 14px 0 0;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* ===== STATIC PAGES ===== */
.page-hero {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 40px 20px;
}
.page-hero h1 { font-size: 1.6rem; font-weight: 900; }
.page-hero p { margin-top: 8px; opacity: 0.85; font-size: 0.9rem; }

.static-content {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 800px;
  margin: 32px auto;
}
.static-content h2 { font-size: 1.15rem; font-weight: 700; margin: 28px 0 10px; color: var(--primary-dark); border-bottom: 2px solid var(--border); padding-bottom: 6px; }
.static-content p { margin-bottom: 14px; font-size: 0.95rem; line-height: 1.85; }
.static-content ul { margin: 0 0 14px 22px; }
.static-content li { margin-bottom: 6px; font-size: 0.95rem; }
.static-content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.9rem; }
.static-content th, .static-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.static-content th { background: var(--bg); font-weight: 700; }

/* ===== CONTACT FORM ===== */
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; color: var(--text-secondary); }
.form-group label .req { color: var(--primary); margin-left: 4px; font-size: 0.75rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border 0.2s;
  background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--font);
}
.form-submit:hover { background: var(--primary-dark); }

/* ===== FOOTER ===== */
.site-footer {
  background: #1a1a1a;
  color: rgba(255,255,255,0.7);
  margin-top: 48px;
  padding: 40px 0 20px;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand .brand-name { font-size: 1.3rem; font-weight: 900; color: #fff; margin-bottom: 10px; }
.footer-brand p { font-size: 0.82rem; line-height: 1.7; }
.footer-col h4 { font-size: 0.88rem; font-weight: 700; color: #fff; margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.82rem; transition: color 0.15s; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-size: 0.78rem; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 0.78rem; color: rgba(255,255,255,0.5); }
.footer-links a:hover { color: #fff; text-decoration: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .page-wrapper { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .featured-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .header-inner { height: 54px; }
  .site-logo { font-size: 1.2rem; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 54px; left: 0; right: 0; background: var(--primary-dark); padding: 10px; z-index: 200; }
  .nav-toggle { display: block; }
  .article-title { font-size: 1.25rem; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .static-content { padding: 20px; }
  .share-buttons { gap: 8px; }
  .share-btn { font-size: 0.78rem; padding: 7px 12px; }
}

/* ===== UTILITY ===== */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 4px; }
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
