/* ============================================
   FANZA同人マガジン - Main Stylesheet
   Magazine-style design
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --bg-base:       #ffffff;
  --bg-surface:    #f5f5f5;
  --bg-card:       #ffffff;
  --bg-overlay:    rgba(0,0,0,0.6);

  --accent:        #d42b4a;
  --accent-hover:  #f03358;
  --accent-light:  rgba(212, 43, 74, 0.08);

  --text-primary:  #1a1a1a;
  --text-secondary:#555555;
  --text-muted:    #999999;

  --border:        #e0e0e0;
  --border-light:  #ececec;

  --header-bg:     #ffffff;
  --header-height: 64px;

  --font-body:     'Noto Sans JP', sans-serif;
  --font-display:  'Bebas Neue', sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;

  --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.15);

  --transition: 0.22s ease;
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  font-size: 12px;
}
.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-tagline { color: var(--text-muted); }
.header-meta-nav { display: flex; gap: 16px; }
.header-meta-nav a { color: var(--text-muted); font-size: 12px; }
.header-meta-nav a:hover { color: var(--accent); }

.header-main { padding: 12px 0; }
.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo { text-decoration: none; }
.logo-text {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 3px;
  color: #1a1a1a;
  line-height: 1;
}

/* Search */
.search-form {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 340px;
}
.search-input {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 10px 14px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}
.search-btn:hover { color: var(--accent); }

/* Navigation */
.site-nav {
  border-top: 1px solid var(--border);
  background: var(--header-bg);
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li a {
  display: block;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
}
.nav-list li a:hover,
.nav-list li.active a {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* ============================================
   HERO / FEATURED
   ============================================ */
.hero-section {
  padding: 32px 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
}

.hero-main-link { display: block; position: relative; }
.hero-main-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.hero-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.hero-main-link:hover .hero-main-image img { transform: scale(1.03); }
.hero-main-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}
.hero-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}
.hero-circle { font-size: 13px; color: var(--accent); margin-bottom: 4px; }
.hero-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-price {
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

/* Hero Sub */
.hero-sub {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-sub-item {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.hero-sub-item:hover { border-color: var(--accent); transform: translateX(4px); }
.hero-sub-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface);
}
.hero-sub-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-sub-info { flex: 1; min-width: 0; }
.hero-sub-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   CATEGORY NAV
   ============================================ */
.category-nav-section {
  padding: 20px 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.category-nav-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.category-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #e8f4fd;
  border: 1px solid #b3d9f5;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  transition: all var(--transition);
  min-width: 90px;
  text-align: center;
  color: #2a6496;
}
.category-nav-item:hover {
  border-color: #5baee0;
  background: #cce8f8;
  transform: translateY(-2px);
}
.category-nav-name { font-size: 13px; font-weight: 600; color: #2a6496; }
.category-nav-count { font-size: 11px; color: #6aaad4; margin-top: 2px; }

/* ============================================
   CONTENT LAYOUT
   ============================================ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding: 32px 0;
}
.content-main { min-width: 0; }

/* ============================================
   SECTION
   ============================================ */
.section { margin-bottom: 48px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.section-header::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent);
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.section-more {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.section-more:hover { text-decoration: underline; }

/* ============================================
   WORKS GRID
   ============================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.works-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   WORK CARD
   ============================================ */
.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.work-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.work-card-link { display: block; }

.work-card-image {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-surface);
}
.work-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.work-card:hover .work-card-image img { transform: scale(1.06); }

.work-card-price {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.work-card-body { padding: 12px; }
.work-card-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-card-circle {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 8px;
}
.work-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* ============================================
   TAG PILLS
   ============================================ */
.tag-pill {
  display: inline-block;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 100px;
  transition: all var(--transition);
  white-space: nowrap;
}
.tag-pill:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.tag-pill--sm { font-size: 10px; padding: 1px 6px; }
.tag-pill--lg { font-size: 13px; padding: 4px 14px; }
.tag-pill--dark {
  background: rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { width: 280px; min-width: 0; }

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-widget-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.sidebar-widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

/* Category List */
.sidebar-category-list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-category-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.sidebar-category-list li a:hover {
  background: var(--accent-light);
  color: var(--accent);
  padding-left: 14px;
}
.category-count {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* Tag Cloud */
.sidebar-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* Recent List */
.sidebar-recent-list { display: flex; flex-direction: column; gap: 12px; }
.sidebar-recent-item a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sidebar-recent-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--bg-card);
}
.sidebar-recent-info { flex: 1; min-width: 0; }
.sidebar-recent-title {
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-recent-circle {
  display: block;
  font-size: 11px;
  color: var(--accent);
  margin-top: 3px;
}

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.page-hero--works { background: linear-gradient(135deg, #1a0a0e 0%, var(--bg-surface) 100%); }
.page-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}
.page-description {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   LIST CONTROLS
   ============================================ */
.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.list-count { font-size: 14px; color: var(--text-secondary); }
.list-count strong { color: var(--text-primary); font-weight: 700; }

.sort-select-wrapper { position: relative; }
.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 30px 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  appearance: none;
}

/* ============================================
   WORK DETAIL
   ============================================ */
.work-detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding: 32px 0;
}

.work-detail-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.work-detail-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}
.work-detail-circle { font-size: 14px; color: var(--accent); }
.work-detail-circle a { color: var(--accent); }

.work-detail-top {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  margin-bottom: 32px;
}

.work-cover-img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

/* Info Table */
.work-info-table { width: 100%; border-collapse: collapse; }
.work-info-table th,
.work-info-table td {
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.work-info-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  white-space: nowrap;
  width: 100px;
  font-weight: 500;
}
.work-info-table td { color: var(--text-primary); }
.work-price {
  font-size: 22px;
  color: var(--accent);
  font-weight: 700;
}
.info-link { color: var(--accent); }
.info-link:hover { text-decoration: underline; }
.work-tags-cell { display: flex; flex-wrap: wrap; gap: 6px; }

/* Buy Button */
.work-buy-section { margin-top: 20px; }
.btn-buy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  width: 100%;
  justify-content: center;
  text-align: center;
}
.btn-buy:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,43,74,0.4);
}
.buy-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Work Description */
.work-description,
.work-tags-section,
.work-samples { margin-bottom: 32px; }
.work-description h2,
.work-tags-section h2,
.work-samples h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.work-description h2::after,
.work-tags-section h2::after,
.work-samples h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.work-description p { margin-bottom: 12px; font-size: 14px; color: var(--text-secondary); line-height: 1.8; }

/* Sample Grid */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.sample-item {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.sample-item:hover { border-color: var(--accent); transform: scale(1.02); }
.sample-item img { width: 100%; height: 100%; object-fit: cover; }

/* Work Tags */
.work-tags-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* Related Works */
.related-works { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ============================================
   TAXONOMY (タグ・カテゴリ一覧)
   ============================================ */
.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.taxonomy-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.taxonomy-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.taxonomy-item-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-surface); }
.taxonomy-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.taxonomy-item-info {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.taxonomy-item-name { font-size: 14px; font-weight: 600; }
.taxonomy-item-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb { margin-bottom: 16px; }
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}
.breadcrumb-list li { color: var(--text-muted); }
.breadcrumb-list li + li::before { content: '›'; margin-right: 8px; color: var(--text-muted); }
.breadcrumb-list li a { color: var(--text-muted); }
.breadcrumb-list li a:hover { color: var(--accent); }
.breadcrumb-list li[aria-current="page"] { color: var(--text-secondary); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination { margin-top: 40px; text-align: center; }
.pagination-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.pagination-link:hover,
.pagination-link--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pagination-info { font-size: 12px; color: var(--text-muted); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #f5f5f5;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}
.footer-top { padding: 48px 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 12px;
}
.footer-about p { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.footer-col ul { display: flex; flex-direction: column; gap: 6px; }
.footer-col ul li a {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-col ul li a span { color: var(--text-muted); font-size: 11px; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.footer-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.7;
}
.footer-copyright { font-size: 12px; color: var(--text-muted); }

.footer-legal-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.footer-legal-nav a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-legal-nav a:hover { color: var(--accent); }

/* 固定ページ（シングル） */
.single-layout {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 0;
}
.single-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.single-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.single-date { font-size: 13px; color: var(--text-muted); }
.single-body { font-size: 15px; line-height: 1.9; color: var(--text-secondary); }
.single-body h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.single-body h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 24px 0 8px; }
.single-body p { margin-bottom: 16px; }
.single-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.single-body ul, .single-body ol { padding-left: 24px; margin-bottom: 16px; }
.single-body li { margin-bottom: 6px; list-style: disc; }
.single-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.single-body strong { color: var(--text-primary); font-weight: 700; }

/* お問い合わせページ */
.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  margin: 28px 0;
  display: inline-block;
}
.contact-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.contact-email {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 90;
  box-shadow: 0 4px 12px rgba(212,43,74,0.4);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent-hover); transform: translateY(-3px); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr 300px; }
  .works-grid--4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .content-layout,
  .work-detail-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { width: 100%; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-sub { flex-direction: row; overflow-x: auto; }
  .hero-sub-item { min-width: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .work-detail-top { grid-template-columns: 200px 1fr; }
}

@media (max-width: 640px) {
  .logo-text { font-size: 24px; }
  .search-form { width: 200px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .works-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 18px; }
  .work-detail-top { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-about { grid-column: auto; }
  .header-meta-nav { display: none; }
}
