/* common.css */
/* 共通のレスポンシブデザインCSS */

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

/* Global Styles */
html {
  overflow-y: scroll;
}
body {
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
  font-size: 18px;
}

/* Links */
a {
  text-decoration: none;
  color: inherit;
}

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

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Header */
header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 20px;
  text-align: center;
}

/* Navigation */
nav {
  background: linear-gradient(135deg, #8B0000, #FF4500);
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  position: relative;
}

nav ul li a {
  display: block;
  padding: 6px 30px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #FFD700;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 80%;
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  color: #FFD700;
}

nav ul li a.active {
  background: rgba(255, 215, 0, 0.2);
  font-weight: 600;
  color: #FFD700;
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  cursor: pointer;
  padding: 15px;
  background: transparent;
  border: none;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Content Wrapper */
.content-wrapper {
  padding: 20px;
}

/* Main */
main {
  background: #fff;
  padding: 20px;
}

/* Hero Section (index.html) */
.hero {
  text-align: center;
  margin-bottom: 40px;
}
.hero h2 {
  margin-bottom: 20px;
  font-size: 2em;
  color: #444;
}
.hero-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

/* Info Table (index.html) */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.info-table td {
  padding: 10px;
  vertical-align: top;
  border-bottom: 1px solid #ddd;
  font-size: 0.95em;
}
.info-table td:first-child {
  font-weight: bold;
  width: 150px;
}

/* Menu Grid Styles (menuindex1002.html) */
:root {
  --grid-cell-max-width: 350px;
}
.menu-grid {
  display: grid;
  gap: 20px;
  justify-content: center;
}
.menu-grid.two-items {
  grid-template-columns: repeat(2, minmax(280px, var(--grid-cell-max-width)));
}
.menu-grid.three-items {
  grid-template-columns: repeat(3, minmax(280px, var(--grid-cell-max-width)));
}
.menu-grid.four-items {
  grid-template-columns: repeat(2, minmax(280px, var(--grid-cell-max-width)));
}
  .info-table {
      width: 100%;
      table-layout: fixed;
  }
  .info-table td {
      font-size: 16px;
  }
  .info-table td:first-child {
      width: 100px;
  }
  .hero-images img {
    height: 120px;
  }
.menu-item {
  border: 1px solid #ddd;
  padding: 15px;
  background: #fafafa;
  text-align: center;
}
.img-container {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin-bottom: 10px;
}
.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-container img.portrait {
  object-fit: contain;
}
.menu-item h4 {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #333;
}
.menu-item p {
  font-size: 0.95em;
  color: #666;
}

section.menu-section h3 {
  font-size: 1.5em;
  color: #c00;
  border-bottom: 2px solid #c00;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* Footer */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
}
footer img {
  vertical-align: middle;
}
footer a {
  color: #fff;
  text-decoration: underline;
}

/* Lightbox Styles (menuindex1002.html) */
#lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
#lightbox-overlay img {
  width: 660px;
  height: 440px;
}
#lightbox-overlay img.landscape {
  object-fit: cover;
}
#lightbox-overlay img.portrait {
  object-fit: contain;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
#lightbox-overlay.fade-in {
  animation: fadeIn 0.2s ease-in;
}

@media screen and (max-width: 768px) {
  .hamburger {
    display: block;
  }

  nav ul {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #8B0000, #FF4500);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 1000;
  }

  nav ul.active {
    display: flex;
  }

  /* スクロール禁止用のスタイル */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }

  nav ul li {
    width: 100%;
    text-align: center;
    margin: 10px 0;
  }

  nav ul li a {
    padding: 15px;
    font-size: 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  nav ul li a:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateX(5px);
    color: #FFD700;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

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

  /* ハンバーガーメニュー開閉時のボタンのスタイル */
  .hamburger.active {
    /* position: fixed と right の指定を削除 */
  }

  .hamburger.active span {
    background: #fff;
    box-shadow: none;
  }

  /* Adjust grid layout for mobile */
  .menu-grid.two-items,
  .menu-grid.three-items,
  .menu-grid.four-items {
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
  }
  /* Responsive adjustment for lightbox image */
  #lightbox-overlay img {
    width: 90%;
    height: auto;
  }
  /* Table font size adjustment for mobile: reduce to 12px */
  .info-table td {
    font-size: 12px;
  }
}

/* 共通の見出しスタイル */
.header-wrapper h2,
main h2 {
  font-size: 1.8em;
  margin: 0 0 20px 0;
  font-family: 'Zen Antique Soft', serif;
  font-weight: 500;
  color: #333;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 10px;
  text-align: center;
}

/* 左揃えの見出しの下線 */
.header-wrapper h2 {
  text-align: left;
}

.header-wrapper h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: #e63e2c;
}

/* 中央揃えの見出しの下線 */
main h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: #e63e2c;
}

/* ニュースページの見出しスタイル */
.news-item h3 {
  font-size: 1.1em;
  color: #333;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  text-wrap: balance;
  -webkit-text-wrap: balance;
}

.news-item h3::before {
  content: '📰';
  margin-right: 10px;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .header-wrapper h2,
  main h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
  }
  
  .news-item h3 {
    font-size: 1em;
  }
}
