/* ===========================================
   RESET & BASE STYLES
   =========================================== */

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

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'Shippori Mincho', serif;
  line-height: 1.6;
  color: #333;
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: 'Shippori Mincho', serif;
}

ul, ol {
  list-style: none;
}

section {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ===========================================
   CSS VARIABLES
   =========================================== */

:root {
  --primary-color: #B33D31;
  --secondary-color: #251D03;
  --accent-color: #B90B1D;
  --text-color: #333333;
  --light-bg: #FBF1F1;
  --white: #FFFFFF;
  --border-color: #F3F3F3;
  --shadow: 0px 4px 16px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   COMMON LAYOUT COMPONENTS
   =========================================== */

.container {
  max-width: min(1000px, 100vw);
  margin: 0 auto;
  padding: 0 min(20px, 5vw);
  width: 100%;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
}

.section-line {
  width: 1px;
  height: 287px;
  background-color: var(--primary-color);
  flex-shrink: 0;
}

.section-title h2 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 40.8px;
  color: var(--secondary-color);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin-bottom: 8px;
}

.section-subtitle {
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 16px;
  letter-spacing: 2.24px;
  color: var(--primary-color);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ===========================================
   HEADER
   =========================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 16px 0;
}

.header-container {
  max-width: min(1440px, 100vw);
  margin: 0 auto;
  padding: 0 min(60px, 5vw) 0 min(40px, 5vw);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  width: 140px;
  height: 46px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav a {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 32px;
  color: #000000;
  transition: color 0.3s ease;
}

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

.contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px 40px;
  border-radius: 70px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 24px;
  transition: background-color 0.3s ease;
}

.contact-btn:hover {
  background: var(--accent-color);
}

.contact-btn img {
  width: 22px;
  height: 22px;
}

/* ===========================================
   HERO SECTION
   =========================================== */

.hero {
  position: relative;
  height: 710px;
  margin-top: 75px;
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 70px;
  pointer-events: none;
}

.carousel-btn {
  width: 10px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  pointer-events: all;
  transition: opacity 0.3s ease;
}

.carousel-btn:hover {
  opacity: 0.7;
}

.carousel-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-text {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hero-text-bg {
  display: block;
  background: rgba(255, 255, 255, 0.35);
  padding: 13px 8px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 30px;
  letter-spacing: -1.4px;
  color: #585858;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ===========================================
   INTRO SECTION
   =========================================== */

.intro {
  position: relative;
  padding: 20px 0 0px;
  background: var(--white);
}

.intro-indicator {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.indicator-dots {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(179, 61, 49, 0.3);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
}

.dot.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(179, 61, 49, 0.5);
}

.dot:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  transform: scale(1.1);
}

.dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: transparent;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dot.active::after {
  opacity: 1;
}

.intro .section-header {
  justify-content: center;
  margin-bottom: 20px;
}

.intro .section-line {
  height: 30px;
}

.intro-content {
  position: relative;
  max-width: min(1440px, 100vw);
  margin: 0 auto;
  padding: 0 min(210px, 10vw);
  width: 100%;
  overflow: hidden;
}

.intro-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.intro-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 70px;
  padding: 120px 0;
}

.intro-image {
  flex-shrink: 0;
}

.intro-image img {
  width: 100%;
  max-width: min(550px, 80vw);
  height: auto;
}

.intro-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 27px;
  max-width: 400px;
}

.intro-text h2 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 42px;
  line-height: 64px;
  color: #000000;
  margin-bottom: 27px;
}

.intro-text p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 37px;
  color: #000000;
  margin-bottom: 27px;
}

.intro-logo {
  width: 299px;
  height: 68px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-logo span {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 42px;
  line-height: 64px;
  color: #000000;
}

/* ===========================================
   GALLERY SECTION (無限スクロール)
   =========================================== */

.gallery {
  padding: 40px 0;
  overflow: hidden;
  background: var(--white);
}

.infinite-gallery {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
}

.infinite-gallery:last-child {
  margin-bottom: 0;
}

.carousel {
  display: flex;
  width: 200%;
  animation: scroll 20s linear infinite;
}

.carousel:hover {
  animation-play-state: paused;
}

.carousel-reverse {
  animation: scroll-reverse 25s linear infinite;
}

.carousel-reverse:hover {
  animation-play-state: paused;
}

.group {
  display: flex;
  flex-shrink: 0;
  width: 50%;
  gap: 12px;
}

.gallery-item {
  flex-shrink: 0;
  width: min(300px, 25vw);
  height: min(205px, 17vw);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes scroll-reverse {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

/* ===========================================
   PLANS SECTION
   =========================================== */

.plans {
  position: relative;
  background: var(--light-bg);
  padding-bottom: 80px;
}

.plans-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-image: url('images1/Q9Nbu99TzT.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.plans .container {
  position: relative;
  z-index: 1;
}

.plans .section-header {
  position: absolute;
  top: 40px;
  left: 20px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1.5px;
  margin-bottom: 0;
}

.plans-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  margin-top: 120px;
}

.plan-image {
    display: flex;
    flex-direction: column;
    gap: 44px;
    width: 100%;
    max-width: min(810px, 90vw);
    margin-left: 200px;
}

.plan-image > img:first-child {
  width: 810px;
  object-fit: cover;
  border-radius: 0;
}

.plan-decoration {
  position: absolute;
  top: -35px;
  right: -65px;
  width: 575px;
  height: 380px;
  object-fit: cover;
  border-radius: 0;
  z-index: -1;
  opacity: 0.8;
}

.event-decoration {
  position: absolute;
  top: -35px;
  right: -40px;
  width: 600px;
  height: 390px;
  object-fit: cover;
  border-radius: 0;
  z-index: -1;
  opacity: 0.8;
}
.message-decoration {
    position: absolute;
    top: 215px;
    right: 500px;
    width: 500px;
    height: 350px;
    object-fit: cover;
    border-radius: 0;
    z-index: -1;
    opacity: 0.8;
}
.plans-list {
  display: flex;
  flex-direction: column;
  gap: 44px;
  width: 100%;
  max-width: min(810px, 90vw);
  margin-left: 200px;
}

.plan-item {
  background: transparent;
  padding: 24px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  position: relative;
}

.plan-item h3 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 43.2px;
  color: var(--text-color);
  margin-bottom: 12px;
}

.plan-item > p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 25.6px;
  color: var(--secondary-color);
  margin-bottom: 12px;
}

.plan-price {
  margin-bottom: 24px;
}

.price-main {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 38.4px;
  color: var(--secondary-color);
}

.price-note {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 25.6px;
  color: var(--secondary-color);
}

.plan-includes {
  margin-bottom: 24px;
}

.plan-includes h4 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 25.6px;
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.plan-includes p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 25.6px;
  color: var(--secondary-color);
}

.plan-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-color);
  color: var(--white);
  padding: 12px 38px;
  border-radius: 80px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 28.8px;
  transition: background-color 0.3s ease;
}

.plan-btn:hover {
  background: var(--accent-color);
}

.plan-btn img {
  width: 24px;
  height: 24px;
}

/* ===========================================
   EVENTS SECTION
   =========================================== */

.events {
  position: relative;
  background: var(--light-bg);
  padding-bottom: 80px;
}

.events .section-header {
  position: absolute;
  top: 40px;
  left: 20px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1px;
  margin-bottom: 0;
}

.events-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 44px;
  margin-top: 120px;
  margin-left: 200px;
}

.event-carousel {
  position: relative;
  width: 810px;
  height: 420px;
  flex-shrink: 0;
}

.event-images {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  overflow: hidden;
}

.event-images img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
  border-radius: 5px;
}

.event-bg {
  z-index: 1;
  opacity: 0.7;
  transform: scale(0.95);
}

.event-main {
  z-index: 2;
  opacity: 1;
  transform: scale(1);
}

.event-controls {
  position: absolute;
  bottom: -35px;
  left: -12px;
  right: -12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.event-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-info {
  width: 810px;
  padding-top: 0;
}

.event-info h3 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 24px;
  color: var(--secondary-color);
  margin-bottom: 12px;
}

.event-info > p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 25.6px;
  color: var(--secondary-color);
  margin-bottom: 24px;
}

.event-schedule {
  margin-bottom: 24px;
}

.event-schedule h4 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 38.4px;
  color: var(--text-color);
  margin-bottom: 8px;
}

.schedule-grid {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.schedule-column {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.schedule-line {
  width: 3.5px;
  height: 110px;
  background: var(--primary-color);
  flex-shrink: 0;
}

.schedule-dates {
  flex: 1;
}

.schedule-dates p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 22.4px;
  color: var(--text-color);
  margin-bottom: 2px;
}

.event-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px 17px;
  border-radius: 60px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 25.2px;
  transition: background-color 0.3s ease;
}

.event-detail-btn:hover {
  background: var(--accent-color);
}

.event-detail-btn img {
  width: 24px;
  height: 24px;
}

.events .event-indicator {
  position: absolute;
  bottom: -90px;
  left: 50%;
  transform: translateX(-50%);
}

.event-indicator img {
  width: 70px;
  height: 10px;
}

/* ===========================================
   SHRINES SECTION
   =========================================== */

.shrines {
  position: relative;
  padding-bottom: 80px;
}

.shrines-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.shrines-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(90deg);
}

.shrines .container {
  position: relative;
  z-index: 1;
}

.shrines .section-header {
  position: absolute;
  top: 40px;
  left: 20px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1px;
  margin-bottom: 0;
}

.shrines-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 120px;
  margin-bottom: 60px;
  margin-left: 200px;
}

.shrines-grid .shrine-card:last-child {
  grid-column: 1 / 2;
}

.shrine-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.shrine-image {
  position: relative;
  height: 191.81px;
  border-radius: 5px;
  overflow: hidden;
}

.shrine-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shrine-content h3 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 32px;
  color: var(--text-color);
  margin-bottom: 16px;
}

.shrine-content p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 28.8px;
  color: var(--text-color);
}

/* ===========================================
   FLOW SECTION
   =========================================== */

.flow {
  position: relative;
  padding: 90px 0;
  overflow: hidden;
}

.flow-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 125%;
  z-index: 0;
}

.flow-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flow .container {
  position: relative;
  z-index: 1;
  top: -4vw;
}

.flow .section-header {
  position: absolute;
  top: 0;
  left: 20px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1.5px;
  margin-bottom: 0;
  justify-content: flex-start;
}

.flow .section-line {
  height: 84px;
}

.flow .section-title h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: 40px;
  line-height: 82px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.flow .section-subtitle {
  font-family: 'Shippori Mincho', serif;
  font-size: 16px;
  line-height: 51px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.flow-buttons {
  position: relative;
  z-index: 2;
  margin-top: 120px;
  margin-left: 200px;
  display: flex;
  gap: 24px;
  justify-content: flex-start;
}

.flow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--white);
  color: var(--accent-color);
  border-radius: 60px;
  padding: 8px 17px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 43.2px;
  width: 393px;
  height: 80px;
  transition: all 0.3s ease;
}

.flow-btn:hover,
.flow-btn.active {
  background: var(--accent-color);
  color: var(--white);
}

.flow-btn img {
  width: 24px;
  height: 24px;
}

/* ===========================================
   MESSAGE SECTION
   =========================================== */

.message {
  position: relative;
  background: var(--light-bg);
  padding: 90px 0;
}

.message-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.message-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(90deg);
}

.message .container {
  position: relative;
  z-index: 1;
}

.message-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.message-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 488px;
}

.message-subtitle {
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 16px;
  letter-spacing: 2.24px;
  color: var(--primary-color);
}

.message-header h2 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 40.8px;
  color: var(--secondary-color);
}

.message-line {
  width: 100%;
  max-width: min(487px, 80vw);
  height: 4px;
  background: var(--primary-color);
}

.message-main {
  display: flex;
  align-items: center;
  gap: 44px;
}

.message-image {
  flex-shrink: 0;
}

.message-image img {
  width: 100%;
  max-width: min(500px, 80vw);
  height: auto;
  border-radius: 5px;
}

.message-text {
  flex: 1;
}

.message-text p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 28.8px;
  color: var(--text-color);
}

/* ===========================================
   REPRESENTATIVE SECTION
   =========================================== */

.representative {
  position: relative;
  padding: 90px 0;
}

.representative-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: url(images1/Q9Nbu99TzT.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.representative-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(90deg);
}

.representative .container {
  position: relative;
  z-index: 1;
}

.representative-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.representative-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 178px;
}

.representative-subtitle {
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 16px;
  letter-spacing: 2.24px;
  color: var(--primary-color);
}

.representative-header h2 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 500;
  font-size: 35px;
  line-height: 40.8px;
  color: var(--secondary-color);
}

.representative-line {
  width: 100%;
  max-width: min(178px, 60vw);
  height: 4px;
  background: var(--primary-color);
}

.representative-main {
  display: flex;
  align-items: center;
  gap: 44px;
}

.representative-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.representative-text p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 28.8px;
  color: var(--text-color);
}

.representative-name {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 25.6px;
  color: var(--secondary-color);
}

.representative-image {
  flex-shrink: 0;
}

.representative-image img {
  width: 100%;
  max-width: min(500px, 80vw);
  height: auto;
  border-radius: 5px;
}

/* 展開機能のスタイル */
.text-expandable {
  position: relative;
}

.text-content {
  max-height: 400px;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.text-content.expanded {
  max-height: none;
}

.text-fade {

}

.text-content.expanded + .text-fade {
  opacity: 0;
}

.expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px auto 0;
  box-shadow: var(--shadow);
}

.expand-btn:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

.expand-btn .arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.expand-btn.expanded .arrow {
  transform: rotate(180deg);
}

/* ===========================================
   CTA SECTION
   =========================================== */

.cta {
  position: relative;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.58);
}

.cta-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  filter: brightness(0.5);
}

.cta-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  max-width: min(1440px, 95vw);
  margin: 0 auto;
  width: 100%;
  padding: 0 min(20px, 5vw);
}

.cta-content h2 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 40px;
  line-height: 48px;
  color: var(--white);
  text-align: center;
  text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.cta-decoration {
  display: flex;
  align-items: center;
  gap: 20.91px;
}

.cta-decoration img {
  width: 12.54px;
  height: 10.32px;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 26px;
  border-radius: 80.3px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 21px;
  line-height: 21px;
  width: 320px;
  height: 49px;
  transition: all 0.3s ease;
}

.cta-btn.primary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
}

.cta-btn.primary:hover {
  background: var(--white);
  color: var(--primary-color);
}

.cta-btn.secondary {
  background: var(--white);
  color: var(--accent-color);
  border-radius: 90px;
}

.cta-btn.secondary:hover {
  background: var(--light-bg);
}

/* ===========================================
   FOOTER
   =========================================== */

.footer {
  background: var(--light-bg);
  padding: 80px 0 0;
}

.footer-content {
  max-width: min(1440px, 95vw);
  margin: 0 auto;
  padding: 0 min(183px, 10vw);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

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

.footer-logo img {
  width: 250px;
  object-fit: contain;
}

.trademark {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 16px;
  color: #000000;
  text-align: center;
}

.trademark-text {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 19.2px;
  color: #000000;
  text-align: center;
}

.footer-nav {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.footer-nav a {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 28.8px;
  color: var(--text-color);
  transition: color 0.3s ease;
}

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

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.company-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.company-info span {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 25.2px;
  color: var(--text-color);
}

.partner-info {
  text-align: center;
}

.partner-info p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 25.2px;
  color: var(--text-color);
}

.social-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.social-links a {
  display: block;
  width: 32px;
  height: 32px;
  transition: opacity 0.3s ease;
}

.social-links a:hover {
  opacity: 0.7;
}

.social-links img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-copyright {
  background: var(--primary-color);
  padding: 16px 0;
  margin-top: 54px;
}

.footer-copyright p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 21.6px;
  color: var(--white);
  text-align: center;
}

/* ===========================================
   FLOATING BUTTONS
   =========================================== */

.floating-buttons {
  position: fixed;
  top: 80%;
  right: min(30px, 5vw);
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.floating-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 22px;
  border-radius: 80px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 36px;
  width: 200px;
  height: 50px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.line-btn {
  background: var(--white);
  color: var(--text-color);
  border: 1px solid var(--text-color);
}

.line-btn:hover {
  background: var(--light-bg);
}

.line-btn img {
  width: 20px;
  height: 20px;
}

.consultation-btn {
  background: var(--primary-color);
  color: var(--white);
}

.consultation-btn:hover {
  background: var(--accent-color);
}

.consultation-btn img {
  width: 24px;
  height: 24px;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

/* Tablet (1024px以下) */
@media (max-width: 1024px) {
  .header-container {
    padding: 0 min(20px, 5vw);
  }
  
  .intro-content {
    padding: 0 min(20px, 5vw);
  }
  
  .intro-main {
    flex-direction: column;
    gap: 40px;
    padding: 60px 0;
  }
  
  .intro-text {
    max-width: 100%;
  }
  
  .gallery-item {
    width: min(250px, 30vw);
    height: min(170px, 20vw);
  }
  
  /* Plans Section */
  .plans .section-header {
    position: static;
    margin-bottom: 40px;
  }
  
  .plans-content {
    margin-top: 0;
    flex-direction: column;
    gap: 40px;
  }
  
  .plan-image > img:first-child {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin-left: 0;
  }
  
  .plans-list {
    width: 100%;
    margin-left: 0;
  }
  
  /* Events Section */
  .events .section-header {
    position: static;
    margin-bottom: 40px;
  }
  
  .events-content {
    margin-top: 0;
    margin-left: 0;
    flex-direction: column;
    gap: 40px;
  }
  
  .event-carousel {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .event-info {
    width: 100%;
  }
  
  .event-main {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    height: 300px;
  }
  
  /* Shrines Section */
  .shrines .section-header {
    position: static;
    margin-bottom: 40px;
  }
  
  .shrines-grid {
    margin-top: 0;
    margin-left: 0;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .shrines-grid .shrine-card:last-child {
    grid-column: 1;
  }
  
  /* Flow Section */
  .flow .section-header {
    justify-content: center;
    margin-bottom: 40px;
  }
  
  .flow-buttons {
    margin-left: 0;
  }
  
  .message-main {
    flex-direction: column;
    gap: 30px;
  }
  
  .representative-main {
    flex-direction: column-reverse;
    gap: 30px;
  }
  
  .footer-content {
    padding: 0 min(20px, 5vw);
  }
  
  .text-content {
    max-height: 300px;
  }
}

/* Mobile (768px以下) */
@media (max-width: 768px) {
  .header-container {
    padding: 0 min(15px, 4vw);
  }
  
  .nav {
    display: none;
  }
  
  .contact-btn {
    font-size: 10px;
    padding: 6px 20px;
    margin-right: 70px;
  }
  
  .hero {
    height: 400px;
  }
  
  .carousel-controls {
    padding: 0 20px;
  }
  
  .hero-text {
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 300px;
    gap:9vw !important;
  }
  
  .hero-text-bg {
    font-size: min(20px, 5vw);
    line-height: 24px;
    padding: min(10px, 2vw) min(6px, 1.5vw);
  }
  
  .dot {
    width: 12px;
    height: 12px;
  }
  
  .indicator-dots {
    gap: 10px;
  }
  
  .intro-content {
    padding: 0 min(15px, 4vw);
  }
  
  .intro-text h2 {
font-size: 25px;
        line-height: 40px;
        text-align: center;
        margin: 0 auto;
  }
  
  .intro-text p {
    font-size: 14px;
    line-height: 24px;
  }
  
  .intro-logo {
    width: 200px;
    height: 50px;
  }
  
  .intro-logo span {
    font-size: 24px;
    line-height: 36px;
  }
  
  .gallery-item {
    width: min(200px, 40vw);
    height: min(140px, 25vw);
  }
  
  .carousel {
    animation-duration: 15s;
  }
  
  .carousel-reverse {
    animation-duration: 18s;
  }
  
  .group {
    gap: 8px;
  }
  
  .plans {
    padding: 60px 0;
  }
  
  .plan-item {
    padding: 20px;
  }
  
  .plan-item h3 {
    font-size: 20px;
    line-height: 30px;
  }
  
  .events {
    padding: 60px 0;
  }
  
  .event-carousel {
    height: 300px;
  }
  
  .schedule-grid {
    flex-direction: column;
    gap: 20px;
  }
  
  .shrines {
    padding: 60px 0;
  }
  
  .shrine-card {
    padding: 20px;
  }
  
  .flow {
    padding: 60px 0;
  }
  
  .flow-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .flow-btn {
    width: 100%;
    max-width: 350px;
    font-size: 18px;
    height: 60px;
  }
  
  .message {
    padding: 60px 0;
  }
  
  .message-header h2 {
    font-size: 24px;
    line-height: 30px;
  }
  
  .representative {
    padding: 60px 0;
  }
  
  .representative-header h2 {
    font-size: 24px;
    line-height: 30px;
  }
  
  .text-content {
    max-height: 250px;
  }
  
  .cta-content h2 {
    font-size: 24px;
    line-height: 36px;
  }
  
  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cta-btn {
    width: 100%;
    max-width: 300px;
    font-size: 18px;
  }
  
  .footer-content {
    padding: 0 min(15px, 4vw);
  }
  
  .footer-nav {
    gap: 16px;
  }
  
  .footer-nav a {
    font-size: 14px;
  }
  
  .company-info {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
  
  .company-info span {
    font-size: 12px;
  }
  
  .floating-buttons {
    bottom: min(20px, 5vh);
    top: auto;
    right: min(15px, 4vw);
  }
  
  .floating-btn {
    width: min(160px, 40vw);
    height: 45px;
    font-size: min(14px, 3.5vw);
    padding: 12px 16px;
  }
}

/* Small Mobile (480px以下) */
@media (max-width: 480px) {
  .container {
    padding: 0 min(10px, 3vw);
  }
  
  .header-container {
    padding: 0 min(10px, 3vw);
  }
  
  .gallery-item {
    width: min(150px, 45vw);
    height: min(100px, 30vw);
  }
  
  .group {
    gap: 6px;
  }
  
  .cta-btn {
    width: 100%;
    max-width: min(280px, 85vw);
    font-size: min(16px, 4vw);
  }
  
  .floating-btn {
    width: min(140px, 45vw);
    font-size: min(12px, 3vw);
  }
}


/* ===========================================
   EVENTS SECTION - スライドショー対応
   =========================================== */

.events {
  position: relative;
  background: var(--light-bg);
  padding-bottom: 80px;
}

.events .section-header {
  position: absolute;
  top: 40px;
  left: 20px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1px;
  margin-bottom: 0;
}

.events-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 44px;
  margin-top: 120px;
  margin-left: 200px;
}

.event-carousel {
  position: relative;
  width: 810px;
  height: 420px;
  flex-shrink: 0;
}

.event-images {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  overflow: hidden;
}

.event-slide-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.event-slide-image.active {
  opacity: 1;
}

.event-controls {
  position: absolute;
  bottom: -35px;
  left: -12px;
  right: -12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.event-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* イベント情報スライド */
.event-slide {
  width: 810px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.event-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.event-slide h3 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 24px;
  color: var(--secondary-color);
  margin-bottom: 12px;
}

.event-slide > p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 25.6px;
  color: var(--secondary-color);
  margin-bottom: 24px;
}

.event-schedule {
  margin-bottom: 24px;
}

.event-schedule h4 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 38.4px;
  color: var(--text-color);
  margin-bottom: 8px;
}

.schedule-grid {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.schedule-column {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.schedule-line {
  width: 3.5px;
  height: 110px;
  background: var(--primary-color);
  flex-shrink: 0;
}

.schedule-dates {
  flex: 1;
}

.schedule-dates p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 22.4px;
  color: var(--text-color);
  margin-bottom: 2px;
}

.event-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px 17px;
  border-radius: 60px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 25.2px;
  transition: background-color 0.3s ease;
}

.event-detail-btn:hover {
  background: var(--accent-color);
}

.event-detail-btn img {
  width: 24px;
  height: 24px;
}

.events .event-indicator {
  position: absolute;
  bottom: -90px;
  left: 50%;
  transform: translateX(-50%);
}

.event-indicator img {
  width: 70px;
  height: 10px;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .events .section-header {
    position: static;
    margin-bottom: 40px;
  }
  
  .events-content {
    margin-top: 0;
    margin-left: 0;
    flex-direction: column;
    gap: 40px;
  }
  
  .event-carousel {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .event-slide {
    width: 100%;
    position: relative;
  }
  
  .event-slide.active {
    position: relative;
  }
}

@media (max-width: 768px) {
  .events {
    padding: 60px 0;
  }
  
  .event-carousel {
    height: 300px;
  }
  
  .schedule-grid {
    flex-direction: column;
    gap: 20px;
  }
}


/* ===========================================
   EVENTS SECTION - 完全統一版
   =========================================== */

.events {
  position: relative;
  background: var(--light-bg);
  padding-bottom: 130px;
}

.events-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-image:none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.events .container {
  position: relative;
  z-index: 1;
}

.events .section-header {
  position: absolute;
  top: 40px;
  left: 200px; /* 他のセクションと完全に統一 */
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1.5px;
  margin-bottom: 0;
}

.events-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  margin-top: 120px;
  margin-left: 200px; /* 他のセクションと統一 */
}

.event-carousel {
  position: relative;
  width: 810px;
  height: 420px;
  flex-shrink: 0;
}

.event-images {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  overflow: hidden;
}

.event-slide-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.event-slide-image.active {
  opacity: 1;
}

.event-controls {
  position: absolute;
    bottom: 195px;
    left: -15px;
    right: -15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.event-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* イベント情報スライド */
.event-slide {
  width: 810px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.event-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.event-slide h3 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 24px;
  color: var(--secondary-color);
  margin-bottom: 12px;
}

.event-slide > p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 25.6px;
  color: var(--secondary-color);
  margin-bottom: 24px;
}

.event-schedule {
  margin-bottom: 24px;
}

.event-schedule h4 {
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 38.4px;
  color: var(--text-color);
  margin-bottom: 8px;
}

.schedule-grid {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.schedule-column {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.schedule-line {
  width: 3.5px;
  height: 110px;
  background: var(--primary-color);
  flex-shrink: 0;
}

.schedule-dates {
  flex: 1;
}

.schedule-dates p {
  font-family: 'Shippori Mincho', serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 22.4px;
  color: var(--text-color);
  margin-bottom: 2px;
}

.event-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px 17px;
  border-radius: 60px;
  font-family: 'Shippori Mincho', serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 25.2px;
  transition: background-color 0.3s ease;
}

.event-detail-btn:hover {
  background: var(--accent-color);
}

.event-detail-btn img {
  width: 24px;
  height: 24px;
}

.events .event-indicator {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
}

.event-indicator img {
  width: 70px;
  height: 10px;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .events .section-header {
    position: static;
    margin-bottom: 40px;
    left: auto;
  }
  
  .events-content {
    margin-top: 0;
    margin-left: 0;
    flex-direction: column;
    gap: 40px;
  }
  
  .event-carousel {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .event-slide {
    width: 100%;
    position: relative;
  }
  
  .event-slide.active {
    position: relative;
  }
}

@media (max-width: 768px) {
  .events {
    padding: 60px 0;
  }
  
  .event-carousel {
    height: 300px;
  }
  
  .schedule-grid {
    flex-direction: column;
    gap: 20px;
  }
}
/* ===========================================
   ヘッダー位置修正 - 左から0px統一版   
   =========================================== */

/* すべてのセクションのヘッダー位置を左から200pxに統一 */
.plans .section-header,
.events .section-header,
.shrines .section-header,
.flow .section-header {
  position: absolute;
  top: 0;
  left: 0; /* 左から0pxの位置に統一 */
  right: auto; /* rightの指定をリセット */
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 1px;
  margin-bottom: 0;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  /* タブレット以下ではすべて通常配置に戻す */
  .plans .section-header,
  .events .section-header,
  .shrines .section-header,
  .flow .section-header {
    position: static;
    margin-bottom: 40px;
    left: auto;
    justify-content: center; /* モバイルでは中央配置 */
  }
}
/* ===========================================
   GALLERY SECTION 修正版 (無限スクロール)
   =========================================== */

/* 既存のGALLERY SECTIONを以下に置き換える */
.gallery {
  padding: 40px 0;
  overflow: hidden;
  background: var(--white);
}

.infinite-gallery {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
}

.infinite-gallery:last-child {
  margin-bottom: 0;
}

.carousel {
  display: flex;
  width: max-content;
  animation: scroll 30s linear infinite;
}

.carousel:hover {
  animation-play-state: paused;
}

.carousel-reverse {
  animation: scroll-reverse 35s linear infinite;
}

.carousel-reverse:hover {
  animation-play-state: paused;
}

.group {
  display: flex;
  flex-shrink: 0;
  gap: 12px;
}

.gallery-item {
  flex-shrink: 0;
  width: 300px;
  height: 205px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 1行目のアニメーション（5枚の画像用） */
.infinite-gallery:first-child .carousel {
  animation: scroll-5items 30s linear infinite;
}

.infinite-gallery:first-child .carousel-reverse {
  animation: scroll-reverse-5items 30s linear infinite;
}

/* 2行目のアニメーション（6枚の画像用） */
.infinite-gallery:last-child .carousel {
  animation: scroll-6items 35s linear infinite;
}

.infinite-gallery:last-child .carousel-reverse {
  animation: scroll-reverse-6items 35s linear infinite;
}

@keyframes scroll-5items {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-312px * 5)); /* (300px + 12px gap) × 5枚 */
  }
}

@keyframes scroll-reverse-5items {
  0% {
    transform: translateX(calc(-312px * 5));
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes scroll-6items {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-312px * 6)); /* (300px + 12px gap) × 6枚 */
  }
}

@keyframes scroll-reverse-6items {
  0% {
    transform: translateX(calc(-312px * 6));
  }
  100% {
    transform: translateX(0);
  }
}

/* レスポンシブ対応 - モバイル用アニメーション修正 */
@media (max-width: 768px) {
  .gallery-item {
    width: 200px;
    height: 140px;
  }
  
  .group {
    gap:1vw;
  }
  
  /* モバイル用アニメーション調整 */
  @keyframes scroll-5items {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(calc(-208px * 5)); /* (200px + 8px gap) × 5枚 */
    }
  }

  @keyframes scroll-reverse-5items {
    0% {
      transform: translateX(calc(-208px * 5));
    }
    100% {
      transform: translateX(0);
    }
  }

  @keyframes scroll-6items {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(calc(-208px * 6)); /* (200px + 8px gap) × 6枚 */
    }
  }

  @keyframes scroll-reverse-6items {
    0% {
      transform: translateX(calc(-208px * 6));
    }
    100% {
      transform: translateX(0);
    }
  }
}


.responsive-image {
    position: absolute;
    top: 20px;
    right: 20px;
    width: min(120px, 15vw);
    height: auto;
}
/* ===========================================
   HAMBURGER MENU - 最終修正版CSS
   =========================================== */

/* ハンバーガーボタン */
.hamburger-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px;
  border-radius: 5px;
  cursor: pointer;
  width: 45px;
  height: 45px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hamburger-btn:hover {
  background: var(--accent-color);
  transform: scale(1.05);
}

/* ハンバーガーボタンの線 */
.hamburger-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* アクティブ時のアニメーション */
.hamburger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

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

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

/* メニューオーバーレイ - 修正版 */
.menu-overlay {
  position: fixed;
  top: 0;
  right: -100vw; /* 初期位置を画面外に設定 */
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  z-index: 1000;
  transition: right 0.5s ease;
  overflow-y: auto;
}

/* デスクトップ版 */
@media (min-width: 768px) {
  .menu-overlay {
    width: 480px;
    right: -480px; /* 初期位置を画面外に設定 */
  }
}

/* アクティブ状態 */
.menu-overlay.active {
  right: 0 !important; /* 強制的に右端に表示 */
}

/* メニューコンテンツ */
.menu-content {
  padding: 80px 40px 50px;
  color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-nav {
  margin: 25px;
}

.menu-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-nav li {
  margin-bottom: 25px;
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.6s ease;
}

.menu-overlay.active .menu-nav li {
  opacity: 1;
  transform: translateX(0);
}

/* アニメーション遅延 */
.menu-nav li:nth-child(1) { transition-delay: 0.1s; }
.menu-nav li:nth-child(2) { transition-delay: 0.2s; }
.menu-nav li:nth-child(3) { transition-delay: 0.3s; }
.menu-nav li:nth-child(4) { transition-delay: 0.4s; }
.menu-nav li:nth-child(5) { transition-delay: 0.5s; }

.menu-nav a {
color: #000;
    text-decoration: none;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 1px;
    display: block;
    padding: 8px 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.menu-nav a:hover {
  opacity: 0.7;
  border-bottom-color: rgba(255, 255, 255, 0.3);
  padding-left: 10px;
}

/* 特別ボタン */
.special-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #000;
  text-decoration: none;
  width: 100%;
  max-width: 280px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.6s ease;
  transition-delay: 0.6s;
  font-size: 16px;
  font-weight: 500;
}

.menu-overlay.active .special-button {
  opacity: 1;
  transform: translateX(0);
}

.special-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.arrow-icon {
  width: 30px;
  height: 20px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2c3e50;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

/* 会社情報 */
.company-info {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.6s ease;
  transition-delay: 0.7s;
  margin-top: auto;
}

.menu-overlay.active .company-info {
  opacity: 1;
  transform: translateX(0);
}

.company-info span {
  display: block;
  margin-bottom: 5px;
}

/* ===========================================
   RESPONSIVE HAMBURGER MENU
   =========================================== */

/* タブレット以下でハンバーガーボタンを表示 */
@media (max-width: 768px) {
  .hamburger-btn {
    display: flex !important;
  }
  
  /* 既存のナビゲーションは非表示 */
  .header .nav {
    display: none !important;
  }
  
  /* ヘッダーの右側コンテンツも調整 */
  .header-right .contact-btn {
    margin-right: 70px;
  }
  
  /* メニューが開いている時はスクロールを無効化 */
  body.menu-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
  }
  
  /* モバイル版のメニューオーバーレイ */
  .menu-overlay {
    width: 100vw;
    right: -100vw;
  }
}

/* モバイル用調整 */
@media (max-width: 480px) {
  .hamburger-btn {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
  
  .hamburger-btn span {
    width: 20px;
    height: 2px;
  }
  
  .menu-content {
position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        background-image: url(images1/Q9Nbu99TzT.png);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
  }
  
  .menu-nav a {
    font-size: 17px;
  }
  
  .special-button {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .header-right .contact-btn {
    margin-right: 60px;
  }
}

/* 超小型デバイス */
@media (max-width: 320px) {
  .menu-content {
    padding: 50px 20px 30px;
  }
  
  .menu-nav a {
    font-size: 18px;
  }
}


/* ===========================================
   EVENTS SECTION - レスポンシブ対応追記CSS
   =========================================== */

/* タブレット対応 (1024px以下) */
@media (max-width: 1024px) {
  .events .section-header {
    position: static;
    justify-content: center;
    margin-bottom: 40px;
    left: auto;
  }
  
  .events-content {
    margin-top: 0;
    margin-left: 0;
    align-items: center;
  }
  
  .event-carousel {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
  }
  
  .event-slide {
    width: 100%;
    max-width: 700px;
  }
  
  .event-controls {
    bottom: 195px;
  }
  
  .events .event-indicator {
    bottom: -25px;
  }
}

/* タブレット縦・大きめスマホ対応 (768px以下) */
@media (max-width: 768px) {
  .events {
    padding: 60px 0;
  }
  
  .event-carousel {
    height: 250px;
    max-width: 100%;
  }
  
  .event-slide {
    max-width: 100%;
    padding: 0 10px;
  }
  
  .event-slide h3 {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 16px;
  }
  
  .event-slide > p {
    font-size: 14px;
    line-height: 22px;
    margin-bottom: 20px;
  }
  
  .event-schedule h4 {
    font-size: 18px;
    line-height: 28px;
    margin-bottom: 12px;
  }
  
  .schedule-grid {
    flex-direction: column;
    gap: 16px;
    overflow-x: visible;
  }
  
  .schedule-column {
    gap: 8px;
  }
  
  .schedule-line {
    width: 2px;
    height: 60px;
  }
  
  .schedule-dates p {
    font-size: 12px;
    line-height: 18px;
    margin-bottom: 1px;
  }
  
  .event-detail-btn {
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 50px;
  }
  
  .event-detail-btn img {
    width: 16px;
    height: 16px;
  }
  
  .event-controls {
    bottom: -40px;
    left: -8px;
    right: -8px;
  }
  
  .event-btn {
    width: 30px;
    height: 30px;
  }
  
  .events .event-indicator {
    bottom: -80px;
  }
}

/* スマホ対応 (480px以下) */
@media (max-width: 480px) {
  .events {
    padding: 40px 0;
  }
  
  .event-carousel {
    height: 200px;
  }
  
  .event-slide {
    padding: 0 5px;
  }
  
  .event-slide h3 {
    font-size: 18px;
    line-height: 24px;
    margin-bottom: 12px;
  }
  
  .event-slide > p {
    font-size: 13px;
    line-height: 20px;
    margin-bottom: 16px;
  }
  
  .event-schedule {
    margin-bottom: 16px;
  }
  
  .event-schedule h4 {
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 8px;
  }
  
  .schedule-grid {
    gap: 12px;
  }
  
  .schedule-column {
    gap: 6px;
  }
  
  .schedule-line {
    width: 1.5px;
    height: 50px;
  }
  
  .schedule-dates {
    min-width: 0;
  }
  
  .schedule-dates p {
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* 土日の色付きスパンも調整 */
  .schedule-dates p span {
    font-size: 11px;
  }
  
  .event-detail-btn {
    font-size: 11px;
    padding: 5px 12px;
  }
  
  .event-detail-btn img {
    width: 14px;
    height: 14px;
  }
  
  .event-controls {
    bottom: 85px;
    left: -5px;
    right: -5px;
  }
  
  .event-btn {
    width: 28px;
    height: 28px;
  }
  
  .events .event-indicator {
    bottom: -70px;
  }
  
  .indicator-dots {
    gap: 8px;
  }
  
  .dot {
    width: 10px;
    height: 10px;
  }
}

/* 小さいスマホ対応 (360px以下) */
@media (max-width: 360px) {
  .event-slide h3 {
    font-size: 16px;
    line-height: 22px;
  }
  
  .event-slide > p {
    font-size: 12px;
    line-height: 18px;
  }
  
  .event-schedule h4 {
    font-size: 14px;
    line-height: 20px;
  }
  
  .schedule-dates p {
    font-size: 10px;
    line-height: 14px;
  }
  
  .schedule-dates p span {
    font-size: 10px;
  }
  
  .event-detail-btn {
    font-size: 10px;
    padding: 4px 10px;
  }
  
  .event-detail-btn img {
    width: 12px;
    height: 12px;
  }
}

/* 横向きスマホ対応 */
@media (max-width: 844px) and (orientation: landscape) {
  .events {
    padding: 30px 0;
  }
  
  .event-carousel {
    height: 180px;
  }
  
  .event-slide > p {
    margin-bottom: 12px;
  }
  
  .event-schedule {
    margin-bottom: 12px;
  }
  
  .schedule-grid {
    gap: 10px;
  }
  
  .schedule-line {
    height: 40px;
  }
}

/* 非表示要素のクリーンアップ */
@media (max-width: 768px) {
  /* 不要な空のp要素を非表示 */
  .schedule-dates p:empty {
    display: none;
  }
  
  /* HTMLの構造上の問題を修正 */
  .schedule-dates p + p:empty {
    display: none;
  }
}

/* アニメーション改善 */
@media (max-width: 768px) {
  .event-slide-image {
    transition: opacity 0.3s ease;
  }
  
  .event-slide {
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .menu-nav li {
    transition-delay: 0.05s;
  }
  
  .menu-nav li:nth-child(1) { transition-delay: 0.05s; }
  .menu-nav li:nth-child(2) { transition-delay: 0.1s; }
  .menu-nav li:nth-child(3) { transition-delay: 0.15s; }
  .menu-nav li:nth-child(4) { transition-delay: 0.2s; }
  .menu-nav li:nth-child(5) { transition-delay: 0.25s; }
}

/* ===========================================
   EVENTS SECTION - レスポンシブ修正版（スライド重複表示対応）
   =========================================== */

/* イベント情報コンテナの追加 */
.event-info-container {
  position: relative;
  width: 810px;
  height: auto;
  min-height: 300px;
}

/* イベントスライドの修正 - 絶対配置で重複表示 */
.event-slide {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 1;
}

.event-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .event-info-container {
    width: 100%;
    max-width: 700px;
    min-height: 350px;
  }
}

@media (max-width: 768px) {
  .event-info-container {
    max-width: 100%;
    min-height: 400px;
    padding: 0 10px;
  }
  
  .events .event-indicator {
    bottom: -120px;
  }
}

@media (max-width: 480px) {
  .event-info-container {
    padding: 0 5px;
    min-height: 450px;
  }
  
  .events .event-indicator {
    bottom: -25px;
  }
}

@media (max-width: 360px) {
  .event-info-container {
    min-height: 500px;
  }
}

.nav-link {
  font-family: 'Shippori Mincho', serif;
  color: #000000;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #B33D31;
}

/* デスクトップ（基本スタイル） */
.intro-main {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 70px;
  padding: 120px 0;
}

.intro-image {
  flex: 1;
  max-width: 50%;
}

.intro-text {
  flex: 1;
  max-width: 50%;
}

/* タブレット */
@media (max-width: 1024px) {
  .intro-main {
    gap: 50px;
    padding: 80px 0;
  }
  
  .intro-image {
    max-width: 45%;
  }
  
  .intro-text {
    max-width: 55%;
  }
}

/* モバイル */
@media (max-width: 768px) {
  .intro-main {
    flex-direction: column;
    gap: 30px;
    padding: 60px 0;
    text-align: center;
  }
  
  .intro-image {
    max-width: 100%;
    width: 100%;
  }
  
  .intro-text {
    max-width: 100%;
    width: 100%;
  }
}

/* 追記内容 */

/* 必ず大きい画面から小さい画面の順番で書く */
/* デスクトップ（基本スタイル） */
.element { width: 810px; }
/* タブレット */
@media (max-width: 1024px) {
  .element { width: 100%; max-width: 600px; }
}

/* モバイル */
@media (max-width: 768px) {

  .element { width: 100%; max-width: 400px; }
  .plan-image {
    margin-left: 0;
}
}

/* デスクトップ（基本スタイル） */
img {
  max-width: 100%;!important;
  height: auto;!important;
  display: block;!important;
  object-fit: cover;!important;
  object-position: center;!important;
}

/* タブレット */
@media (max-width: 1024px) {
  img {
    max-width: 100%;!important;
    height: auto;!important;
    object-fit: contain;!important;
  }
}

/* モバイル */
@media (max-width: 768px) {
  img {
    max-width: 100%;!important;
    width: 100%;!important;
    height: auto;!important;
    object-fit: contain;!important;
    margin: 0 auto;!important;
    display: block;!important;
  }
}

/* 基本的な安全対策 */
* img {
  box-sizing: border-box;!important;
  max-width: 100% !important;
}
/* ===========================================
   HERO SECTION - デスクトップ画像表示修正
   =========================================== */

/* デスクトップ用：ヒーローセクションの高さ調整 */
@media (min-width: 1200px) {
  .hero {
    height: 85vh; /* ビューポートの85%の高さに設定 */
    min-height: 600px; /* 最小高さを確保 */
    max-height: 900px; /* 最大高さを制限 */
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  .hero {
    height: 80vh;
    min-height: 500px;
    max-height: 750px;
  }
}

/* ヒーロー画像の表示を最適化 */
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* 画像の中央を表示 */
}

/* 超ワイドスクリーン（21:9など）での調整 */
@media (min-width: 1920px) and (min-aspect-ratio: 16/9) {
  .hero {
    height: 75vh;
    max-height: 800px;
  }
  
  .carousel-slide img {
    object-position: center 30%; /* ワイドスクリーンでは上寄りに表示 */
  }
}

/* 縦画面・スクエア画面での調整 */
@media (max-aspect-ratio: 4/3) {
  .hero {
    height: 60vh;
    min-height: 400px;
  }
}

/* ヒーローテキストの位置調整（高さ変更に合わせて） */
@media (min-width: 769px) {
  .hero-text {
    top: 35%; /* デスクトップでは少し上寄りに */
  }
}
@media (min-width: 769px) {
  .carousel-slide img {
    width: 90%; 
    object-fit: cover;
    object-position: center center;
    margin: 0 auto;
    border-radius: 8px; 
    height: 40vw !important;
  }
}

/* ===========================================
   画面サイズに応じたヒーロー高さ調整CSS
   =========================================== */

/* ベース設定 */
.hero {
  position: relative;
  margin-top: 75px;
  overflow: hidden;
  /* 高さは画面サイズに応じて動的に設定 */
}

/* 小型デバイス（スマホ縦） */
@media (max-width: 480px) {
  .hero {
    height: 50vh;
    min-height: 300px;
    max-height: 400px;
  }
}

/* スマホ横・小型タブレット */
@media (min-width: 481px) and (max-width: 768px) {
  .hero {
    height: 60vh;
    min-height: 350px;
    max-height: 500px;
  }
}

/* タブレット縦 */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero {
    height: 70vh;
    min-height: 450px;
    max-height: 650px;
  }
}

/* ノートPC・小型デスクトップ */
@media (min-width: 1025px) and (max-width: 1440px) {
  .hero {
    height: 75vh;
    min-height: 550px;
    max-height: 750px;
  }
}

/* 大型デスクトップ */
@media (min-width: 1441px) and (max-width: 1920px) {
  .hero {
    height: 80vh;
    min-height: 650px;
    max-height: 900px;
  }
}

/* 超大型ディスプレイ（4K等） */
@media (min-width: 1921px) and (max-width: 2560px) {
  .hero {
    height: 70vh; /* 逆に少し下げる */
    min-height: 800px;
    max-height: 1000px;
  }
}

/* 超ワイドディスプレイ（5K等） */
@media (min-width: 2561px) {
  .hero {
    height: 60vh; /* さらに下げて横長を防ぐ */
    min-height: 900px;
    max-height: 1100px;
  }
}

/* ===========================================
   アスペクト比による調整
   =========================================== */

/* 超ワイドスクリーン（21:9、32:9等）の対策 */
@media (min-aspect-ratio: 18/9) {
  .hero {
    height: 50vh !important; /* 強制的に高さを抑制 */
    max-height: 700px !important;
  }
}

/* 縦長画面での調整 */
@media (max-aspect-ratio: 4/3) {
  .hero {
    height: 40vh;
    min-height: 300px;
  }
}

/* ===========================================
   画像表示位置の画面サイズ対応
   =========================================== */

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--desktop-position, 50% 50%);
  transition: object-position 0.3s ease;
}

/* 小型デバイス */
@media (max-width: 768px) {
  .carousel-slide img {
    object-position: var(--mobile-position, 50% 50%);
  }
}

/* タブレット */
@media (min-width: 769px) and (max-width: 1024px) {
  .carousel-slide img {
    object-position: var(--tablet-position, var(--desktop-position, 50% 50%));
  }
}

/* デスクトップ */
@media (min-width: 1025px) and (max-width: 1920px) {
  .carousel-slide img {
    object-position: var(--desktop-position, 50% 50%);
  }
}

/* 大型ディスプレイ - 画像を少し引きで表示 */
@media (min-width: 1921px) {
  .carousel-slide img {
    object-position: var(--large-desktop-position, var(--desktop-position, 50% 45%));
    /* デフォルトで少し上寄りに調整 */
  }
}

/* 超ワイドディスプレイ - さらに引きで表示 */
@media (min-width: 2561px) {
  .carousel-slide img {
    object-position: var(--ultra-wide-position, var(--desktop-position, 50% 40%));
    /* より上寄りに表示して横長感を軽減 */
  }
}

/* ===========================================
   コンテナの最大幅制限（オプション）
   =========================================== */

/* ヒーローセクション全体の最大幅を制限 */
@media (min-width: 2560px) {
  .hero {
    max-width: 2560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===========================================
   カスタムプロパティ対応CSS - 完全版
   =========================================== */

/* 基本のobject-fit設定も含める */
.carousel-slide img {
  width: 85%;
  height: 100%;
  object-fit: cover; /* または contain */
  object-position: var(--desktop-position, 50% 50%);
  transition: object-position 0.3s ease; /* スムーズな切り替え */
}

/* タブレット */
@media (max-width: 1024px) and (min-width: 769px) {
  .carousel-slide img {
    object-position: var(--tablet-position, var(--desktop-position, 50% 50%));
  }
}

/* モバイル */
@media (max-width: 768px) {
  .carousel-slide img {
    object-position: var(--mobile-position, 50% 50%);
  }.hero-text {
    top: 9% !important;}
}

/* 小型モバイル用（オプション） */
@media (max-width: 480px) {
  .carousel-slide img {
    object-position: var(--small-mobile-position, var(--mobile-position, 50% 50%));
  }
}

/* カスタムプロパティ対応CSS */
.carousel-slide img {
  object-position: var(--desktop-position, 50% 50%);
  transition: object-position 0.3s ease;
}

@media (max-width: 768px) {
  .carousel-slide img {
    object-position: var(--mobile-position, 50% 50%);
  }
}
/* ===========================================
   画像の引き（スケール）専用CSS
   =========================================== */

.carousel-slide img {
  transform: scale(var(--desktop-scale, 1));
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .carousel-slide img {
    transform: scale(var(--mobile-scale, 1));
  }
}

/* ===========================================
   カスタムプロパティ対応CSSここまで - 完全版
   =========================================== */

/* 4K・大型ディスプレイ対応 */
@media (min-width: 2560px) {
  .hero {
    height: 70vh;
    max-height: 1000px;
  }
}

/* カルーセルコントロールの位置調整 */
@media (min-width: 769px) {
  .carousel-controls {
    padding: 0 min(5vw, 100px); /* 画面サイズに応じて調整 */
  }
}

/* 強制位置調整CSS - 既存設定を上書き */
.hero .carousel-slide img {
  object-position: var(--desktop-position, 50% 50%) !important;
  transform: scale(var(--desktop-scale, 1)) !important;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .hero .carousel-slide img {
    object-position: var(--mobile-position, 50% 50%) !important;
    transform: scale(var(--mobile-scale, 1)) !important;
  }
}

/* ライトボックススタイル */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 1200px制限を追加 */
@media (min-width: 1200px) {
  .lightbox-image {
    max-width: 1200px;
  }
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: opacity 0.3s ease;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 24px;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s ease;
  z-index: 10001;
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 16px;
  border-radius: 20px;
}

/* ギャラリー画像にカーソルポインターを追加 */
.gallery-item img {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

/* モバイル対応 */
@media (max-width: 768px) {
  .lightbox-prev {
    left: 10px;
    padding: 10px 15px;
    font-size: 20px;
  }
  
  .lightbox-next {
    right: 10px;
    padding: 10px 15px;
    font-size: 20px;
  }
  
  .lightbox-close {
    top: 10px;
    right: 10px;
    font-size: 25px;
  }
  
  .lightbox-counter {
    bottom: 10px;
    font-size: 14px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* ギャラリー画像にカーソルポインターを追加 */
.gallery-item img {
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* タブレット・デスクトップのみホバーエフェクトを適用 */
@media (min-width: 769px) and (hover: hover) {
  .gallery-item img:hover {
    transform: scale(1.05);
  }
}

.representative-main {
  display: flex;
  align-items: flex-start; /* 両方の要素を上端揃えに */
  gap: 40px; /* 間隔調整 */
}

.representative-text {
  flex: 1;
}

.representative-image {
  flex-shrink: 0; /* 縮小を防ぐ */
  position: sticky;
  top: 50px;
  align-self: flex-start;
  max-width: 400px; /* 適切な幅に調整 */
}