:root {
    --primary-color: #d4af37;
    --background-color: #121212;
    --secondary-bg: #1e1e1e;
    --text-color: #f5f5f5;
    --accent-color: #9c27b0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans JP', 'Arial', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 60px; /* Add space for fixed contact banner */
}

.overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.5s ease;
    padding: 20px; /* 内側の余白を追加 */
}

.overlay h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.overlay p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 600px;
    line-height: 1.5;
}

/* 年齢確認ボタンを横並びにするためのラッパー */
.age-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    margin: 0.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: #b08f26;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background-color: #333;
    color: white;
}

.btn-secondary:hover {
    background-color: #444;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

header {
    background-color: var(--secondary-bg);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 500;
    color: #555555; /* より暗い灰色に変更 */
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    text-shadow: 0 0 10px rgba(85, 85, 85, 0.5);
}

.logo span {
    color: #666666; /* より暗い灰色に変更 */
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: flex-end; /* 右寄せに変更 */
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

nav ul li a:hover::after {
    width: 100%;
}

/* Hero section - PCとモバイルで異なる背景画像 */
.hero {
    position: relative;
    width: 100%;
    height: 80vh;
    max-height: 700px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/hero-bg.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-content {
    position: absolute; /* 絶対位置指定 */
    bottom: 20%; /* 文字を上に移動 - 下から20%の位置に配置 */
    left: 0;
    right: 0;
    text-align: center;
    width: 90%;
    max-width: 800px;
    margin: 0 auto; /* 左右中央配置 */
    padding-bottom: 30px; /* 下部に余白を追加 */
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8); /* テキストをやや暗めに */
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 2rem 0; /* 上下マージンを少し小さくして、セクション自体のマージンに影響されないように */
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.3rem;
    margin: -1.5rem 0 4rem; /* 下部マージンを大きくして本文との間隔を広げる */
    color: #aaa;
}

/* 利用方法セクション用のスタイル追加 */
.usage-details {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--secondary-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.usage-details h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.usage-details ul {
    list-style-type: none;
    margin-bottom: 1.5rem;
}

.usage-details ul li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.usage-details ul li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.therapists {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.therapist-card {
    background-color: var(--secondary-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
}

.therapist-card.show {
    opacity: 1;
    transform: translateY(0);
}

.therapist-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.2);
}

.therapist-image {
    height: 300px;
    background-size: cover;
    background-position: center;
    transition: all 0.5s ease;
}

.therapist-card:hover .therapist-image {
    transform: scale(1.05);
}

.therapist-info {
    padding: 1.5rem;
}

.therapist-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.therapist-details {
    color: #aaa;
    margin-bottom: 0.5rem;
}

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.plan-card {
    background-color: var(--secondary-bg);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
}

.plan-card.show {
    opacity: 1;
    transform: translateY(0);
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.2);
}

.plan-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
}

.plan-features li {
    margin-bottom: 0.5rem;
    color: #ccc;
}

.contact {
    text-align: center;
    /* セクション共通のマージンを使用するためここでは特別なマージンを指定しない */
}

.contact-methods {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 3rem 0;
}

.contact-method {
    background-color: var(--secondary-bg);
    border-radius: 10px;
    padding: 2rem;
    width: 300px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.contact-method.show {
    opacity: 1;
    transform: translateY(0);
}

.contact-method:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.2);
}

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

footer {
    background-color: var(--secondary-bg);
    padding: 2rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.copyright {
    color: #777;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Fixed Contact Banner - NEW */
.contact-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(30, 30, 30, 0.95);
    padding: 10px 0;
    z-index: 98;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.banner-content {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.banner-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--primary-color);
    color: black;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.banner-btn:hover {
    background-color: #b08f26;
    transform: translateY(-3px);
}

.banner-btn.line-btn {
    background-color: #06C755;
    color: white;
}

.banner-btn.line-btn:hover {
    background-color: #049b41;
}

/* Xボタン用のスタイル追加 */
.banner-btn.x-btn {
    background-color: #1DA1F2;
    color: white;
}

.banner-btn.x-btn:hover {
    background-color: #0d8bd9;
}

.banner-btn i {
    margin-right: 5px;
}

/* Modal styles - updated for better navigation and scrolling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--secondary-bg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh; /* Maximum height to fit within viewport */
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.5s ease;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto; /* Allow scrolling for content */
    flex-grow: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #333;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10; /* Ensure it's above other elements */
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
}

.modal-back-btn {
    margin-top: 1rem;
}

/* セラピストモーダルの画像表示用スタイル（スライドショーの代わり） */
.therapist-modal-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    margin-bottom: 2rem;
}

/* Toast notification - 非表示 */
.toast {
    display: none; /* トースト表示を完全に非表示 */
    position: fixed;
    bottom: 70px;
    right: 30px;
    background-color: var(--primary-color);
    color: black;
    padding: 1rem;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(150%);
    transition: transform 0.5s ease;
}

.toast.show {
    transform: translateX(0);
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 80px; /* Adjusted to appear above contact banner */
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: black;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 97;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
}

.scroll-top.show {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    background-color: #b08f26;
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    /* モバイル用のヒーロー背景画像 */
    .hero::before {
        background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/hero-bg2.jpg');
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
    }
    
    .hamburger {
        display: block;
        margin-left: auto; /* ハンバーガーメニューを右寄せに */
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .header-content {
        justify-content: flex-end; /* ヘッダーコンテンツを右寄せに */
    }
    
    .logo {
        margin-right: auto; /* ロゴを左に、残りを右に */
    }
    
    nav ul {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--secondary-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        z-index: 101;
    }
    
    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 1rem 0;
    }
    
    /* セクションの余白調整（モバイル用） */
    section {
        margin-top: 4rem;
        margin-bottom: 4rem;
    }
    
    /* Hero adjustments for mobile */
    .hero {
        height: 60vh;
        min-height: 400px; /* 最小高さを設定して内容が切れないようにする */
        background-position: center;
        background-size: 100% auto; /* 横幅に合わせて背景画像を表示 */
        margin-top: 0; /* ヘッダーとヒーローの間の余白を削除 */
        margin-bottom: 0; /* 下部の余白も削除 */
    }
    
    header + .hero {
        margin-top: 0; /* ヘッダーの下のヒーローセクションのマージンを削除 */
    }
    
    .hero-content {
        padding-bottom: 10px;
        width: 100%;
        bottom: 15%; /* 下部15%の位置に配置（調整済み） */
    }
    
    .hero p {
        font-size: 1.2rem;
        padding: 0 1rem;
        color: rgba(255, 255, 255, 0.6); /* テキストを灰色っぽく透明に */
        margin-bottom: 0; /* 下部マージンを削除 */
    }
    
    /* 年齢確認調整 - モバイル用 */
    .overlay {
        overflow-y: auto; /* スクロール可能に */
        padding: 30px 15px;
    }
    
    .overlay h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .overlay p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
}
    
    /* Section title adjustments */
    .section-title {
        font-size: 2rem;
        margin: 2rem 0;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
        margin: -1.5rem 0 2rem;
    }
    
    /* Adjust therapist and plan cards */
    .therapists {
        grid-template-columns: 1fr;
    }
    
    .plans {
        grid-template-columns: 1fr;
    }
    
    /* Contact banner adjustments */
    .banner-content {
        justify-content: space-around;
    }
    
    .banner-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .therapist-modal-image {
        height: 250px;
    }
}

/* Small phone screens */
@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .hero {
        height: 100vh; /* iPhoneでフルスクリーン表示 */
        min-height: 0; /* 最小高さを削除 */
        position: relative;
        margin: 0;
        padding: 0;
    }
    
    .hero::before {
        background-size: cover;
        background-position: center center;
        height: 100%; /* 高さ100%に設定 */
        width: 100%; /* 幅100%に設定 */
        top: 0;
        left: 0;
        position: absolute;
    }
    
    #about {
        margin-top: 0; /* 次のセクションの余白を削除 */
    }
    
    .hero-content {
        padding-bottom: 10px;
        width: 100%;
        bottom: 15%; /* 15%に変更（位置調整） */
        position: absolute;
        z-index: 2; /* 確実に前面に */
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 0;
        padding: 0 1rem;
        color: rgba(255, 255, 255, 0.5);
    }
    
    .banner-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* トースト非表示 */
    .toast {
        display: none;
    }
    
    /* 年齢確認のボタン調整 - 小さい画面用 */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    /* ヘッダーの右寄せをさらに強化 */
    .hamburger {
        margin-left: 20px;
    }
}

/* カルーセル用スタイル - 1カード中央表示+ループ版 */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 3rem 0;
    padding: 0;
}

.therapists-carousel {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
    height: 450px; /* カードの高さを固定 */
    position: relative;
}

.therapists-carousel .therapist-card {
    position: absolute;
    width: 80%;
    max-width: 350px;
    transition: all 0.5s ease;
    left: 50%;
    transform: translateX(-50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

.therapists-carousel .therapist-card.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
}

.therapists-carousel .therapist-card.prev,
.therapists-carousel .therapist-card.next {
    opacity: 0.5;
    transform: translateX(-50%) scale(0.8);
    z-index: 5;
}

.therapists-carousel .therapist-card.prev {
    transform: translateX(-150%) scale(0.8);
}

.therapists-carousel .therapist-card.next {
    transform: translateX(50%) scale(0.8);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: black;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background-color: #b08f26;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
    position: relative;
    z-index: 20;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* モバイル対応 */
@media (max-width: 768px) {
    .therapists-carousel {
        height: 420px;
    }
    
    .therapists-carousel .therapist-card {
        width: 90%;
    }
    
    .therapists-carousel .therapist-card.prev,
    .therapists-carousel .therapist-card.next {
        display: none; /* モバイルでは前後のカードを非表示 */
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* 小型スマホ向け */
@media (max-width: 480px) {
    .therapists-carousel {
        height: 400px;
    }
    
    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }
}
}
