/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", 
               "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #0052a3;
  text-decoration: underline;
}

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

/* Header */
.site-header {
  background: #fff;
  border-bottom: 2px solid #e5e5e5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.site-title:hover {
  text-decoration: none;
  color: #0066cc;
}

/* Top Navigation */
.top-nav {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.top-nav a {
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #555;
  transition: all 0.2s;
  white-space: nowrap;
}

.top-nav a:hover {
  background: #0066cc;
  color: white;
  border-color: #0066cc;
  text-decoration: none;
  transform: translateY(-1px);
}

.top-nav a:first-child {
  background: #e8f4fd;
  color: #0066cc;
  font-weight: 500;
}

.top-nav a:first-child:hover {
  background: #0066cc;
  color: white;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: #333;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger animation */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.active {
  max-height: 500px;
}

.mobile-menu a {
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  font-size: 16px;
  transition: background 0.2s;
}

.mobile-menu a:hover {
  background: #f8f9fa;
  text-decoration: none;
  color: #0066cc;
}

.mobile-menu a:first-child {
  font-weight: 500;
  color: #0066cc;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
  }
  
  .top-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-menu {
    display: flex;
  }
}

/* Desktop - hide mobile elements */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
  
  .mobile-menu {
    display: none;
  }
}

/* Footer */
.site-footer {
  background: #fff;
  border-top: 1px solid #e5e5e5;
  margin-top: 60px;
  padding: 30px 0;
  color: #666;
  font-size: 14px;
}

/* Footer Navigation */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-section a {
  padding: 5px 0;
  color: #666;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: #0066cc;
  text-decoration: underline;
}

.site-footer > .container > p {
  text-align: center;
  border-top: 1px solid #e5e5e5;
  padding-top: 20px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .footer-nav {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Breadcrumb */
.breadcrumb {
  margin: 20px 0;
  font-size: 14px;
  color: #666;
}

.breadcrumb .separator {
  margin: 0 8px;
  color: #999;
}

.breadcrumb a {
  color: #666;
}

.breadcrumb strong {
  color: #333;
}

/* Typography */
h1 {
  font-size: 28px;
  margin: 20px 0;
  color: #222;
  line-height: 1.3;
}

h2 {
  font-size: 22px;
  margin: 30px 0 15px;
  color: #333;
  border-bottom: 2px solid #e5e5e5;
  padding-bottom: 8px;
}

h3 {
  font-size: 18px;
  margin: 15px 0;
  color: #333;
}

.lead {
  font-size: 16px;
  color: #555;
  margin: 20px 0;
  line-height: 1.7;
}

/* Search Options (Home Page) */
.search-options {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.search-option {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: all 0.2s;
  display: block;
  min-width: 180px;
  max-width: 200px;
}

.search-option:hover {
  border-color: #0066cc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-decoration: none;
  transform: translateY(-2px);
}

.search-option-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.search-option-name {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.search-option-description {
  font-size: 12px;
  color: #666;
}

.search-option-divider {
  font-size: 14px;
  color: #999;
  font-weight: 500;
}

@media (max-width: 768px) {
  .search-options {
    flex-direction: column;
    gap: 15px;
  }
  
  .search-option-divider {
    display: none;
  }
}

/* Prefecture Grid (Home Page) */
.prefecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.prefecture-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: all 0.2s;
  display: block;
}

.prefecture-card:hover {
  border-color: #0066cc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-decoration: none;
  transform: translateY(-2px);
}

.prefecture-name {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.prefecture-count {
  font-size: 14px;
  color: #666;
}

/* Municipality & Town Lists */
.municipality-list,
.town-list,
.chome-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.municipality-list li,
.town-list li,
.chome-list li {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  transition: all 0.2s;
}

.municipality-list a,
.town-list a,
.chome-list a {
  display: block;
  padding: 12px 15px;
  color: #333;
}

.municipality-list li:hover,
.town-list li:hover,
.chome-list li:hover {
  border-color: #0066cc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.municipality-name,
.town-name,
.chome-name {
  font-weight: 500;
  color: #333;
}

.spot-count {
  color: #666;
  font-size: 14px;
  margin-left: 8px;
}

.has-chomes {
  display: inline-block;
  background: #f0f8ff;
  color: #0066cc;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

/* Spot Cards */
.spot-cards {
  list-style: none;
  display: grid;
  gap: 15px;
  margin: 20px 0;
}

.spot-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s;
}

.spot-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #d0d0d0;
}

.spot-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.spot-name {
  font-size: 18px;
  font-weight: bold;
  color: #222;
  flex: 1;
}

.spot-type {
  background: #e8f4fd;
  color: #0066cc;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.spot-details {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.spot-address,
.spot-genre {
  margin: 8px 0;
  display: flex;
  align-items: start;
}

.icon {
  margin-right: 8px;
  flex-shrink: 0;
}

.map-link {
  display: inline-flex;
  align-items: center;
  background: #0066cc;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  margin-top: 12px;
  font-weight: 500;
  transition: background 0.2s;
}

.map-link:hover {
  background: #0052a3;
  text-decoration: none;
}

.map-link .icon {
  margin-right: 6px;
}

/* SEO Content Section */
.seo-content {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 25px;
  margin: 40px 0;
}

.seo-content h2 {
  border: none;
  margin-top: 0;
}

.seo-content p {
  color: #555;
  line-height: 1.8;
  margin: 15px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  .prefecture-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  
  .municipality-list,
  .town-list,
  .chome-list {
    grid-template-columns: 1fr;
  }
  
  .spot-card {
    padding: 15px;
  }
  
  .spot-header {
    flex-direction: column;
  }
  
  .spot-type {
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 16px;
  }
  
  .prefecture-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .prefecture-card {
    padding: 10px;
  }
  
  .prefecture-name {
    font-size: 14px;
  }
  
  .prefecture-count {
    font-size: 12px;
  }
}