/* ==========================================================================
   1. Root Variables & Global Styles (Excluding Modal Scrollbar)
   ========================================================================== */
:root {
    --primary-color: #F44F12;    /* メインカラー（オレンジ） */
    --secondary-color: #F7A072;  /* セカンダリーカラー（薄いオレンジ） */
    --accent-color: #C25B37;     /* アクセントカラー（くすんだオレンジ） */
    --highlight-color: #FFCBA4;  /* ハイライトカラー（明るいオレンジ） */
    --text-color: #333333;
    --bg-color: #F7F7F7;
    --bg-alt-color: #FFFFFF;
    --max-width: 1120px;
    --section-spacing: 120px;
    --container-padding: 24px;
    --primary-color-dark: #D13700; /* more-button ホバー用（濃いオレンジ） */
    --primary-color-rgb: 244, 79, 18; /* For rgba gradient in case-hover */
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 60px; /* 72pxから60pxに変更 */
    background-color: var(--bg-color);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container.narrow {
    max-width: 400px;
}

/* Header styles moved to header.css */
/* Footer styles moved to footer.css */
/* Modal, Form, Floating Icon styles moved to modal.css */


/* ==========================================================================
   3.1 Common Button Styles
   ========================================================================== */
/* Common button style - used in Hero, Problems, ThankYouModal */
.contact-button, /* Generic class */
.hero-contact-button { /* Specific instance */
    background-color: var(--bg-color);
    color: var(--primary-color);
    padding: 12px 32px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none; /* Ensure it looks like a button if used as <a> */
    display: inline-block; /* Ensure margin-top works */
}
.contact-button:hover,
.hero-contact-button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   14. Animation & Utility Classes (Excluding Modal Animations)
   ========================================================================== */
/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}
.fade-in-delay-1 { animation-delay: 0.2s; }
.fade-in-delay-2 { animation-delay: 0.4s; }
.fade-in-delay-3 { animation-delay: 0.6s; }

/* Scroll Reveal Animation */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
    opacity: 0;
        transform: translateY(30px); /* Slightly more offset */
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    .scroll-reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Decorative Tech Grid (optional visual element) */
.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: -1; /* Ensure it's behind content */
    pointer-events: none; /* Make it non-interactive */
}

/* ==========================================================================
   15. HALE HOTELS Main Slider (Specific Component)
   ========================================================================== */
.main-slider {
    position: relative;
    width: 100%;
    height: 90vh; /* 80vhから90vhに変更 - ビューポート高さの90% */
    min-height: 500px; /* 最小高さを設定 */
    max-height: 800px; /* 最大高さを設定（オプション） */
    overflow: hidden;
}

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

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* すべてのスライドを非表示に変更 */
    visibility: hidden; /* 非アクティブなスライドは非表示に */
    z-index: 0;
    transition: opacity 0.8s ease, visibility 0.8s ease; /* トランジション追加 */
}

.slide.active {
    opacity: 1; /* アクティブなスライドのみ表示 */
    visibility: visible;
    z-index: 2;
}

.slide.prev {
    z-index: 1;
}

.slide-content {
    display: flex;
    height: 100%;
}

.slide-image {
    position: relative;
    width: 60%;
    height: 100%;
    overflow: hidden; /* 重要: はみ出した部分を隠す */
}

.slide-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05); /* 少し拡大した状態から */
    transition: transform 0.8s ease, opacity 0.8s ease;
    opacity: 0;
}

/* アクティブなスライドの画像 */
.slide.active .slide-image img {
    transform: scale(1);
    opacity: 1;
}

/* 前のスライドの画像 - 左にスライドアウト */
.slide.prev .slide-image img {
    transform: translateX(-100%);
}

/* 次のスライドの画像 - 右から準備 */
.slide:not(.active):not(.prev) .slide-image img {
    transform: translateX(100%);
}

.slide-text {
    width: 40%;
    padding: 40px;
    background-color: var(--bg-alt-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide.active .slide-text {
    opacity: 1;
    transition-delay: 0.3s;
}

.slide.prev .slide-text {
    opacity: 0;
}

.slide-text h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.slide-text p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Reverse layout: Text Left, Image Right */
.slide-content.reverse {
    flex-direction: row-reverse;
}
/* No need to redefine widths for reverse, structure handles it */

/* Contact Button within Slider */
/* Uses .contact-button style defined earlier, but can add specifics */
.slide .contact-button { /* Specific to slider */
    background-color: var(--primary-color);
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start; /* Align button to the start */
    display: inline-block;
    text-decoration: none; /* If it's an <a> tag */
    margin-top: 0; /* Override default margin-top */
}
.slide .contact-button:hover {
    background-color: var(--primary-color-dark); /* Use defined dark color */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.prev-slide, .next-slide {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.prev-slide:hover, .next-slide:hover {
    background-color: white;
    transform: scale(1.1);
    color: var(--primary-color);
}

.slide-dots {
    display: flex;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 16px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* ==========================================================================
   16. Keyframe Animations (Excluding Modal Animations)
   ========================================================================== */
@keyframes fadeInUp {
    to {
    opacity: 1;
    transform: translateY(0);
    }
}

@keyframes gridMove {
    from { background-position: 0 0; }
    to { background-position: 0 50px; }
}

/* ==========================================================================
   17. Responsive Styles (Excluding Header, Footer, Modal specific)
   ========================================================================== */

/* Larger Screens (adjust container widths if needed) */
@media (min-width: 1401px) {
    /* .hero .container max-width is already set */
}

@media (max-width: 1400px) {
    .hero .container {
        max-width: 90%; /* Adjust hero content width */
    }
}

/* Tablets and Smaller Laptops */
@media (max-width: 992px) {
    .case-grid {
        gap: 30px;
    }
    /* HALE Slider adjustments */
    .main-slider {
        height: auto; /* 高さ自動調整を削除 */
        height: 90vh; /* タブレットでは90vhに */
        min-height: 500px; /* 最小高さは維持 */
    }
    .slide-content,
    .slide-content.reverse {
        flex-direction: column; /* Stack image and text */
    }
    .slide-image, .slide-text,
    .slide-content.reverse .slide-image,
    .slide-content.reverse .slide-text {
        width: 100%;
    }
    .slide-image {
        height: 60%; /* 画像部分の高さ比率 */
    }
    .slide-text {
        height: 40%; /* テキスト部分の高さ比率 */
    }
    .slide-content.reverse {
        flex-direction: column-reverse; /* Keep text below image */
    }
    .slide-text {
        padding: 30px; /* Adjust padding */
    }
    .slide-text h2 { font-size: 22px; }
    .slide-text p { font-size: 15px; }
}

/* Tablets */
@media (max-width: 768px) {
    :root {
        --section-spacing: 80px; /* Reduce section spacing */
        --container-padding: 20px; /* Reduce container padding */
    }
    body { padding-top: 64px; } /* Adjust for smaller header */

    /* Header responsive styles moved to header.css */

    /* Hero */
    .hero { padding: 80px 0; }
    .hero h1 { font-size: 24px; line-height: 1.6; }
    .hero p { font-size: 16px; line-height: 1.6; }
    .hero-logo { width: 160px; }

    /* Sections */
    .company-info h2,
    .recommended-section h2,
    .problems-section h2,
    .business-section h2 {
        font-size: 28px;
        margin-bottom: 50px; /* Adjust margin */
    }
    .company-info h2::after,
    .recommended-section h2::after,
    .problems-section h2::after,
    .business-section h2::after { /* Added business-section */
        bottom: -12px; /* Adjust position */
    }
    .info-item p { font-size: 16px; line-height: 2.5; }

    /* Recommended */
    .recommended-grid { grid-template-columns: 1fr; gap: 30px; padding: 0 20px; } /* Added padding */
    .recommended-image { height: 220px; } /* Adjust height */
    .recommended-image h3 { font-size: 22px; padding: 14px; }
    .recommended-item p { padding: 20px; font-size: 14px; }

    /* Problems */
    .problems-section h2 { font-size: 24px; margin-bottom: 40px; }
    .speech-bubbles-container { gap: 32px; padding: 0 20px; } /* Added padding */
    .speech-bubble { gap: 16px; }
    .speech-content { padding: 20px; max-width: calc(100% - 66px); } /* Adjust width based on icon */
    .speech-icon { width: 50px; height: 50px; }
    .speech-icon svg { width: 24px; height: 24px; }
    .speech-content h3 { font-size: 16px; margin-bottom: 8px; }
    .speech-content p { font-size: 14px; }
    .problems-solution { margin-top: 40px; padding: 20px; }
    .problems-solution p { font-size: 15px; line-height: 1.7; }
    .problems-solution p br { display: none; } /* Hide breaks on smaller screens */
     /* Adjust bubble arrow position */
    .speech-bubble.left .speech-content::after { right: 100%; margin-right: -11px; border-width: 10px 10px 10px 0; }
    .speech-bubble.right .speech-content::after { left: 100%; margin-left: -11px; border-width: 10px 0 10px 10px; }


    /* Business */
    .business-category { margin-bottom: 60px; }
    .business-category h3 { font-size: 22px; margin-bottom: 30px; }
    .case-grid { grid-template-columns: 1fr; gap: 24px; }
    .case-image h4 { font-size: 15px; padding: 12px; }
    .case-hover { padding: 16px; }
    .case-hover p { font-size: 13px; line-height: 1.6; }
    .gallery-nav { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gallery-nav a { padding: 10px; font-size: 13px; }
    .more-button { font-size: 15px; padding: 10px 20px; }

    /* Video */
    .video-wrapper { margin: 0 20px; width: auto; } /* Adjust margin */

    /* Footer responsive styles moved to footer.css */
    /* Floating Icon & Modal responsive styles moved to modal.css */

    /* HALE Slider */
    .slide-text { padding: 30px; min-height: 250px; }
    .slide-text h2 { font-size: 20px; margin-bottom: 16px; }
    .slide-text p { font-size: 14px; margin-bottom: 24px; line-height: 1.7; }
    .slide .contact-button { padding: 10px 24px; font-size: 14px; }
    .slider-nav { bottom: 20px; }
    .prev-slide, .next-slide { width: 40px; height: 40px; font-size: 18px; }
    .dot { width: 8px; height: 8px; }
    .slide-dots { gap: 8px; padding: 6px 10px; }

    .main-slider .slide-text {
        max-height: 40vh;
        overflow-y: auto;
        padding: 4px 0 24px 0;
        box-sizing: border-box;
        display: block;
    }
}

/* Smaller Mobiles */
@media (max-width: 576px) {
}

/* Very Small Mobiles */
@media (max-width: 415px) {
}

@media (max-width: 360px) {
}

/* Adjustments for short viewports */
/* Moved to modal.css as it primarily affects the modal */

/* アクセスページの地図画像用特別スタイル */
.slide-image img[src*="HALEMAP.jpg"] {
  object-fit: contain !important; /* cover から contain に変更 */
  background-color: white; /* 余白を白で埋める */
  padding: 10px; /* 画像の周りに少し余白を追加（オプション） */
}

@media (max-width: 600px) {
  .slide-text {
    padding: 12px !important;
    width: 100%;
    box-sizing: border-box;
  }
}
@media (max-width: 480px) {
  .slide-text {
    padding: 6px !important;
    width: 100%;
    box-sizing: border-box;
  }
}

.slide-link {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 32px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background-color: var(--primary-color);
  border: none;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  width: auto;
  max-width: 240px;
  min-width: 120px;
  text-align: center;
  white-space: nowrap;
}
.slide-link:hover {
  background-color: var(--primary-color-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ===== ローディングスピナー ===== */
#global-loading {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}
#global-loading.hide {
  opacity: 0;
  pointer-events: none;
}
.global-spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #eee;
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: global-spin 0.8s linear infinite;
}
@keyframes global-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.submit-button.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none; /* ホバーイベントを無効化 */
}

/* 無効化されたボタンのホバー時のスタイルを削除 */
.submit-button.disabled:hover,
.submit-button.loading:hover {
    background-color: #cccccc;
    color: #fff;
    opacity: 1;
    transform: none;
    cursor: not-allowed;
}

.submit-button:hover {
    opacity: 1;
}