/* === TripNavi - Arukikata Style === */

/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.8;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
img { max-width: 100%; height: auto; display: block; }

/* === Variables === */
:root {
  --primary: #0891B2;
  --primary-dark: #164E63;
  --primary-light: #ECFEFF;
  --accent: #06B6D4;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.fade-in { animation: fadeInUp 0.5s ease-out forwards; }

/* === Header === */
.header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 28px; }
.logo-text {
  font-size: 24px; font-weight: 800;
  background: linear-gradient(135deg, #06B6D4, #0891B2);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav { display: flex; gap: 6px; align-items: center; }
.nav-link {
  padding: 10px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  color: var(--gray-700);
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.nav-dropdown { position: relative; }
.nav-dropdown > .nav-link { cursor: pointer; }
.nav-dropdown > .nav-link::after {
  content: '▾'; font-size: 10px; margin-left: 4px; opacity: 0.6;
}
.dropdown-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: #fff;
  min-width: 200px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  padding: 8px;
  margin-top: 4px;
  z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 4px;
  color: var(--gray-700);
  transition: all 0.15s;
}
.dropdown-menu a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.menu-toggle {
  display: none; background: none; border: none;
  font-size: 24px; cursor: pointer; color: var(--gray-700);
}

/* === Hero Carousel === */
.hero-carousel {
  position: relative;
  height: 480px;
  overflow: hidden;
  background: var(--gray-100);
}
.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center;
}
.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.5), transparent 60%);
}
.carousel-content {
  position: absolute;
  bottom: 60px;
  left: 60px;
  max-width: 500px;
  color: #fff;
}
.carousel-content h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.carousel-content p {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.carousel-nav {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}
.carousel-dot.active {
  background: #fff;
  width: 32px;
  border-radius: 6px;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-700);
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}
.carousel-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}
.carousel-arrow.prev { left: 24px; }
.carousel-arrow.next { right: 24px; }

/* === Sections === */
.section { padding: 64px 0; }
.section:nth-child(even) { background: var(--gray-50); }
.section-header {
  margin-bottom: 32px;
  text-align: center;
}
.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.section-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  letter-spacing: 1px;
}

/* === Card Grid (Image-First Design) === */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  background-size: cover;
  background-position: center;
  background-color: var(--gray-200);
}
.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  align-self: flex-start;
  letter-spacing: 0.3px;
}
.card-tag.orange { background: #f59e0b; }
.card-tag.pink { background: #ec4899; }
.card-tag.green { background: #10b981; }
.card-tag.purple { background: #8b5cf6; }
.card h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.card-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-top: auto;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--gray-500);
}

/* === Horizontal Scroll Cards === */
.scroll-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-behavior: smooth;
}
.scroll-container::-webkit-scrollbar {
  height: 6px;
}
.scroll-container::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 3px;
}
.scroll-container::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}
.scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}
.scroll-card {
  flex: 0 0 280px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}
.scroll-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.scroll-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}
.scroll-card-body {
  padding: 16px;
}
.scroll-card h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
}
.scroll-card p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* === Feature Cards (Large Image) === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
}
.feature-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  background-size: cover;
  background-position: center;
}
.feature-body {
  padding: 24px;
}
.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.feature-body h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--gray-900);
}
.feature-body p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
}

/* === Page Layout with Sidebar === */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}
.page-main { min-width: 0; }

/* === Sidebar === */
.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}
.sidebar-section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--primary);
}
.sidebar-ranking {
  list-style: none;
}
.sidebar-ranking li {
  margin-bottom: 16px;
}
.sidebar-ranking li:last-child {
  margin-bottom: 0;
}
.sidebar-ranking li a {
  display: flex;
  gap: 12px;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.sidebar-ranking li a:hover {
  background: var(--gray-50);
}
.rank-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-ranking li:nth-child(1) .rank-num {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.sidebar-ranking li:nth-child(2) .rank-num {
  background: linear-gradient(135deg, #d1d5db, #9ca3af);
}
.sidebar-ranking li:nth-child(3) .rank-num {
  background: linear-gradient(135deg, #d97706, #b45309);
}
.rank-image {
  width: 80px;
  aspect-ratio: 3 / 2;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  background-color: var(--gray-200);
}
.rank-info {
  flex: 1;
  min-width: 0;
}
.rank-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 6px;
  border-radius: 8px;
  margin-bottom: 4px;
}
.rank-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Breadcrumb === */
.breadcrumb {
  padding: 12px 0;
  font-size: 13px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 20px;
}
.breadcrumb a {
  color: var(--primary);
}
.breadcrumb a:hover {
  text-decoration: underline;
}

/* === Article Detail === */
.article-detail {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.article-detail h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--gray-900);
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}
.article-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin-bottom: 32px;
  background-color: var(--gray-200);
}
.article-body {
  line-height: 2;
  font-size: 16px;
  color: var(--gray-800);
}
.article-body p {
  margin-bottom: 20px;
}
.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 48px 0 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f7fa 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--gray-900);
}
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--gray-200);
  color: var(--gray-900);
}
.article-body img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 24px 0;
}
.article-body ul,
.article-body ol {
  margin: 20px 0 20px 24px;
}
.article-body li {
  margin-bottom: 8px;
}

/* === Article TOC === */
.article-toc {
  background: #f8fafc;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 32px;
  overflow: hidden;
}
.article-toc .toc-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  padding: 14px 20px;
  background: var(--primary-dark);
  color: #fff;
}
.article-toc ul,
.article-toc ol {
  padding: 16px 20px 16px 40px;
  margin: 0;
}
.article-toc li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.article-toc a {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.article-toc a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* === Info Boxes === */
.info-box {
  background: linear-gradient(135deg, #f0fdfa, #e0f7fa);
  border: 1px solid #99f6e4;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.info-box h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.warn-box {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fbbf24;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.warn-box h4 {
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 12px;
}

/* === Related Articles === */
.related-articles {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--gray-200);
}
.related-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.related-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}
.related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.related-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background-color: var(--gray-200);
}
.related-card-body {
  padding: 12px;
}
.related-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.related-card h3 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Footer === */
.footer {
  background: var(--gray-900);
  color: #fff;
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
.footer-logo {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.7;
}
.footer-links h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}
.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--gray-400);
  padding: 6px 0;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #fff;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
}

/* === Responsive === */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  
  .hero-carousel { height: 320px; }
  .carousel-content {
    bottom: 40px;
    left: 20px;
    max-width: calc(100% - 40px);
  }
  .carousel-content h2 { font-size: 22px; }
  .carousel-content p { font-size: 14px; }
  
  .card-grid,
  .card-grid-3,
  .feature-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  
  .section { padding: 40px 0; }
  .section-title { font-size: 22px; }
  
  .article-detail { padding: 20px 16px; }
  .article-detail h1 { font-size: 22px; }
  .article-body { font-size: 15px; }
  .article-body h2 { font-size: 19px; padding: 14px 16px; margin: 32px 0 16px; }
  .article-body h3 { font-size: 17px; margin: 24px 0 12px; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  
  .scroll-card { flex: 0 0 240px; }
}
