/*
Theme Name: HITOTOKI
Theme URI: https://hitotoki-stay.com
Author: HITOTOKI
Author URI: https://hitotoki-stay.com
Description: 日本の貸切宿・民泊予約サイト「HITOTOKI（ひととき）」のWordPressテーマ。和モダンなデザインで、全国の宿泊施設を紹介するのに最適です。
Version: 1.7.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hitotoki
Tags: custom-background, custom-logo, custom-menu, featured-images, full-width-template, one-column, theme-options, translation-ready

=== 変更履歴 ===
v1.7.1 (2024-12-24)
- hitotoki_format_price() 関数のバグ修正（文字列対応）
- single-property.php の安定化

v1.7.0 (2024-12-24)
- 物件名（英語/日本語）の表示対応
- 物件詳細ページのデザイン改善

v1.6.0 (2024-12-24)
- 物件カードのデザイン更新
- ギャラリー機能追加

v1.5.0 (2024-12-24)
- 多言語対応（日本語・英語・中国語）
- ヘッダーに言語切り替えボタン追加
*/

/* ========== CSS Variables ========== */
:root {
  --sumi: #1C1C1C;
  --sumi-light: #3A3A3A;
  --kinari: #F5F1E8;
  --washi: #FAF8F3;
  --aka: #B33E3E;
  --shu: #D14B4B;
  --kin: #C9A86C;
  --kin-light: #E8D4A8;
  --matcha: #5B7A5B;
  --ai: #2E4F5C;
  --fuji: #6B5B7A;
  --asagi: #48929B;
  --text: #2C2C2C;
  --text-light: #5A5A5A;
  --border: rgba(0,0,0,0.08);
}

/* ========== Reset & Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  background: var(--washi);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(28, 28, 28, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.8rem 2rem;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--kin);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Shippori Mincho', serif;
  font-size: 1rem;
  color: var(--kin);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: var(--kinari);
}

.logo-jp {
  font-family: 'Shippori Mincho', serif;
  font-size: 0.65rem;
  color: var(--kin);
  letter-spacing: 0.3em;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.main-navigation a {
  font-size: 0.8rem;
  color: var(--kinari);
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
  opacity: 0.9;
}

.main-navigation a:hover {
  color: var(--kin);
  opacity: 1;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--kinari);
  transition: all 0.3s ease;
}

.lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin-left: 1.5rem;
}

.lang-btn {
  background: none;
  border: 1px solid transparent;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 4px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1;
  border-color: var(--kin);
}

/* ========== HERO SECTION ========== */
.hero-section {
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: var(--sumi);
  background-size: cover;
  background-position: center;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(28, 28, 28, 0.7) 0%,
    rgba(28, 28, 28, 0.5) 50%,
    rgba(28, 28, 28, 0.8) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--kinari);
}

.hero-icon {
  width: 60px;
  height: 60px;
  border: 1px solid var(--kin);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.hero-icon span {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.5rem;
  color: var(--kin);
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-family: 'Shippori Mincho', serif;
  font-size: 1rem;
  color: var(--kin);
  letter-spacing: 0.5em;
  margin-bottom: 2rem;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--kin);
  margin: 0 auto 2rem;
}

.hero-tagline {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.1rem;
  line-height: 2.2;
  opacity: 0.9;
  margin-bottom: 3rem;
}

.hero-cta {
  display: inline-block;
  padding: 1rem 3rem;
  border: 1px solid var(--kin);
  color: var(--kinari);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  transition: all 0.3s ease;
}

.hero-cta:hover {
  background: var(--kin);
  color: var(--sumi);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--kin), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%, 100% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ========== CONTENT SECTIONS ========== */
.content-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--sumi);
  margin-bottom: 0.5rem;
}

.section-header .jp {
  font-family: 'Shippori Mincho', serif;
  font-size: 0.85rem;
  color: var(--text-light);
  letter-spacing: 0.2em;
}

/* ========== ABOUT SECTION ========== */
.about-lead {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.1rem;
  line-height: 2.2;
  text-align: center;
  margin-bottom: 4rem;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-item {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-item h3 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--sumi);
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* ========== AREA SECTION ========== */
.area-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.area-card {
  background: white;
  border: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.area-card:hover {
  border-color: var(--kin);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(201, 168, 108, 0.15);
}

.area-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.area-card.disabled:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

.area-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  color: var(--sumi);
  margin-bottom: 0.3rem;
}

.area-jp {
  font-family: 'Shippori Mincho', serif;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.area-count {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  color: var(--aka);
}

.area-count.coming {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 0.75rem;
  color: var(--text-light);
}

.area-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-top: 0.8rem;
}

/* ========== PROPERTIES SECTION ========== */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.property-card {
  background: white;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease;
}

.property-card:hover {
  border-color: var(--kin);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.property-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .property-image img {
  transform: scale(1.05);
}

.property-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--aka);
  color: white;
  padding: 0.3rem 0.8rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.property-info {
  padding: 1.5rem;
}

.property-name {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--sumi);
  margin-bottom: 0.3rem;
}

.property-name-jp {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.property-specs {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.property-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--aka);
}

/* ========== CONTACT SECTION ========== */
#contact {
  background: var(--sumi);
  color: var(--kinari);
  max-width: none;
  padding: 6rem 2rem;
}

#contact .section-header h2,
#contact .section-header .jp {
  color: var(--kinari);
}

.contact-form {
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--kin);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--kinari);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--kin);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--kin);
  color: var(--sumi);
  border: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: var(--kin-light);
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--sumi);
  color: var(--kinari);
  padding: 4rem 2rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand .site-logo {
  margin-bottom: 1.5rem;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.8;
  opacity: 0.8;
}

.footer-section h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
  color: var(--kin);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.8rem;
}

.footer-section a {
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-section a:hover {
  opacity: 1;
  color: var(--kin);
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  opacity: 0.5;
}

/* ========== SINGLE PROPERTY ========== */
.property-single {
  padding-top: 60px;
}

.property-hero {
  height: 60vh;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4rem;
}

.property-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
}

.property-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--kinari);
}

.property-hero-text .property-tag {
  position: static;
  display: inline-block;
  margin-bottom: 1rem;
}

.property-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}

.property-title-jp {
  font-family: 'Shippori Mincho', serif;
  font-size: 1rem;
  color: var(--kin);
  margin-bottom: 1rem;
}

.property-hero-divider {
  width: 60px;
  height: 1px;
  background: var(--kin);
  margin: 0 auto;
}

.property-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 4rem;
}

.property-sidebar {
  order: 2;
}

.booking-card {
  background: white;
  border: 1px solid var(--border);
  padding: 2rem;
  position: sticky;
  top: 100px;
}

.booking-price {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.price-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.price-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: var(--aka);
}

.price-note {
  font-size: 0.8rem;
  color: var(--text-light);
}

.booking-specs {
  margin-bottom: 1.5rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.spec-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.spec-value {
  font-weight: 500;
}

.booking-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--sumi);
  color: var(--kinari);
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.booking-btn:hover {
  background: var(--kin);
  color: var(--sumi);
}

.property-main {
  order: 1;
}

.property-section {
  margin-bottom: 4rem;
}

.property-section .section-header {
  text-align: left;
  margin-bottom: 2rem;
}

.property-section .section-header h2 {
  font-size: 1.5rem;
}

.property-description {
  font-size: 1rem;
  line-height: 2;
}

.amenities-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  list-style: none;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.amenity-icon {
  color: var(--matcha);
  font-weight: bold;
}

.access-info .address {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.address-label {
  font-weight: 500;
}

.map-container {
  background: var(--kinari);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-note {
  color: var(--text-light);
  font-size: 0.9rem;
}

.related-properties {
  background: var(--kinari);
  padding: 4rem 2rem;
}

.related-properties .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.related-properties .properties-grid {
  max-width: 1200px;
  margin: 0 auto;
}

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

  .about-features {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .property-content-wrapper {
    grid-template-columns: 1fr;
  }

  .property-sidebar {
    order: 1;
  }

  .property-main {
    order: 2;
  }

  .booking-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .main-navigation {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .lang-switcher {
    margin-left: auto;
    margin-right: 1rem;
  }

  .area-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand .site-logo {
    justify-content: center;
  }

  .property-hero {
    height: 50vh;
  }

  .properties-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== UTILITY ========== */
.no-image {
  width: 100%;
  height: 100%;
  background: var(--kinari);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* WordPress Styles */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}
