/* ============================================
   スペース若柴 - メインスタイルシート
   現行サイト忠実再現版
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
  font-size: 120%;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", "Noto Sans JP", "メイリオ", Meiryo, sans-serif;
  color: #333;
  line-height: 1.8;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: #5fa537;
  text-decoration: none;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.7;
}

ul { list-style: none; }
table { border-collapse: collapse; width: 100%; }

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

.main-layout {
  display: flex;
  gap: 30px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 30px 20px;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
}

/* ===== Header ===== */
.header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.header__logo img {
  height: 130px;
  width: auto;
}

.header__info {
  font-size: 13px;
  color: #666;
  text-align: right;
  line-height: 1.7;
}

/* ===== Navigation ===== */
.nav {
  background: #5fa537;
  margin-top:10px;
}

.nav__list {
  display: flex;
  justify-content: center;
  max-width: 1260px;
  width: 100%;
  margin: 0 auto;
}

.nav__item {
  flex: 1;
  text-align: center;
}

.nav__item a {
  display: block;
  padding: 16px 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.3s;
  border-right: 1px solid rgba(255,255,255,0.25);
}

.nav__item:last-child a {
  border-right: none;
}

.nav__item a:hover,
.nav__item a.is-active {
  background: #4a8a2a;
  opacity: 1;
}

/* Hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #5fa537;
  margin: 5px 0;
  transition: 0.3s;
}

/* ===== Hero Banner ===== */
.hero-banner {
  width: 100%;
  position: relative;
  overflow: hidden;
  margin-bottom:20px;
  }

.hero-banner img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 768px) {
  .hero-banner img {
    height: 440px;
    object-fit: cover;
    object-position: center center;
  }
}

.hero-banner__overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 22px 48px;
  border-radius: 12px;
}

.hero-banner__overlay h1 {
  font-size: 2.3rem;
  color: #5fa537;
  text-shadow: 0 1px 4px rgba(255,255,255,0.5);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.5;
  font-family: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN", "Noto Sans JP", sans-serif;
}

@media (max-width: 768px) {
  .hero-banner__overlay h1 {
    font-size: 1.8rem;
  }
}

/* ===== Event / Article blocks ===== */
.article-block {
  margin-bottom: 65px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e0e0e0;
}

.article-block:last-of-type {
  border-bottom: none;
}

.article-block__image {
  margin-bottom: 15px;
}

.article-block__image img {
  max-width: 100%;
  border-radius: 4px;
}

.article-block__title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.6;
}

.article-block__subtitle {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.article-block__text {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
}

/* Video embed */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 30px;
  border-radius: 4px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ===== Section Headings (楕円ボーダー) ===== */
.section-heading-oval {
  text-align: center;
  margin: 40px 0 25px;
}

.section-heading-oval__title {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #5fa537;
  letter-spacing: 0.15em;
  padding: 12px 30px;
  border: 4px solid #5fa537;
  border-radius: 50px;
  text-align: center;
}

/* ===== News Section ===== */
.news-heading {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #5fa537;
}

/* NEW バッジ */
.newMark {
  display: inline-block;
  background: #e8730a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.05em;
}

/* ===== トップページ 最新ニュースリスト ===== */
ul.top-news-list {
  margin-bottom: 10px;
}

ul.top-news-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 8px;
  border-bottom: 1px solid #e8e8e8;
  transition: background 0.2s;
}

ul.top-news-list li:hover {
  background: rgba(95,165,55,0.04);
}

ul.top-news-list .up_ymd {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
  flex-shrink: 0;
}

ul.top-news-list .news-title-wrap {
  flex: 1;
  min-width: 0;
}

ul.top-news-list .news-title-wrap a {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

ul.top-news-list .news-title-wrap a:hover {
  color: #5fa537;
  opacity: 1;
}

/* ニュース一覧リンク */
.news-more-link {
  text-align: right;
  margin-top: 6px;
  margin-bottom: 30px;
}

.news-more-link a {
  display: inline-block;
  font-size: 13px;
  color: #5fa537;
  border: 1px solid #5fa537;
  padding: 5px 16px;
  border-radius: 3px;
  transition: background 0.25s, color 0.25s;
}

.news-more-link a:hover {
  background: #5fa537;
  color: #fff;
  opacity: 1;
}

/* ===== news.php ニュース一覧 ===== */
#newsList {
  margin-bottom: 20px;
}

#newsList li {
  padding: 16px 10px;
  border-bottom: 1px solid #e4e4e4;
  transition: background 0.2s;
  line-height: 1.7;
}

#newsList li:hover {
  background: rgba(95,165,55,0.04);
}

#newsList .up_ymd {
  display: inline-block;
  font-size: 12px;
  color: #999;
  letter-spacing: 0.05em;
  margin-right: 10px;
}

#newsList .catName {
  display: inline-block;
  font-size: 11px;
  background: #5fa537;
  color: #fff;
  padding: 1px 9px;
  border-radius: 3px;
  margin-right: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

#newsList .title {
  display: inline;
}

#newsList .title a {
  font-size: 15px;
  color: #5fa537;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#newsList .title a:hover {
  color: #3d7a22;
  opacity: 1;
}

#newsList .comment {
  display: block;
  font-size: 13px;
  color: #666;
  margin-top: 6px;
  padding-left: 0;
  line-height: 1.6;
  border-left: 3px solid #e0e0e0;
  padding-left: 10px;
  margin-left: 2px;
}

#newsList .thumbNailWrap img {
  border-radius: 4px;
}

.news-list {
  border-top: 1px solid #ddd;
}

.news-item {
  border-bottom: 1px solid #ddd;
}

.news-item a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 8px;
  color: #333;
  font-size: 15px;
  transition: background 0.3s;
}

.news-item a:hover {
  background: rgba(95,165,55,0.05);
  opacity: 1;
}

.news-item__date {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
  min-width: 110px;
}

.news-item__title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.news-item__excerpt {
  font-size: 13px;
  color: #555;
  margin-top: 4px;
  line-height: 1.4;
}

/* ===== About / History ===== */
.about-text {
  font-size: 15px;
  line-height: 2;
  color: #555;
  margin-bottom: 20px;
}

.history-table {
  width: 100%;
  font-size: 15px;
}

.history-table tr {
  border-bottom: 1px solid #e0e0e0;
}

.history-table td {
  padding: 10px 12px;
  vertical-align: top;
}

.history-table td:first-child {
  white-space: nowrap;
  font-weight: 600;
  color: #333;
  width: 120px;
}

/* ===== Sidebar ===== */
.sidebar-block {
  margin-bottom: 25px;
  text-align: center;
  background: #fff;
  border-radius: 4px;
}

.sidebar-block a {
  display: block;
  background: #fff;
}

.sidebar-block img {
  width: 100%;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #ddd;
}

.sidebar-block:first-child img {
  border: none;
}

.sidebar__shoplist-title {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
  letter-spacing: 0.1em;
}

.sidebar__shoplist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.sidebar__shoplist a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 220px;
  height: 90px;
  background: #fff;
  padding: 5px 6px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.sidebar__shoplist a img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.sidebar__shoplist-text {
  font-size: 13px;
  color: #666;
  text-align: center;
  margin-top: 4px;
}

/* ===== Footer ===== */
.footer {
margin-top:30px;
  background: #5fa537;
  color: #fff;
  padding: 30px 20px;
}

.footer__inner {
  display: flex;
  gap: 30px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: flex-start;
}

.footer__info {
  flex: 1;
}

.footer__name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer__org {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
}

.footer__details {
  font-size: 13px;
  line-height: 1.9;
  color: rgba(255,255,255,0.8);
}

.footer__map {
  width: 600px;
  flex-shrink: 0;
}

.footer__map iframe {
  width: 100%;
  height: 200px;
  border: 0;
  border-radius: 4px;
}

.footer__copy {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Page Title (下層ページ) ===== */
.page-title {
  background: #f5f5f5;
  padding: 30px 20px;
  border-bottom: 3px solid #5fa537;
}

.page-title__main {
  font-size: 24px;
  color: #333;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.05em;
}

/* ===== Content (下層) ===== */
.content h2 {
  font-size: 20px;
  color: #5fa537;
  margin: 35px 0 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #5fa537;
}

.content .section-heading-oval__title {
  margin: 0;
  padding: 12px 30px;
  border: 4px solid #5fa537;
}

.content h2:first-child { margin-top: 0; }

.content h3 {
  font-size: 17px;
  color: #333;
  margin: 25px 0 10px;
}

.content h4 {
  font-size: 15px;
  color: #5fa537;
  font-weight: 700;
  margin: 18px 0 8px;
}

.content p {
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 14px;
}

/* Schedule Table */
.schedule-table {
  width: 100%;
  font-size: 13px;
  background: #fff;
  border: 1px solid #ddd;
}

.schedule-table th {
  background: #5fa537;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 500;
  font-size: 13px;
}

.schedule-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.schedule-table td:first-child {
  font-weight: 700;
  color: #5fa537;
  white-space: nowrap;
  width: 80px;
}

/* ===== Madeleine Page ===== */
.madeleine-hero {
  width: 100%;
  height: 250px;
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

.madeleine-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.madeleine-hero__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  white-space: nowrap;
}

.madeleine-hero__text h2 {
  font-size: 32px;
  color: #fff;
  font-weight: 900;
  margin-bottom: 8px;
  border: none;
  padding: 0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.madeleine-hero__text .sub {
  font-size: 13px;
  color: #fff;
  line-height: 1.8;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  white-space: normal;
  text-align: center;
}

/* ===== Sub Hero（下層ページ共通バナー） ===== */
.subhero {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.subhero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.subhero__title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
  white-space: nowrap;
}

.madeleine-features {
  text-align: center;
  padding: 40px 0;
}

.madeleine-feature {
  margin-bottom: 30px;
}

.madeleine-feature h4 {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.madeleine-feature p {
  font-size: 14px;
  line-height: 1.9;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

/* Process */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 25px 0;
}

.process-step {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.process-step__image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.process-step__body {
  padding: 10px 12px;
}

.process-step__num {
  display: inline-block;
  background: #5fa537;
  color: #fff;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
}

.process-step__text {
  font-size: 12px;
  line-height: 1.6;
  color: #555;
  margin-top: 6px;
}

/* Products */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 25px 0;
}

.product-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
}

.product-card__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-card__body { padding: 14px; }

.product-card__name {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.product-card__desc {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}

.product-card__price {
  font-size: 15px;
  font-weight: 700;
  color: #5fa537;
}

/* Recruit */
.recruit-box {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 25px;
  margin: 25px 0;
}

.recruit-box h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 12px;
}

.contact-box {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
  margin-top: 20px;
  border: 2px solid #5fa537;
}

.contact-box .tel {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-top: 6px;
}

/* News archive page */
.news-archive__item {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #e0e0e0;
}

.news-archive__date {
  font-size: 13px;
  color: #888;
  min-width: 110px;
}

.news-archive__content h3 {
  font-size: 15px;
  color: #333;
  margin-bottom: 6px;
}

.news-archive__content h3 a { color: #333; }
.news-archive__content h3 a:hover { color: #5fa537; }

.news-archive__content p {
  font-size: 13px;
  color: #666;
}

.news-archive__loading {
  text-align: center;
  padding: 40px;
  color: #888;
}

/* Button */
.btn {
  display: inline-block;
  padding: 10px 28px;
  background: #555;
  color: #fff;
  font-size: 13px;
  border-radius: 4px;
  transition: background 0.3s;
}

.btn:hover {
  background: #333;
  opacity: 1;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .header__top {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    position: relative;
  }

  .header__info {
    text-align: center;
    font-size: 11px;
  }

  .header__logo img {
    height: 80px;
  }

  .nav__toggle {
    display: block;
    position: absolute;
    right: 10px;
    top: 10px;
  }

  .nav__list {
    flex-direction: column;
    display: none;
  }

  .nav__list.is-open { display: flex; }

  .nav__item a {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding: 12px 16px;
    text-align: left;
  }

  /* 2 column → 1 column */
  .main-layout {
    flex-direction: column;
    gap: 20px;
  }

  .sidebar {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }

  .sidebar-block {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .sidebar__shoplist {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .sidebar__shoplist a {
    max-width: 320px;
    width: 80%;
    height: 60px;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
  }

  .footer__map {
    width: 100%;
  }

  /* Hero */
  .hero-banner__overlay {
    padding: 20px 30px;
    width: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .hero-banner__overlay h1 {
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 0.08em;
  }

  /* Madeleine */
  .madeleine-hero {
    flex-direction: column;
    padding: 30px 20px;
  }


  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .process-steps { grid-template-columns: 1fr; }
  .products { grid-template-columns: 1fr; }

  .history-table td {
    display: block;
    padding: 4px 10px;
    font-size: 12px;
  }

  .history-table td:first-child {
    padding-top: 10px;
  }
}

/* --- 職員専用リンク (sidebar) --- */
.sidebar-staff {
  margin-top: 16px;
  text-align: center;
}
.sidebar-staff__link {
  display: block;
  padding: 10px;
  font-size: 12px;
  color: #aaa;
  text-decoration: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: color 0.2s, border-color 0.2s;
}
.sidebar-staff__link:hover {
  color: #5fa537;
  border-color: #5fa537;
}
