/* CSS Variables */
:root {
  --color-main: #258d5d;
  --color-base: #FAF7F2;
  --color-sub: #D4E8DC;
  --color-accent: #D4764E;
  --color-text: #2D2D2D;
  --font-base: 'Noto Sans JP', sans-serif;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: var(--color-base);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 2rem;
  margin-top: 50px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-main);
  position: relative;
  display: block;
  text-align: center;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

h3 {
  font-size: 1.25rem;
  color: var(--color-main);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  word-break: auto-phrase; /* Better line breaks for Japanese */
}

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

ul {
  list-style: none;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-bg-light {
  background-color: #fff;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px; /* adjusted for larger logo */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  header.hide-on-scroll {
    transform: translateY(-100%);
  }
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-logo-link {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 80px;
  width: auto;
  display: block;
}

.nav-links a:not(.nav-logo-link) {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  transition: var(--transition);
}

.nav-links a:not(.nav-logo-link):hover {
  color: var(--color-main);
}

.nav-insta {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.nav-insta svg {
  stroke: var(--color-text);
  transition: var(--transition);
}

.nav-insta:hover svg {
  stroke: var(--color-main);
}

@media (min-width: 1025px) {
  .d-pc-none {
    display: none !important;
  }
}

/* Header Contact */
.header-contact {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-tel-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-tel {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-main);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1;
}

.header-time {
  font-size: 0.75rem;
  color: var(--color-text);
  margin-top: 0.25rem;
  line-height: 1;
}

.header-fax {
  font-size: 0.8rem;
  color: var(--color-text);
  margin-top: 0.2rem;
  line-height: 1;
}

.greeting-photo-col {
  padding-top: 118px;
}

.greeting-text {
  max-width: 22em;
}

@media (max-width: 768px) {
  .greeting-photo-col {
    padding-top: 0;
  }
  .greeting-text {
    max-width: 100%;
  }
}

.header-btn {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  border-radius: 50px;
}

.header-btn svg {
  margin-right: 0.25rem;
}

@media (max-width: 1024px) {
  .header-contact {
    display: none;
  }
}

/* Mobile Menu Settings */
@media (max-width: 768px) {
  header {
    height: auto;
  }

  .header-inner {
    flex-direction: column;
    padding: 0;
  }

  .nav-logo-link {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
    width: 100%;
    background-color: #fff; /* ロゴ背景を白に固定 */
  }

  .nav-logo {
    height: 45px;
    width: auto;
  }

  /* 2行3列グリッドレイアウト */
  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3列 */
    gap: 0; /* 隙間を無くす */
    padding: 0;
    background-color: var(--color-sub); /* 背景色 */
  }

  /* リンクアイテムのスタイル */
  .nav-links a:not(.nav-logo-link) {
    font-size: 0.75rem; /* サイズ調整 */
    padding: 0.75rem 0.25rem; /* 上下左右のパディング */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(0,0,0,0.05); /* 区切り線 */
    border-bottom: 1px solid rgba(0,0,0,0.05);
    white-space: normal; /* 折り返しを許可（文字が長い場合） */
    line-height: 1.2;
    color: var(--color-text);
  }

  /* 右端の列の右ボーダーを消す */
  .nav-links a:not(.nav-logo-link):nth-child(3n) {
    border-right: none;
  }
  
  /* インスタグラムのアイコン調整 */
  .nav-insta {
    border-right: none !important;
  }
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Micro Interactions */
.hover-lift {
  transition: var(--transition);
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Helper Classes */
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }

@media (min-width: 769px) {
  .text-pc-16 {
    max-width: 100%;
    word-break: break-all;
    margin-left: auto;
    margin-right: auto;
  }
  .text-pc-left {
    text-align: left !important;
  }
}

@media (max-width: 768px) {
  h2 {
    font-size: 1.4rem;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
  }
  .text-mobile-center {
    text-align: center !important;
  }
  .card[style*="flex-direction: row"] {
    flex-direction: column !important;
  }
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }
.mt-2 { margin-top: 2rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
}

.btn-accent {
  background-color: var(--color-accent);
  color: #fff;
}

.btn-accent:hover {
  background-color: #c0633c;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-main {
  background-color: var(--color-main);
  color: #fff;
}

.btn-main:hover {
  background-color: #1e734c;
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 3rem; /* padding for content to breathe */
  overflow: hidden;
  background-color: var(--color-sub);
}

.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  margin-top: 50px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  max-width: 800px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.5);
}

.hero h1 {
  font-size: clamp(1.5rem, 5vw, 3rem);
  color: var(--color-main);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
}

/* CTA Section */
.cta-box {
  background: linear-gradient(135deg, var(--color-main), #1a6b46);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cta-box h2 {
  color: #fff;
}
.cta-box h2::after {
  background-color: var(--color-accent);
}

.tel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.cta-box .tel {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 1.5rem;
  line-height: 1.2;
}

.cta-box .tel-sub {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.cta-fax {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

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

/* Badge */
.badge {
  display: inline-block;
  background-color: var(--color-accent);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

/* Cards */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-sub);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-icon {
  font-size: 2.5rem;
  color: var(--color-main);
  margin-bottom: 1rem;
}

/* Service Item (Vertical) */
.service-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--color-sub);
}
.service-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.service-title {
  font-weight: 700;
  color: var(--color-main);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
}

/* Service Item (Horizontal Block) */
.service-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1rem;
}

.service-item-block {
  flex: 1;
  min-width: 250px;
}

/* Image Frames Grid */
.image-frames-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.image-frame {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer; /* Indicate it's clickable */
  transition: transform 0.3s ease;
}

.image-frame:hover {
  transform: scale(1.02);
}

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

/* Lightbox Modal */
.lightbox {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh; /* Scale down to screen height */
  border-radius: var(--radius-sm);
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: var(--color-main);
  text-decoration: none;
  cursor: pointer;
}

@keyframes zoomIn {
  from {transform:scale(0.9)} 
  to {transform:scale(1)}
}

/* Enlarge Instruction Text */
.enlarge-instruction {
  color: var(--color-text);
  opacity: 0.7;
}

.mobile-text {
  display: none;
}

@media (max-width: 768px) {
  .mobile-text {
    display: inline;
  }
  .pc-text {
    display: none;
  }
}

/* Accordion */
.accordion {
  border: 1px solid var(--color-sub);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
  background: #fff;
}

.accordion-header {
  padding: 1.25rem 1.5rem;
  background-color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--color-text);
  transition: var(--transition);
}

.accordion-header:hover {
  background-color: var(--color-sub);
}

.accordion-header::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-main);
  transition: transform 0.3s ease;
}

.accordion-header.active::after {
  transform: rotate(45deg);
}

.accordion-body {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: #fafafa;
}

.accordion-body p {
  margin: 1rem 0;
  color: 0;
}

/* Flow */
.flow-step {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

@media (max-width: 768px) {
  .flow-step { flex-direction: column; gap: 1rem; text-align: center;}
}

.flow-step::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 80px;
  bottom: -3rem;
  width: 2px;
  background-color: var(--color-sub);
  z-index: 0;
}
@media (max-width: 768px) {
  .flow-step::before { display: none; }
}

.flow-step:last-child::before {
  display: none;
}

.flow-num {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--color-main);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-md);
}
@media (max-width: 768px) {
  .flow-num { margin: 0 auto; }
}

.flow-content {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  flex-grow: 1;
  border: 1px solid var(--color-sub);
}

.flow-content h3 {
  color: var(--color-accent);
}

/* Footer */
footer {
  background-color: var(--color-text);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

footer p {
  color: #aaa;
  font-size: 0.9rem;
}

/* Add custom utility classes */
.color-accent { color: var(--color-accent); }
.color-main { color: var(--color-main); }
.bg-sub { background-color: var(--color-sub); }
.bg-base { background-color: var(--color-base); }
.rounded-img { border-radius: var(--radius-md); overflow: hidden; }


.mt-auto { margin-top: auto; }
.pt-2 { padding-top: 2rem; }

/* Emphasis */
.text-emphasis {
  color: var(--color-accent);
  font-weight: 800;
  font-size: 1.1em;
}

/* Company Profile List (Div Layout) */
.company-profile-list {
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-sub); /* 外枠の追加 */
  display: flex;
  flex-direction: column;
}

.company-profile-list .profile-row {
  display: flex;
  border-bottom: 1px solid var(--color-sub); /* 行の区切り線 */
}

.company-profile-list .profile-row:last-child {
  border-bottom: none;
}

.company-profile-list .profile-head {
  background-color: var(--color-sub);
  color: var(--color-main);
  font-weight: 700;
  width: 30%;
  padding: 1rem 1.5rem;
  box-sizing: border-box;
  border-right: 1px solid #d1d5db; /* 見出しとデータの区切り線 */
}

.company-profile-list .profile-data {
  width: 70%;
  padding: 1rem 1.5rem;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  .company-profile-list .profile-row {
    flex-direction: column;
  }
  .company-profile-list .profile-head {
    width: 100%;
    padding: 0.8rem 1.5rem 0.2rem;
    background-color: rgba(0,0,0,0.03); /* 見出しを区別しやすくする */
    border-right: none;
    border-bottom: 1px dashed var(--color-sub); /* スマホ版での見出しとデータの区切り */
  }
  .company-profile-list .profile-data {
    width: 100%;
    padding: 0.2rem 1.5rem 1rem;
    word-break: break-all; /* 長い電話番号や英数字の無理やり折り返し */
  }
}


/* Table for pricing */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 2rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: #fff;
}

th, td {
  padding: 1.25rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-sub);
}

th {
  background-color: var(--color-sub);
  color: var(--color-main);
  font-weight: 700;
  white-space: nowrap;
}

table tr:last-child td {
  border-bottom: none;
}

/* -----------------------------
   Mobile Table Stacking Layout 
   ----------------------------- */
@media (max-width: 768px) {
  .table-wrapper {
    box-shadow: none;
    background: transparent;
    margin-bottom: 1rem;
    overflow-x: visible; /* Remove horizontal scroll */
  }

  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
    min-width: 0;
  }

  table {
    background: transparent;
  }

  /* Hide table headers (but not screen readers if keeping semantics, here just display:none for visual stacking) */
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  tr {
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    padding: 1rem;
  }

  tr:last-child {
    margin-bottom: 0;
  }

  td {
    border: none;
    border-bottom: 1px dotted var(--color-sub);
    position: relative;
    padding: 0.75rem 0;
    text-align: left;
  }

  td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  td:first-child {
    padding-top: 0;
    font-weight: 700;
    color: var(--color-main);
  }
}

/* Mobile Fixed CTA */
.mobile-cta {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 90px; /* Make room for sticky footer */
  }

  .mobile-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .mobile-cta-msg {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text);
    padding: 6px 4px;
    margin: 0;
    background-color: var(--color-sub);
    border-bottom: 1px solid #e0e0e0;
  }

  .mobile-cta-buttons {
    display: flex;
    width: 100%;
  }

  .m-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 8px 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .m-btn:last-child {
    border-right: none;
  }

  .m-btn svg {
    margin-bottom: 2px;
  }

  .m-btn-tel { background-color: var(--color-accent); } /* Orange */
  .m-btn-mail { background-color: #007bff; } /* Blue */
  .m-btn-line { background-color: #06C755; } /* Green */
}
