/*
Theme Name: Comes Custom Theme
Theme URI: https://comes-iida.jp/
Author: Antigravity
Description: 飯田市のコワーキングスペース Comes のカスタムテーマです。
Version: 1.3.0
*/
:root {
  /* Color Palette - Comes Blue & White (Adjusted to match real photos) */
  --primary-blue: #004a99; /* Slightly deeper blue */
  --secondary-blue: #f0f7ff;
  --accent-blue: #3385ff;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --bg-white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.8);
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Spacing */
  --section-padding: 100px 5%;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Animation */
  --animation-reveal: reveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nowrap {
  display: inline-block;
  white-space: nowrap;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
}

.reveal.active {
  animation: var(--animation-reveal);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg-white);
}

/* --- Typography (Scoped to content areas to avoid affecting TOP page) --- */
.post-content h1, .page-content h1,
.post-content h2, .page-content h2,
.post-content h3, .page-content h3,
.post-content h4, .page-content h4,
.post-content h5, .page-content h5,
.post-content h6, .page-content h6 {
  color: var(--primary-blue);
  line-height: 1.4;
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.post-content h1, .page-content h1 { font-size: 2.2rem; }
.post-content h2, .page-content h2 { font-size: 1.8rem; margin-top: 2.5rem; }
.post-content h3, .page-content h3 { font-size: 1.4rem; border-bottom: 2px solid var(--primary-blue); display: inline-block; padding-bottom: 5px; margin-top: 2rem; }
.post-content h4, .page-content h4 { font-size: 1.2rem; margin-top: 1.5rem; }

.post-content p, .page-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.post-content ul, .page-content ul,
.post-content ol, .page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-content ul, .page-content ul { list-style-type: disc; }
.post-content ol, .page-content ol { list-style-type: decimal; }

.post-content li, .page-content li {
  margin-bottom: 0.5rem;
}

/* --- Layout Components --- */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 5% 10px; /* 上部の余白を増やして位置を下にずらす */
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  padding: 15px 5%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-blue);
  display: flex;
  align-items: flex-end; /* Align to the bottom line of the logo image */
  gap: 15px;
}

.logo img {
  height: 80px; /* Logo size doubled from 40px */
  width: auto;
  transition: var(--transition);
}

.logo img:hover {
  transform: scale(1.05);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-left: 5px;
  margin-bottom: 12px; /* Adjusted to align with the bottom of the 'Comes' graphic */
}

.social-links a.instagram {
  color: #E4405F; /* Instagram color base */
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  background-clip: text; /* Standard property for compatibility */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 1;
}

.social-links a.facebook {
  color: #1877F2; /* Facebook official color */
  opacity: 0.9;
}

.social-links a:hover {
  transform: translateY(-2px) scale(1.1);
  opacity: 1;
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--primary-blue);
}

nav a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: var(--transition);
}

nav a:hover::after {
  width: 100%;
}

.cta-button {
  background: var(--primary-blue);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid transparent;
}

.cta-button:hover {
  background: transparent;
  color: var(--primary-blue);
  border-color: var(--primary-blue);
  transform: translateY(-2px);
}

.nav-cta {
  padding: 6px 14px;
  font-size: 0.75rem; /* Further reduced */
}

/* --- Hero Section --- */

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(rgba(0, 86, 179, 0.1), rgba(255, 255, 255, 0.8)), url('images/景色.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 0 5%;
}

.hero-content {
  max-width: 900px;
  animation: fadeInUp 1s ease-out;
  margin-top: -10vh; /* Lift content up slightly from the center */
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--primary-blue);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

/* --- News Section --- */
.news-section {
  padding: 40px 5%;
  background: white;
  border-bottom: 1px solid #f8f9fa;
}

.news-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 60px;
}

.news-header {
  flex: 0 0 150px;
}

.news-header h2 {
  font-size: 1.5rem;
  color: var(--primary-blue);
  margin-bottom: 5px;
}

.news-header p {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.news-list {
  flex: 1;
}

.news-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: var(--transition);
}

.news-item:first-child {
  padding-top: 0;
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-size: 0.9rem;
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
  min-width: 90px;
}

.news-title {
  font-size: 1rem;
  font-weight: 500;
}

.news-title a {
  text-decoration: none;
  color: var(--text-dark);
  transition: var(--transition);
}

.news-title a:hover {
  color: var(--primary-blue);
}

.no-news {
  color: var(--text-light);
  font-style: italic;
  padding: 10px 0;
}

@media (max-width: 768px) {
  .news-container {
    flex-direction: column;
    gap: 20px;
  }
  
  .news-header {
    flex: none;
    text-align: center;
    width: 100%;
  }
  
  .news-item {
    flex-direction: column;
    gap: 5px;
  }
}

/* --- How to Use Section --- */
.how-to-use-section {
  padding: var(--section-padding);
  background: white;
}

.steps-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.step-card {
  flex: 1;
  background: #f8f9fa;
  padding: 40px 30px;
  border-radius: var(--border-radius);
  text-align: center;
  position: relative;
  transition: var(--transition);
  border: 1px solid #eee;
}

.step-card.highlight {
  background: white;
  border: 2px solid var(--primary-blue);
  box-shadow: 0 15px 40px rgba(0, 86, 179, 0.1);
}

.step-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-blue);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 1.25rem;
  color: var(--primary-blue);
  margin-bottom: 15px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.step-arrow {
  font-size: 2rem;
  color: var(--secondary-blue);
}

.step-footer {
  text-align: center;
  margin-top: 50px;
}

.step-footer p {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.secondary-button {
  display: inline-block;
  padding: 14px 40px;
  background: var(--primary-blue) !important;
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  border: none !important;
  box-shadow: 0 4px 15px rgba(0, 74, 153, 0.2);
}

.secondary-button:hover {
  background: var(--accent-blue) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 74, 153, 0.3);
}

@media (max-width: 768px) {
  .steps-container {
    flex-direction: column;
    gap: 40px;
  }
  
  .step-arrow {
    transform: rotate(90deg);
  }
  
  .step-card {
    width: 100%;
  }
}


/* --- Sections --- */

section {
  padding: var(--section-padding);
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 15px;
}

.section-title p {
  color: var(--text-light);
}

/* --- Space Cards --- */

.spaces-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.space-card {
  perspective: 1000px;
}

.space-card-inner {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #eee;
  height: 100%;
}

.space-card:hover .space-card-inner {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 86, 179, 0.12);
  border-color: var(--primary-blue);
  z-index: 10;
}

.space-img {
  height: 250px;
  background: var(--secondary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.space-info {
  padding: 30px;
}

.space-info p {
  color: var(--text-light);
}

/* Specific Image Adjustments */
.space-card:nth-child(1) .space-img { /* コワーキングスペース */
  background-position: center 30%; /* スライトリーダウン（上に余白を作ることで画像を下にずらす） */
}

.space-card:nth-child(3) .space-img { /* 会議室 */
  background-position: center bottom 20%;
}

.space-card:nth-child(4) .space-img { /* レンタルスペース */
  background-size: contain; /* 照明と床が写るよう全体を表示 */
  background-repeat: no-repeat;
  background-position: center;
  background-color: #f8f9fa; /* 余白部分を清潔感のある色に */
}

/* --- Amenities Section Modernization --- */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.amenity-card {
  background: var(--bg-white);
  padding: 20px 15px; /* Compact padding */
  border-radius: 12px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.amenity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-blue);
  transform: scaleX(0);
  transition: var(--transition);
}

.amenity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 74, 153, 0.08);
  border-color: rgba(0, 74, 153, 0.1);
}

.amenity-card:hover::before {
  transform: scaleX(1);
}

.amenity-icon {
  font-size: 1.5rem; /* Smaller icons */
  margin-bottom: 10px;
  display: block;
}

.amenity-card h4 {
  font-size: 0.9rem; /* Slightly smaller for mobile */
  color: var(--primary-blue);
  font-weight: 700;
}

/* --- Footer --- */

footer {
  background: var(--primary-blue);
  color: white;
  padding: 60px 5% 30px;
  text-align: center;
}

.footer-links {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: var(--transition);
  white-space: nowrap; /* Prevent wrap in footer links */
}

.footer-links a:hover {
  opacity: 1;
}

.pricing-notes {
  text-align: center;
  margin-top: 60px;
  clear: both;
}

.pricing-notes .note {
  color: var(--text-light);
  font-size: 0.7rem; /* Even smaller as requested */
  margin-bottom: 10px;
}

/* Pricing Table Styles */
.pricing-wrap + div table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.pricing-wrap + div th {
  background: var(--secondary-blue);
  color: var(--primary-blue);
  padding: 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pricing-wrap + div td {
  padding: 12px 10px;
  border-bottom: 1px solid #f0f4f8;
  color: var(--text-dark);
}

.pricing-wrap + div h4 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-nav-logo {
  display: none;
}

/* --- Responsive --- */

/* --- Menu Toggle (Hamburger) --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--primary-blue);
  border-radius: 10px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- Responsive --- */

@media (max-width: 1024px) {
  .spaces-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 50px 15px;
  }

  header { 
    padding: 15px 15px 8px; /* モバイルも上部余白を調整 */
  }
  
  .logo img { height: 45px; } /* Slightly smaller for mobile */

  .social-links {
    margin-bottom: 2px; /* Lowered by 3px as requested */
    gap: 8px;
  }

  .social-links svg {
    width: 18px;
    height: 18px;
  }

  .nav-cta {
    padding: 5px 10px;
    font-size: 0.65rem; /* Super compact for mobile */
  }

  /* Mobile Nav */
  .menu-toggle { display: flex; }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 60%; /* More compact */
    height: 100vh;
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from space-between to allow fixed spacing */
    align-items: center;
    padding: 100px 0; /* Padding top for menu start */
    transition: var(--transition);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  .mobile-nav-logo {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 50px; /* Fixed distance from Pricing */
  }

  .mobile-nav-logo img {
    height: 80px;
    width: auto;
    opacity: 1;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  nav.active {
    right: 0;
  }

  /* Hero Mobile Optimization */
  .hero h1 { 
    font-size: 1.4rem; 
    line-height: 1.5;
  }
  .hero p { 
    font-size: 0.7rem; /* Further reduced to ensure each sentence stays on one line */
    line-height: 1.6;
    margin-bottom: 25px;
  }

  /* Compact Amenities for Mobile */
  .amenities-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns for ultimate compactness */
    gap: 8px;
  }
  
  .amenity-card {
    padding: 12px 8px;
  }
  
  .amenity-icon {
    font-size: 1.2rem;
    margin-bottom: 5px;
  }
  
  .amenity-card h4 {
    font-size: 0.65rem;
  }

  /* About Mobile */
  #about > div {
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  /* Space Grid: 1 column for better visibility as requested */
  .spaces-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title h2 { font-size: 1.6rem; }

  /* Pricing Mobile: Shrink to fit 3 columns on small screen */
  .pricing-wrap {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px !important;
    margin: 0 -5px !important;
    justify-content: stretch !important;
    flex-wrap: nowrap !important;
  }
  
  .pricing-wrap > div {
    min-width: 0 !important;
    padding: 15px 10px !important;
    border-radius: 12px !important;
  }
  
  .pricing-wrap h3 {
    font-size: 0.8rem !important;
  }
  
  .pricing-wrap div[style*="font-size: 2.5rem"] {
    font-size: 1.1rem !important;
    margin: 10px 0 !important;
  }
  
  .pricing-wrap ul {
    font-size: 0.65rem !important;
    padding-left: 0;
  }
  
  .pricing-wrap .cta-button {
    padding: 6px 10px !important;
    font-size: 0.7rem !important;
    width: 100%;
  }
  
  .pricing-wrap span[style*="font-size: 1.2rem"] {
    font-size: 0.7rem !important;
  }
  
  .pricing-wrap div[style*="padding: 5px 15px"] {
    padding: 2px 8px !important;
    font-size: 0.6rem !important;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.1rem; }
  .footer-links {
    flex-wrap: wrap;
    gap: 15px;
  }
}
