/* Base Styles */
body {
  font-family: 'Lato', sans-serif;
  background-color: #020617;
  color: #E2E8F0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-serif {
  font-family: 'Cormorant Garamond', serif;
}

/* Utilities */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Text Shadow helper */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* View Transitions Logic */
::view-transition-old(hero-image),
::view-transition-new(hero-image) {
  /* Ensure smooth morphing of the image */
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  /* Smooth ease-out */
  mix-blend-mode: normal;
  height: 100%;
  overflow: clip;
  object-fit: cover;
  object-position: top;
}

/* Prevent clipping during expansion */
::view-transition-group(hero-image) {
  overflow: clip;
  z-index: 50;
  /* Ensure image stays on top of other content during transition */
}

::view-transition-old(hero-title),
::view-transition-new(hero-title) {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  width: auto;
}

/* Fade in animation for scroll items */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Detail Modal Specifics - Defined in CSS so they exist immediately on render */
.modal-image {
  view-transition-name: hero-image;
}

.modal-title {
  view-transition-name: hero-title;
}

/* News Modal View Transition */
.news-modal-image {
  view-transition-name: news-hero-image;
}

.news-modal-title {
  view-transition-name: news-hero-title;
}

::view-transition-old(news-hero-image),
::view-transition-new(news-hero-image) {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  mix-blend-mode: normal;
  height: 100%;
  overflow: clip;
  object-fit: cover;
  object-position: center;
}

::view-transition-group(news-hero-image) {
  overflow: clip;
  z-index: 50;
}

::view-transition-old(news-hero-title),
::view-transition-new(news-hero-title) {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  width: auto;
}

/* Rich Entry Animation for Modal Content */
@keyframes contentSlideUp {
  0% {
    opacity: 0;
    transform: translateY(60px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Gallery Swiper Styles
   ======================================== */
.gallery-swiper-container {
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 768px) {
  .gallery-swiper-container {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

.gallery-swiper {
  overflow: visible;
  padding-top: 1rem;
  padding-bottom: 2rem;
}

/* スライドの幅設定 */
/* モバイル: 画面の約85%幅（次のスライドが15%見える） */
.gallery-slide {
  width: calc(100vw - 72px); /* 左右24pxパディング + 次スライド露出分 */
  max-width: 360px; /* 大きすぎないよう制限 */
}

@media (min-width: 768px) {
  .gallery-slide {
    width: 400px;
    max-width: none;
  }
}

/* Swiperのデフォルトスタイルを上書き */
.gallery-swiper .swiper-wrapper {
  align-items: stretch;
}

/* ナビゲーションボタンの無効化状態 */
.gallery-prev.swiper-button-disabled,
.gallery-next.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ========================================
   News Section Styles
   ======================================== */

/* Line Clamp Utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* News Content Prose Styles (白背景モーダル用) */
.news-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.news-content p {
  margin-bottom: 1.5em;
}

.news-content a {
  color: #B8860B;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.news-content a:hover {
  border-bottom-color: #B8860B;
}

.news-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  margin: 1.5em 0;
}

.news-content ul,
.news-content ol {
  margin-left: 1.5em;
  margin-bottom: 1.5em;
}

.news-content li {
  margin-bottom: 0.5em;
}

.news-content h2,
.news-content h3,
.news-content h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  margin-top: 2em;
  margin-bottom: 1em;
  color: #1e293b;
}

.news-content h2 {
  font-size: 1.75rem;
}

.news-content h3 {
  font-size: 1.5rem;
}

.news-content h4 {
  font-size: 1.25rem;
}

.news-content blockquote {
  border-left: 3px solid #B8860B;
  padding-left: 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  color: #64748b;
}

/* News Content Dark Theme (ダークネイビーモーダル用) */
.news-content-dark {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.news-content-dark p {
  margin-bottom: 1.5em;
}

.news-content-dark a {
  color: #D4AF37;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.news-content-dark a:hover {
  border-bottom-color: #D4AF37;
}

.news-content-dark img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  margin: 1.5em 0;
}

.news-content-dark ul,
.news-content-dark ol {
  margin-left: 1.5em;
  margin-bottom: 1.5em;
}

.news-content-dark li {
  margin-bottom: 0.5em;
}

.news-content-dark h2,
.news-content-dark h3,
.news-content-dark h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  margin-top: 2em;
  margin-bottom: 1em;
  color: #f1f5f9;
}

.news-content-dark h2 {
  font-size: 1.75rem;
}

.news-content-dark h3 {
  font-size: 1.5rem;
}

.news-content-dark h4 {
  font-size: 1.25rem;
}

.news-content-dark blockquote {
  border-left: 3px solid #B8860B;
  padding-left: 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  color: #94a3b8;
}

/* ========================================
   Navigation Menu Styles
   ======================================== */

/* Smooth scroll offset for fixed header */
html {
  scroll-padding-top: 80px;
}

/* Menu item hover effects */
.menu-item-enter {
  animation: menuItemSlide 0.5s ease-out forwards;
}

@keyframes menuItemSlide {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Staggered animation for menu items */
.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.15s; }
.menu-item:nth-child(3) { animation-delay: 0.2s; }
.menu-item:nth-child(4) { animation-delay: 0.25s; }
.menu-item:nth-child(5) { animation-delay: 0.3s; }
.menu-item:nth-child(6) { animation-delay: 0.35s; }

/* ========================================
   Mobile Fixed Footer Menu
   ======================================== */

.mobile-footer-menu {
  /* Ensure footer is above most content but below modals */
  isolation: isolate;
  /* Safe area for bottom notch */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Subtle glow effect on the footer */
.mobile-footer-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.8), transparent);
  pointer-events: none;
}

/* Button press effect */
.mobile-footer-menu a:active {
  transform: scale(0.98);
}

/* Ensure icons render properly */
.mobile-footer-menu svg {
  flex-shrink: 0;
}

/* ========================================
   Age Verification Overlay
   ======================================== */

.age-verification-overlay {
  /* Ensure overlay is on top of everything */
  isolation: isolate;
}

/* Subtle background pattern */
.age-verification-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(92, 77, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(92, 77, 0, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

/* Decorative line elements */
.age-verification-overlay::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 200px;
  background: linear-gradient(to bottom, transparent, rgba(184, 134, 11, 0.2), transparent);
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
}

/* ========================================
   Filter Modal - noUiSlider Customization
   ======================================== */

/* Slider container */
.filter-slider {
  height: 6px;
  touch-action: pan-y;  /* Allow only vertical pan, horizontal handled by JS (prevents edge swipe) */
}

/* Track background */
.filter-slider.noUi-target {
  background: rgba(30, 41, 59, 0.8);
  border: none;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Connected range (selected area) */
.filter-slider .noUi-connect {
  background: linear-gradient(90deg, #B8860B, #D4AF37);
  border-radius: 3px;
}

/* Handle (drag button) */
.filter-slider .noUi-handle {
  width: 20px;
  height: 20px;
  top: -7px;
  right: -10px;
  background: linear-gradient(135deg, #D4AF37, #B8860B);
  border: 2px solid #020617;
  border-radius: 50%;
  box-shadow: 
    0 0 10px rgba(212, 175, 55, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: none;  /* Full JS control on handle (prevents edge swipe) */
}

.filter-slider .noUi-handle:hover {
  transform: scale(1.1);
  box-shadow: 
    0 0 15px rgba(212, 175, 55, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.4);
}

.filter-slider .noUi-handle:active {
  cursor: grabbing;
  transform: scale(1.15);
}

/* Remove default handle decorations */
.filter-slider .noUi-handle::before,
.filter-slider .noUi-handle::after {
  display: none;
}

/* Tooltip */
.filter-slider .noUi-tooltip {
  display: none;
  background: #020617;
  color: #D4AF37;
  border: 1px solid #B8860B;
  border-radius: 4px;
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}

/* Show tooltip on hover/active */
.filter-slider .noUi-handle:hover .noUi-tooltip,
.filter-slider .noUi-active .noUi-tooltip {
  display: block;
}

/* Horizontal layout adjustments */
.filter-slider.noUi-horizontal {
  height: 6px;
  padding-left: 12px;
  /* ← 左だけインセット。8〜16pxで調整 */
  box-sizing: border-box;
  /* paddingで幅が縮まないように */
}

.filter-slider.noUi-horizontal .noUi-handle {
  width: 20px;
  height: 20px;
}

/* Touch-friendly hit area */
.filter-slider .noUi-touch-area {
  width: 100%;
  height: 100%;
}

/* Disabled state */
.filter-slider.noUi-target[disabled] {
  opacity: 0.5;
}

.filter-slider.noUi-target[disabled] .noUi-handle {
  cursor: not-allowed;
}