/* ============================================================
   TOURISM SAAS v2 — Components CSS
   design-system.css の補完コンポーネント定義
   ============================================================ */

/* ─── HEADER EXTENSIONS ─────────────────────────────────── */
.radius-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--r-full);
}
.radius-switcher__label {
  font-size: 10px;
  color: var(--color-text-subtle);
  margin-right: 4px;
  white-space: nowrap;
}
.radius-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--color-text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  cursor: pointer;
}
.radius-btn:hover, .radius-btn.is-active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}
.theme-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-dot:hover { transform: scale(1.2); }
.theme-dot.is-active {
  border-color: var(--color-text);
  transform: scale(1.15);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-text);
}

/* ─── FONT SIZE SWITCHER ─────────────────────────────── */
.font-switcher {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 3px 6px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--r-full);
}
.font-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  color: var(--color-text-subtle);
  line-height: 1;
}
.font-btn:nth-child(1) { font-size: 10px; }
.font-btn:nth-child(2) { font-size: 13px; }
.font-btn:nth-child(3) { font-size: 16px; font-weight: 700; }
.font-btn:hover, .font-btn.is-active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ─── LANGUAGE SWITCHER ─────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 3px 6px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--r-full);
}
.lang-btn {
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: var(--color-text-subtle);
  transition: all 0.15s;
  white-space: nowrap;
}
.lang-btn:hover, .lang-btn.is-active {
  background: var(--color-primary);
  color: #fff;
}
.mobile-lang-row {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border);
}
.mobile-lang-row .lang-btn {
  padding: 8px 16px;
  font-size: 13px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-full);
}
.mobile-theme-row {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border);
}

/* ─── ADDITIONAL THEMES ───────────────────────────────── */
html[data-theme="setouchi"] {
  --color-primary:       #1a6b8a;
  --color-primary-light: #e6f3f8;
  --color-primary-dark:  #0f4058;
  --color-accent:        #e8a020;
  --color-accent-light:  #fdf6e8;
  --color-text:          #0d2230;
  --color-text-muted:    #2a5268;
  --color-text-subtle:   #6a9ab0;
  --color-bg:            #f8fbfd;
  --color-bg-subtle:     #e8f3f8;
  --color-bg-muted:      #d0e8f0;
  --color-surface:       #ffffff;
  --color-border:        #b8d8e8;
}
html[data-theme="monochrome"] {
  --color-primary:       #1a1a1a;
  --color-primary-light: #f0f0f0;
  --color-primary-dark:  #000000;
  --color-accent:        #555555;
  --color-accent-light:  #f5f5f5;
  --color-text:          #111111;
  --color-text-muted:    #444444;
  --color-text-subtle:   #888888;
  --color-bg:            #fafafa;
  --color-bg-subtle:     #f0f0f0;
  --color-bg-muted:      #e0e0e0;
  --color-surface:       #ffffff;
  --color-border:        #cccccc;
}

.site-header__menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: pointer;
}
.site-header__menu-btn span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: all 0.25s ease;
  transform-origin: center;
}
.site-header__menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__menu-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-header__menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-header__mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header__mobile-menu.is-open {
  transform: translateX(0);
}
.site-header__mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-header__mobile-link {
  display: block;
  padding: 16px 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s;
}
.site-header__mobile-link:hover { color: var(--color-primary); }

/* ─── FOOTER SOCIALS ────────────────────────────────────── */
.site-footer__socials {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.site-footer__social {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.site-footer__social:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* ─── SCROLL REVEAL ─────────────────────────────────────── */
.js-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1),
              transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.js-reveal.is-visible { opacity: 1; transform: translateY(0); }
.js-reveal.delay-1 { transition-delay: 0.1s; }
.js-reveal.delay-2 { transition-delay: 0.2s; }
.js-reveal.delay-3 { transition-delay: 0.3s; }
.js-reveal.delay-4 { transition-delay: 0.4s; }
.js-reveal.delay-5 { transition-delay: 0.5s; }

/* ─── GRID LAYOUTS ──────────────────────────────────────── */
.spot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-8);
}
.spot-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.spot-grid--list {
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-8);
}

/* ─── SPOT CARD LIST VARIANT ────────────────────────────── */
.spot-card--horizontal {
  flex-direction: row;
  align-items: stretch;
}
.spot-card--horizontal .spot-card__image-wrap {
  width: 240px;
  min-width: 240px;
  aspect-ratio: auto;
  flex-shrink: 0;
}
.spot-card--horizontal .spot-card__body {
  padding: var(--sp-6);
}

/* ─── BLOG CARD ─────────────────────────────────────────── */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.blog-card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--color-bg-muted);
}
.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.blog-card:hover .blog-card__image { transform: scale(1.05); }
.blog-card__body {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--sp-3);
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}
.blog-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: var(--leading-snug);
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__footer {
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── ARTICLE BODY ──────────────────────────────────────── */
.article-body {
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--color-text);
  max-width: 720px;
}
.article-body h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: var(--sp-12) 0 var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text);
}
.article-body h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: var(--sp-8) 0 var(--sp-4);
  color: var(--color-text);
}
.article-body p { margin-bottom: var(--sp-6); }
.article-body img {
  width: 100%;
  border-radius: var(--r-lg);
  margin: var(--sp-8) 0;
}
.article-body blockquote {
  border-left: 4px solid var(--color-primary);
  padding: var(--sp-4) var(--sp-6);
  margin: var(--sp-8) 0;
  background: var(--color-primary-light);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
  color: var(--color-text-muted);
}
.article-body ul, .article-body ol {
  margin: var(--sp-4) 0 var(--sp-6) var(--sp-6);
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: var(--sp-2); }

/* ─── DETAIL PAGE LAYOUT ────────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--sp-12);
  align-items: start;
}
.detail-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.detail-sidebar__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.detail-sidebar__title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}

/* ─── PHOTO GALLERY ─────────────────────────────────────── */
.photo-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--sp-3);
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16/8;
}
.photo-gallery__main {
  grid-row: 1 / 3;
  overflow: hidden;
}
.photo-gallery__sub {
  overflow: hidden;
}
.photo-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.photo-gallery img:hover { transform: scale(1.04); }

/* ─── FORM COMPONENTS ───────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}
.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.form-label .required {
  color: #e53e3e;
  margin-left: 4px;
  font-size: var(--text-xs);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 48px;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: var(--leading-normal);
  padding-top: var(--sp-4);
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238fa8a5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}
.form-error {
  font-size: var(--text-xs);
  color: #e53e3e;
}

/* ─── POLICY PAGE ───────────────────────────────────────── */
.policy-body {
  max-width: 800px;
  margin-inline: auto;
}
.policy-body h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: var(--sp-10) 0 var(--sp-4);
  padding-left: var(--sp-4);
  border-left: 4px solid var(--color-primary);
  color: var(--color-text);
}
.policy-body p {
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}
.policy-body ol {
  list-style: decimal;
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-4);
}
.policy-body ol li {
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
}
.policy-toc {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-10);
}
.policy-toc__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--sp-4);
}
.policy-toc__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.policy-toc__link {
  font-size: var(--text-sm);
  color: var(--color-primary);
  transition: color 0.2s;
}
.policy-toc__link:hover { text-decoration: underline; }

/* ─── PAGE HERO (内部ページ用) ──────────────────────────── */
.page-hero {
  background: var(--gradient-hero);
  padding: var(--sp-20) 0;
  color: white;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero__inner {
  position: relative;
  z-index: 1;
}
.page-hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--sp-3);
}
.page-hero__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--sp-4);
}
.page-hero__desc {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  line-height: var(--leading-loose);
}

/* ─── FILTER SIDEBAR ────────────────────────────────────── */
.filter-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--sp-10);
  align-items: start;
}
.filter-sidebar {
  position: sticky;
  top: 80px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
}
.filter-sidebar__title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--sp-5);
}
.filter-group {
  margin-bottom: var(--sp-6);
}
.filter-group__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: var(--sp-3);
}
.filter-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.filter-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.15s;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  min-height: 40px;
}
.filter-option:hover { background: var(--color-bg-muted); color: var(--color-text); }
.filter-option.is-active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}
.filter-option__count {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

/* ─── PAGINATION ────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-12) 0;
}
.pagination__btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
  transition: all 0.2s;
  cursor: pointer;
}
.pagination__btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination__btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.pagination__btn--prev, .pagination__btn--next {
  width: auto;
  padding: 0 var(--sp-5);
  gap: var(--sp-2);
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .filter-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .photo-gallery { aspect-ratio: auto; grid-template-columns: 1fr; grid-template-rows: auto; }
  .photo-gallery__main { grid-row: auto; aspect-ratio: 16/9; }
  .photo-gallery__sub { aspect-ratio: 16/9; }
}
@media (max-width: 768px) {
  .site-header__menu-btn { display: flex; }
  .site-header__mobile-menu { display: block; }
  .radius-switcher { display: none; }
  .theme-switcher { display: none; }
  .font-switcher { display: none; }
  .lang-switcher { display: none; }
  .spot-card--horizontal { flex-direction: column; }
  .spot-card--horizontal .spot-card__image-wrap { width: 100%; aspect-ratio: 16/9; }
  .spot-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}
