/* Showcase Page Styles */

/* Hero Section */
.showcase-hero {
  position: relative;
  padding: 140px 0 60px;
  background: #fff;
  overflow: hidden;
  text-align: center;
}

.showcase-hero .container {
  position: relative;
  z-index: 1;
}

.showcase-title {
  font-size: 42px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
}

.showcase-subtitle {
  font-size: 16px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Main Section */
.showcase-main {
  padding: 60px 0 100px;
  background: #f8fafc;
}

.showcase-container {
  display: flex;
  gap: 40px;
}

/* Sidebar */
.showcase-sidebar {
  width: 220px;
  flex-shrink: 0;
}

.sidebar-inner {
  position: sticky;
  top: 100px;
}

.sidebar-title {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.category-group {
  margin-bottom: 20px;
}

.category-heading {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  padding: 8px 0;
  cursor: pointer;
  transition: color 0.2s;
}

.category-heading:hover,
.category-heading.active {
  color: #2563eb;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  padding-left: 12px;
  border-left: 1px solid #e5e7eb;
}

.category-list li {
  margin-bottom: 8px;
}

.category-list a {
  font-size: 14px;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 4px 0;
}

.category-list a:hover,
.category-list a.active {
  color: #2563eb;
}

/* Content Grid */
.showcase-content {
  flex: 1;
  min-width: 0;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Showcase Item */
.showcase-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.showcase-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.showcase-image {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: #f0f0f0;
}

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

.showcase-item:hover .showcase-image img {
  transform: scale(1.05);
}

.showcase-overlay {
  position: absolute;
  inset: 0;
  background: rgba(37, 99, 235, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.showcase-item:hover .showcase-overlay {
  opacity: 1;
}

.showcase-view {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid #fff;
  border-radius: 4px;
}

.showcase-info {
  padding: 16px;
}

.showcase-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.4;
}

.showcase-price {
  font-size: 13px;
  color: #888;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: #e0e0e0;
}

.modal-body {
  display: flex;
  flex-direction: column;
}

/* Carousel */
.modal-carousel {
  position: relative;
  width: 100%;
  background: #f5f5f5;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  transition: transform 0.3s ease;
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
}

.carousel-slide img,
.carousel-slide svg {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-slide .no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #999;
  font-size: 14px;
  background: #f0f0f0;
}

.carousel-btn,
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.carousel-btn:hover,
.carousel-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.carousel-btn svg,
.carousel-arrow svg {
  width: 24px;
  height: 24px;
  color: #333;
}

.carousel-prev {
  left: 16px;
}

.carousel-next {
  right: 16px;
}

.carousel-btn:disabled,
.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-btn:disabled:hover,
.carousel-arrow:disabled:hover {
  transform: translateY(-50%);
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* Hide buttons when single image */
.modal-carousel.single-image .carousel-btn,
.modal-carousel.single-image .carousel-dots {
  display: none;
}

.modal-info {
  padding: 32px;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 16px;
}

.modal-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-category {
  font-size: 13px;
  color: #2563eb;
  background: #e8f0fe;
  padding: 4px 12px;
  border-radius: 20px;
}

.modal-duration {
  font-size: 13px;
  color: #666;
  background: #f0f0f0;
  padding: 4px 12px;
  border-radius: 20px;
}

.modal-description {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 24px;
}

.modal-features h4,
.modal-tech h4 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.modal-features ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.modal-features li {
  font-size: 14px;
  color: #555;
  padding-left: 20px;
  position: relative;
}

.modal-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2563eb;
  font-weight: bold;
}

.tech-tags,
.modal-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tags span,
.modal-tech-list span {
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  padding: 6px 12px;
  border-radius: 4px;
}

.modal-features h3,
.modal-tech h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

/* Hide buttons when single image */
.modal-carousel.single-image .carousel-arrow,
.modal-carousel.single-image .carousel-btn {
  display: none;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  z-index: 100;
  align-items: center;
  gap: 8px;
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .showcase-sidebar {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .showcase-hero {
    padding: 120px 0 40px;
  }

  .showcase-title {
    font-size: 32px;
  }

  .showcase-container {
    flex-direction: column;
  }

  .showcase-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 200;
    padding: 80px 24px 24px;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
  }

  .showcase-sidebar.active {
    left: 0;
  }

  .sidebar-inner {
    position: static;
  }

  .sidebar-toggle {
    display: flex;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    display: none;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .showcase-content {
    width: 100%;
  }

  .modal-content {
    max-height: 95vh;
  }

  .modal-info {
    padding: 24px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-features ul {
    grid-template-columns: 1fr;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
  }

  .carousel-btn svg {
    width: 20px;
    height: 20px;
  }

  .carousel-prev {
    left: 8px;
  }

  .carousel-next {
    right: 8px;
  }

  .carousel-dots {
    bottom: 12px;
    gap: 6px;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 480px) {
  .showcase-hero {
    padding: 100px 0 30px;
  }

  .showcase-title {
    font-size: 26px;
  }

  .showcase-subtitle {
    font-size: 14px;
  }

  .showcase-main {
    padding: 40px 0 80px;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .showcase-item {
    max-width: 100%;
  }

  .modal {
    padding: 10px;
  }

  .modal-content {
    border-radius: 8px;
  }

  .modal-info {
    padding: 20px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .sidebar-toggle {
    bottom: 16px;
    left: 16px;
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* Sidebar close button for mobile */
.sidebar-close {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .sidebar-close {
    display: flex;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal.active {
  animation: fadeIn 0.2s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal.active .modal-content {
  animation: slideIn 0.3s ease;
}

/* Showcase Detail Page */
.showcase-detail {
  padding: 40px 0 80px;
  background: #f8fafc;
}

.showcase-article {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.showcase-article-main {
  padding: 40px;
}

.showcase-article-image {
  margin-bottom: 32px;
  border-radius: 8px;
  overflow: hidden;
}

.showcase-article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-article-body {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
}

.showcase-article-body h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 32px 0 16px;
}

.showcase-article-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 24px 0 12px;
}

.showcase-article-body p {
  margin-bottom: 16px;
}

.showcase-article-body ul,
.showcase-article-body ol {
  margin: 0 0 16px 24px;
}

.showcase-article-body li {
  margin-bottom: 8px;
}

.showcase-article-sidebar {
  background: #f8fafc;
  padding: 40px;
  border-left: 1px solid #e5e7eb;
}

.showcase-article-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
  line-height: 1.4;
}

.showcase-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.showcase-article-category {
  font-size: 13px;
  color: #2563eb;
  background: #e8f0fe;
  padding: 6px 14px;
  border-radius: 20px;
}

.showcase-article-duration {
  font-size: 13px;
  color: #666;
  background: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
}

.showcase-article-description {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.showcase-article-features,
.showcase-article-tech {
  margin-bottom: 24px;
}

.showcase-article-features h4,
.showcase-article-tech h4 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.showcase-article-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.showcase-article-features li {
  font-size: 14px;
  color: #555;
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  border-bottom: 1px solid #e5e7eb;
}

.showcase-article-features li:last-child {
  border-bottom: none;
}

.showcase-article-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2563eb;
  font-weight: bold;
}

.showcase-article-tech .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.showcase-article-tech .tech-tag {
  font-size: 12px;
  color: #666;
  background: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.showcase-article-cta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.showcase-article-cta .btn {
  width: 100%;
  text-align: center;
}

/* Showcase Navigation */
.showcase-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid #e5e7eb;
}

.showcase-nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  max-width: 280px;
}

.showcase-nav-prev {
  text-align: left;
}

.showcase-nav-next {
  text-align: right;
}

.showcase-nav-list {
  align-self: center;
}

.showcase-nav-label {
  font-size: 12px;
  color: #888;
}

.showcase-nav-title {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  transition: color 0.2s;
}

a.showcase-nav-item:hover .showcase-nav-title {
  color: #2563eb;
}

.showcase-nav-item.disabled {
  opacity: 0.5;
  cursor: default;
}

.showcase-nav-item.disabled .showcase-nav-title {
  color: #999;
}

/* Showcase archive link styles */
.showcase-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.category-heading a {
  text-decoration: none;
  color: inherit;
}

.category-heading a:hover {
  color: #2563eb;
}

/* No posts message */
.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  font-size: 15px;
  grid-column: 1 / -1;
}

/* ============================================
   Premium Pagination Design
   ============================================ */
.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 64px;
  padding: 24px 0;
  position: relative;
}

/* ページ番号共通スタイル */
.news-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* ホバーエフェクト */
.news-pagination a.page-numbers:hover {
  color: #1e293b;
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* アクティブ状態（現在のページ） */
.news-pagination .page-numbers.current {
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-color: transparent;
  font-weight: 600;
}

/* 前へ・次へテキストリンク */
.news-pagination .prev.page-numbers,
.news-pagination .next.page-numbers {
  min-width: auto;
  height: auto;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  gap: 6px;
}

.news-pagination .prev.page-numbers:hover,
.news-pagination .next.page-numbers:hover {
  color: #2563eb;
  background: transparent;
  transform: none;
  box-shadow: none;
}

/* 矢印アイコン */
.news-pagination .prev.page-numbers::before {
  content: '';
  width: 6px;
  height: 6px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-right: 6px;
}

.news-pagination .next.page-numbers::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 6px;
}

.news-pagination .prev.page-numbers:hover::before {
  transform: rotate(45deg) translate(-2px, 2px);
}

.news-pagination .next.page-numbers:hover::after {
  transform: rotate(45deg) translate(2px, -2px);
}

/* ドット（省略記号） */
.news-pagination .page-numbers.dots {
  min-width: 40px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: default;
  letter-spacing: 2px;
}

.news-pagination .page-numbers.dots:hover {
  transform: none;
  box-shadow: none;
  background: transparent;
}

/* フォーカス状態（アクセシビリティ） */
.news-pagination a.page-numbers:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* リップルエフェクト（前へ・次へ以外） */
.news-pagination a.page-numbers:not(.prev):not(.next)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s ease;
}

.news-pagination a.page-numbers:not(.prev):not(.next):active::after {
  opacity: 1;
  transform: scale(2);
  transition: all 0s;
}

/* ============================================
   Pagination Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .news-pagination {
    gap: 4px;
    margin-top: 48px;
    flex-wrap: wrap;
  }

  .news-pagination .page-numbers {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 10px;
  }

  .news-pagination .prev.page-numbers,
  .news-pagination .next.page-numbers {
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .news-pagination {
    gap: 2px;
    margin-top: 40px;
  }

  .news-pagination .page-numbers {
    min-width: 36px;
    height: 36px;
    font-size: 12px;
    border-radius: 8px;
  }

  .news-pagination .page-numbers.dots {
    min-width: 28px;
    padding: 0 4px;
  }

  .news-pagination .prev.page-numbers,
  .news-pagination .next.page-numbers {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* Responsive for detail page */
@media (max-width: 900px) {
  .showcase-article {
    grid-template-columns: 1fr;
  }

  .showcase-article-sidebar {
    border-left: none;
    border-top: 1px solid #e5e7eb;
  }
}

@media (max-width: 768px) {
  .showcase-detail {
    padding: 20px 0 60px;
  }

  .showcase-article-main {
    padding: 24px;
  }

  .showcase-article-sidebar {
    padding: 24px;
  }

  .showcase-article-title {
    font-size: 20px;
  }

  .showcase-nav {
    flex-direction: column;
    gap: 20px;
  }

  .showcase-nav-item {
    max-width: 100%;
    text-align: left !important;
  }

  .showcase-nav-list {
    order: -1;
    align-self: flex-start;
  }
}
