/* 読書の森 - Index Page Styles */
/* 注意: カラー変数は variables.css で定義されています */

@import "variables.css";

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ナビゲーション */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--color-header-bg);
    color: var(--color-header-text);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    background: transparent !important;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo a {
    color: inherit;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

nav ul li {
    white-space: nowrap;
}

/* モバイル用サイト内検索はデフォルトで非表示（1200px以下で表示） */
.mobile-search-container {
    display: none;
}

/* モバイル用言語セレクターはデフォルトで非表示（1200px以下で表示） */
.mobile-language-select {
    display: none;
}

nav a {
    text-decoration: none;
    color: #ffffff;  /* 白色に変更（ダークグレー背景に対応） */
    transition: color 0.3s;
    white-space: nowrap;
    font-size: 0.9rem;
}

nav a:hover {
    opacity: 0.8;  /* ホバー時は透明度を下げる */
}

/* ヒーローセクション */
.hero {
    padding-top: 100px;
    padding-bottom: 60px;
    display: flex;
    align-items: center;
    background: var(--gradient-brand);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s infinite linear;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: clamp(1.1rem, 3.5vw, 2.8rem);
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s;
}

/* インラインキャンペーンバナー（ヒーロー内） */
.campaign-inline {
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1.4s;
}

.campaign-inline .campaign-badge {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.campaign-inline .campaign-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffd700;
}

.campaign-inline .campaign-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .campaign-inline {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem 1rem;
    }

    .campaign-inline .campaign-price {
        font-size: 1.1rem;
    }
}

/* ボタンスタイル */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* 特徴セクション */
.features {
    padding: 80px 0;
    background: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 1.2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ダークモード対応: feature-card の見出しとカード背景 */
@media (prefers-color-scheme: dark) {
    /* ナビゲーションバー */
    nav {
        background: rgba(30, 30, 30, 0.98) !important;
    }

    nav .logo,
    nav ul li a {
        color: #e0e0e0 !important;
    }

    nav ul li a:hover {
        color: #ffffff !important;
    }

    /* ヒーローセクション: 彩度を下げてボタンを目立たせる */
    .hero {
        background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%) !important;
    }

    .feature-card {
        background-color: #2d2d2d;
    }

    .feature-card h3 {
        color: #ffffff;
    }

    .feature-card p {
        color: #b0b0b0;
    }

    /* 活用シーンカード */
    .use-case-card {
        background-color: #2d2d2d !important;
    }

    .use-case-card h4 {
        color: #ffffff !important;
    }

    .use-case-card p {
        color: #b0b0b0 !important;
    }

    /* 読書の森の強み セクション */
    .advantages {
        background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%) !important;
    }

    .advantages p {
        color: #b0b0b0 !important;
    }

    .advantages .feature-card ul li {
        color: #b0b0b0 !important;
    }

    .advantages .feature-card p {
        color: #b0b0b0 !important;
    }

    /* 料金プラン セクション */
    .pricing {
        background: #1e1e1e !important;
    }

    .pricing-card {
        background: #2d2d2d !important;
        border-color: #444444 !important;
    }

    .plan-name {
        color: #ffffff !important;
    }

    .plan-features li {
        color: #b0b0b0 !important;
    }

    .pricing p {
        color: #b0b0b0 !important;
    }

    /* FAQ セクション */
    .faq {
        background: #1e1e1e !important;
    }

    .faq p {
        color: #b0b0b0 !important;
    }

    .faq-item {
        background: #2d2d2d !important;
    }

    .faq-question {
        background: #2d2d2d !important;
        color: #ffffff !important;
    }

    .faq-question:hover {
        background: #3a3a3a !important;
    }

    .faq-answer {
        background: #2d2d2d !important;
        color: #b0b0b0 !important;
    }

    /* CTA セクション */
    .cta {
        background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%) !important;
    }

    .cta h2 {
        color: #ffffff !important;
    }

    .cta p {
        color: #e0e0e0 !important;
    }

    /* フッタ セクション */
    footer {
        background: #1e1e1e !important;
    }

    footer .footer-section h3 {
        color: #ffffff !important;
    }

    footer .footer-section p {
        color: #b0b0b0 !important;
    }

    footer .footer-section a {
        color: #b0b0b0 !important;
    }

    footer .footer-section a:hover {
        color: #ffffff !important;
    }

    .footer-bottom {
        border-top-color: #444444 !important;
        color: #b0b0b0 !important;
    }
}

/* 料金プラン */
.pricing {
    padding: 80px 0;
    background: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured::before {
    content: '人気!';
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--gradient-2);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

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

.plan-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 1rem;
    text-align: center;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .plan-price {
        background: var(--gradient-brand);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.plan-price span {
    font-size: 1rem;
    opacity: 0.7;
}

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

.plan-features li {
    padding: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
}

.plan-features li.no-checkmark::before {
    content: none;
}

/* FAQ セクション */
.faq {
    padding: 80px 0;
    background: var(--bg-light);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 0.8rem 1.2rem;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 3000px; /* 長いコンテンツにも対応 */
    padding: 0 1.5rem 1.5rem;
}

.faq-icon {
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* CTA セクション */
.cta {
    padding: 80px 0;
    background: var(--gradient-1);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* フッター */
footer {
    background: var(--text-primary);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 1rem !important;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    height: auto;
    overflow-y: auto;
    animation: fadeInUp 0.3s;
}

.modal-content h3 {
    margin-bottom: 0.8rem !important;
    color: var(--text-primary);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    height: auto;
    flex-shrink: 0;
}

.modal-content label {
    margin-bottom: 0.2rem !important;
    color: var(--text-secondary);
    font-weight: 600;
}

.modal-content input,
.modal-content select {
    padding: 10px;
    margin-bottom: 0.6rem !important;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

/* モーダル内のフォームグループの余白を最適化 */
.modal-content .form-group {
    margin-bottom: 0.5rem !important;
}


.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-buttons button {
    flex: 1;
}

/* レスポンシブ */
/* ハンバーガーメニューボタン（デフォルトは非表示） */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;  /* 白色 */
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    opacity: 0.7;
}

.mobile-menu-toggle:active {
    opacity: 0.5;
}

/* タブレット・小さいデスクトップ用（1200px以下でハンバーガーメニュー） */
@media (max-width: 1200px) {
    /* コンテナの調整 */
    nav .container {
        position: relative;
    }

    /* ハンバーガーメニューボタンを表示 */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }

    /* デスクトップ用言語セレクターは1200pxでは表示を維持 */
    /* モバイル(768px以下)でのみ非表示にする */
    .desktop-language-select {
        position: absolute;
        right: 4.5rem;  /* ハンバーガーメニュー(right: 2rem)の左側に配置 */
        top: 50%;
        transform: translateY(-50%);
    }

    /* サイト内検索を非表示（モバイルメニュー内に移動） */
    #navSearchContainer {
        display: none;
    }

    /* ナビゲーションメニュー */
    nav ul {
        display: none;
        position: fixed;
        top: 60px;
        right: 20px;
        width: 300px;  /* スクロールバー幅とコンテンツ幅を考慮して300pxに変更 */
        background: rgba(85, 80, 80, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 5px 0;
        gap: 0;  /* モバイルでは隙間なし */
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
        z-index: 1000;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        border-radius: 8px;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0;
        padding: 0;
        width: 100%;
        white-space: normal;  /* モバイルメニューでは折り返し許可 */
    }

    nav ul li a {
        display: block;
        padding: 10px 20px !important;  /* 強制適用 */
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: white !important;  /* 強制適用 */
        font-size: 14px !important;  /* 強制適用 */
        line-height: 1.4 !important;  /* 行間を詰める */
        transition: all 0.2s;
        margin: 0 !important;  /* マージンをゼロに */
        white-space: normal;  /* 折り返し許可 */
    }

    nav ul li a:hover,
    nav ul li a:active {
        background: rgba(255,255,255,0.15);
        padding-left: 25px;  /* ホバー時に少し右にずらす */
    }

    nav ul li:last-child a {
        border-bottom: none;
    }

    /* モバイル用サイト内検索 */
    .mobile-search-container {
        display: block !important;
        padding: 10px 20px !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    #mobileSearchContainer .site-search-form {
        max-width: 100%;
        background: transparent !important;
        border: 1px solid rgba(255,255,255,0.3) !important;
        border-radius: 8px !important;
        padding: 6px 10px !important;
    }

    #mobileSearchContainer .site-search-input {
        font-size: 14px !important;
        padding: 6px 10px !important;
        color: white !important;
    }

    #mobileSearchContainer .site-search-input::placeholder {
        color: rgba(255,255,255,0.6) !important;
    }

    #mobileSearchContainer .site-search-btn {
        width: 32px !important;
        height: 32px !important;
        background: rgba(255,255,255,0.2) !important;
    }

    #mobileSearchContainer .site-search-btn:hover {
        background: rgba(255,255,255,0.3) !important;
    }

    #mobileSearchContainer .site-search-btn i {
        font-size: 13px !important;
    }

    /* モバイル用言語セレクターを表示 */
    .mobile-language-select {
        display: block !important;
        padding: 10px 20px !important;
    }

    .mobile-language-select select {
        width: 100%;
        padding: 8px;
        border-radius: 4px;
        border: 1px solid rgba(255,255,255,0.3);
        background: rgba(255,255,255,0.1);
        color: white;
    }
}

@media (max-width: 768px) {
    /* .hero h1 は lang-ja.css の clamp() で自動調整 */

    /* モバイルではデスクトップ用言語セレクターを非表示 */
    .desktop-language-select {
        display: none !important;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .pricing-card.featured {
        transform: none;
    }

    /* モバイルでのパスワードトグル調整 */
    .password-toggle {
        font-size: 16px !important;
        right: 8px !important;
        padding: 4px !important;
    }

    .password-wrapper input,
    input[type="password"] {
        padding-right: 40px !important;
    }

    /* モバイルでボタンを縦並びに */
    .modal-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .modal-buttons button {
        width: 100% !important;
    }

    /* モバイルでbtn-outlineを強制 */
    .btn-outline {
        background: transparent !important;
        color: var(--primary-color) !important;
        border: 2px solid var(--primary-color) !important;
    }

    /* モバイルでモーダルの余白を削減 */
    .modal-content {
        margin: 1% auto !important;
        padding: 0.8rem !important;
        max-height: 96vh !important;
        width: 95% !important;
    }

    .modal-content h3 {
        margin-bottom: 0.5rem !important;
        font-size: 1.2rem !important;
    }
}

/* 小さいスマホ用（480px以下） */
@media (max-width: 480px) {
    /* .hero h1 は lang-ja.css の clamp() で自動調整 */

    .hero p {
        font-size: 0.9rem;
    }
}

/* アニメーションクラス */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* スクロール進捗バー */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-1);
    z-index: 2001;
    transition: width 0.2s;
}

/* ツールチップ */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    z-index: 999999;
}

.tooltip:hover::after {
    opacity: 1;
}

/* パスワード表示切り替えボタン */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px !important;
}

.password-toggle {
    position: absolute;
    right: 10px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    font-size: 20px;
    color: #666;
    background: none;
    border: none;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.password-toggle:hover {
    color: #333;
}

.password-toggle:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.password-toggle:active {
    color: var(--color-primary);
}

/* パスワード表示オーバーレイ（押している間だけ表示） */
.password-reveal-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: calc(100% - 45px);
    height: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    display: none;
    align-items: center;
    z-index: 5;
    pointer-events: none;
    font-family: inherit;
    font-size: inherit;
    color: #2d3748;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-reveal-overlay.show {
    display: flex;
}

/* IME警告スタイル */
.ime-warning {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    animation: fadeIn 0.3s;
}

.ime-warning.show {
    display: block;
}

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

/* Cookie同意バナー */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-consent-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.cookie-consent-text p {
    margin: 5px 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: var(--color-info-dark);
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cookie-btn-accept {
    background: var(--gradient-brand);
    color: white;
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.cookie-btn-decline {
    background: #6c757d;
    color: white;
}

.cookie-btn-decline:hover {
    background: #5a6268;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
    }
}

/* ========================================
   サイト内検索ボックス
   ======================================== */
#navSearchContainer {
    margin-left: 1rem;
    flex-shrink: 0;
}

/* デスクトップ用サイト内検索 */
#navSearchContainer .site-search-box {
    display: inline-block;
    width: 160px;
}

/* 共通スタイル（デスクトップとモバイル両方） */
#navSearchContainer .site-search-form,
#mobileSearchContainer .site-search-form {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2px 4px;
    transition: border-color 0.3s ease;
}

#navSearchContainer .site-search-form:focus-within,
#mobileSearchContainer .site-search-form:focus-within {
    border-color: var(--color-primary);
}

#navSearchContainer .site-search-input,
#mobileSearchContainer .site-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 4px 8px;
    font-size: 12px;
    background: transparent;
    color: #2d3748;
    min-width: 0;
}

#navSearchContainer .site-search-input::placeholder,
#mobileSearchContainer .site-search-input::placeholder {
    color: #a0aec0;
}

#navSearchContainer .site-search-btn,
#mobileSearchContainer .site-search-btn {
    background: var(--gradient-brand);
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    flex-shrink: 0;
}

#navSearchContainer .site-search-btn:hover,
#mobileSearchContainer .site-search-btn:hover {
    opacity: 0.9;
}

#navSearchContainer .site-search-btn i,
#mobileSearchContainer .site-search-btn i {
    font-size: 11px;
}

/* モバイル用サイト内検索 */
#mobileSearchContainer .site-search-box {
    width: 100%;
}

/* デスクトップではモバイル用言語を非表示 */
.mobile-language-select {
    display: none;
}

/* デスクトップ用言語 */
.desktop-language-select {
    display: inline-block;
    margin-left: 15px;
}

/* モバイルでは検索ボックスを非表示 */
@media (max-width: 768px) {
    #navSearchContainer {
        display: none;
    }

    /* モバイルではロゴを小さく */
    nav .logo {
        font-size: 1.1rem !important;
    }

    /* モバイルでは言語をコンパクトに表示（ハンバーガーの左に配置） */
    nav .container > #languageSelect {
        display: block !important;
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
        padding: 4px 6px !important;
        font-size: 11px !important;
        min-width: auto;
        width: auto;
        border-radius: 4px;
    }

    /* ハンバーガーメニューボタンの位置調整 */
    .mobile-menu-toggle {
        right: 1rem !important;
    }

    /* モバイルメニュー内の言語も表示（両方から選べるように） */
    .mobile-language-select {
        display: block !important;
        padding: 0 !important;
    }

    .mobile-language-select select {
        width: 100%;
        padding: 10px 20px !important;
        background: transparent;
        border: none;
        color: white !important;
        font-size: 14px !important;
        cursor: pointer;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .mobile-language-select select option {
        background: #555;
        color: white;
    }
}
