/* =============================================
   Reports - Navigation
   ============================================= */
.report-nav {
  background: var(--dark);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-back {
  color: #aaa;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.nav-back:hover {
  color: var(--white);
}

.nav-title {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white);
  letter-spacing: 0.15em;
}

/* =============================================
   Reports - Hero (一覧ページ)
   ============================================= */
.report-hero {
  background: var(--dark);
  color: var(--white);
  padding: 60px 0 50px;
  text-align: center;
}

.report-hero h1 {
  font-size: 2.2rem;
  margin: 10px 0;
}

.report-hero-sub {
  color: #999;
  font-size: 0.95rem;
}

/* =============================================
   Reports - Filters
   ============================================= */
.report-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 24px;
  border: 2px solid #ddd;
  background: transparent;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* =============================================
   Reports - Card Grid (一覧)
   ============================================= */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.report-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.report-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.report-card-image {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #eee;
  overflow: hidden;
}

.report-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.report-card:hover .report-card-image img {
  transform: scale(1.05);
}

.report-card-noimage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-en);
  font-size: 0.9rem;
  color: #bbb;
  letter-spacing: 0.1em;
}

.report-card-rider {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--white);
  background: rgba(0, 0, 0, 0.7);
}

.report-card-rider.haruka {
  background: var(--primary);
}

.report-card-rider.kanoka {
  background: #1a1a1a;
}

.report-card-rider.both {
  background: linear-gradient(135deg, var(--primary), #1a1a1a);
}

.report-card-body {
  padding: 20px;
}

.report-card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

.report-card-date {
  font-family: var(--font-en);
  font-size: 0.8rem;
  color: #999;
  letter-spacing: 0.05em;
}

.report-card-location {
  font-size: 0.8rem;
  color: #999;
}

.report-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 8px 0 10px;
  line-height: 1.4;
}

.report-card-result {
  display: block;
  width: 100%;
  padding: 8px 0 0;
  margin-top: 8px;
  border-top: 1px solid #eee;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.report-card-summary {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================
   Reports - Loading / Empty / Error
   ============================================= */
.reports-loading,
.reports-empty,
.reports-error {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #eee;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =============================================
   Detail - Hero
   ============================================= */
.detail-hero {
  min-height: 50vh;
  background: var(--dark) center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  position: relative;
}

.detail-hero-overlay {
  width: 100%;
  padding: 80px 0 40px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: var(--white);
}

.detail-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 10px 0 15px;
  line-height: 1.3;
}

.detail-rider {
  display: inline-block;
  padding: 4px 14px;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
}

.detail-rider.haruka {
  background: var(--primary);
}

.detail-rider.kanoka {
  background: #333;
}

.detail-rider.both {
  background: linear-gradient(135deg, var(--primary), #333);
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  color: #ccc;
}

.detail-result {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}

/* =============================================
   Detail - Body
   ============================================= */
.detail-body-section {
  padding: 60px 0;
}

.detail-container {
  max-width: 800px;
}

.detail-body {
  font-size: 1rem;
  line-height: 2;
  color: var(--text);
}

.detail-body p {
  margin-bottom: 1.5em;
}

.detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1em 0;
}

/* =============================================
   Detail - Related Links
   ============================================= */
.links-title {
  font-family: var(--font-en);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  margin-top: 50px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.detail-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--gray);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.3s, transform 0.2s;
  border: 1px solid #eee;
}

.detail-link:hover {
  background: #eef;
  transform: translateX(4px);
  border-color: var(--primary);
}

.detail-link-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.detail-link-url {
  flex: 1;
  font-size: 0.9rem;
  word-break: break-all;
  color: #555;
}

.detail-link-arrow {
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
}

/* =============================================
   Detail - Gallery
   ============================================= */
.gallery-title {
  font-family: var(--font-en);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  margin-top: 50px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* =============================================
   Lightbox
   ============================================= */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox:not([hidden]) {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 10px;
  transition: opacity 0.3s;
  opacity: 0.7;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    min-height: 40vh;
  }

  .detail-meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .report-hero h1 {
    font-size: 1.8rem;
  }

  .filter-btn {
    padding: 6px 16px;
    font-size: 0.8rem;
  }

  .reports-grid {
    gap: 20px;
  }
}
