/* ラーメンクッキング東京 - 共通スタイルシート */
/* このファイルは全バージョンで共有される最小限の設定のみを含む */

/* ========================================
   CSS変数定義
   ======================================== */
:root {
    /* カラーパレット */
    --color-base: #F8F1DF;
    --color-main: #BF1A20;
    --color-accent-black: #120C0F;
    --color-gold-1: #F0CC7E;
    --color-gold-2: #F4DB8C;
    --color-gold-3: #F9F3E5;
    --color-gold-4: #E4BC57;
    --color-gold-5: #EFCA84;
    
    /* テキストカラー */
    --color-white: #FFFFFF;
    --color-text-primary: #120C0F;
    --color-text-secondary: #5A5A5A;
    --color-text-light: #FFFFFF;
    --color-text: #120C0F;
    
    /* その他のカラー */
    --color-primary: #BF1A20;
    --color-border: #E5E5E5;
    --color-background: #F8F1DF;
    
    /* フォント */
    --font-primary: 'Lora', serif;
    
    /* スペーシング */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* ブレークポイント */
    --breakpoint-xs: 375px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1440px;
    
    /* シャドウ */
    --shadow-sm: 0 2px 4px rgba(18, 12, 15, 0.1);
    --shadow-md: 0 4px 6px rgba(18, 12, 15, 0.15);
    --shadow-lg: 0 10px 15px rgba(18, 12, 15, 0.2);
    
    /* ボーダーラディウス */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 20px;
    --border-radius-full: 50%;
}

/* ========================================
   基本リセット
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    /* Ensure webfonts don't block text rendering */
    font-display: swap;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;  /* 水平スクロールを防ぐ */
}

/* ルート要素にも設定 */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================================
   基本的な要素のスタイル
   ======================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent-black);
}

/* ========================================
   汎用レイアウトクラス
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* ========================================
   レスポンシブ表示制御
   ======================================== */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: inline;
    }
    
    .desktop-only {
        display: none;
    }
}

/* ========================================
   改行制御ユーティリティ
   ======================================== */
.nowrap {
    white-space: nowrap;
    display: inline-block;
}

/* ========================================
   アクセシビリティ
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* フォーカススタイル */
:focus {
    outline: 2px solid var(--color-main);
    outline-offset: 2px;
}

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

/* スクロールアニメーション用 */
.scroll-animated {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-animated.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   ヘッダーとナビゲーション
   ======================================== */
.global-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(18, 12, 15, 0.08), 0 4px 12px rgba(18, 12, 15, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 和紙のような微細なテクスチャ */
.global-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(248, 241, 223, 0.03) 0%, 
        transparent 50%, 
        rgba(248, 241, 223, 0.03) 100%);
    pointer-events: none;
}

.main-nav {
    padding: 20px 0;
    transition: padding 0.3s ease;
}

/* スクロール時にコンパクトに */
.global-header.scrolled .main-nav {
    padding: 12px 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* ロゴ */
.logo {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 44px;
    width: auto;
}

.global-header.scrolled .logo img {
    height: 36px;
}

/* デスクトップナビゲーション */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 36px;
}

.nav-menu.desktop {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

@media (min-width: 1024px) {
    .nav-menu.desktop {
        display: flex;
    }
}

.nav-menu a {
    color: var(--color-accent-black);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.02em;
    position: relative;
    transition: all 0.3s ease;
    padding: 4px 0;
}

/* エレガントな下線アニメーション */
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold-4), var(--color-gold-1));
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

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

/* ドロップダウンメニュー */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(18, 12, 15, 0.15);
    padding: 12px 0;
    margin-top: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 200px;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 24px;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: var(--color-gold-3);
    color: var(--color-main);
}

.dropdown-menu a::after {
    display: none;
}

/* アクションエリア */
.nav-actions {
    display: flex;
    align-items: center;
}

/* CTAボタン - 深緋色の美しいボタン */
.nav-cta {
    background: var(--color-main);
    color: white;
    padding: 12px 28px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* CTAボタンの光沢エフェクト */
.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.6s ease;
}

.nav-cta:hover::before {
    left: 100%;
}

.nav-cta:hover {
    background: #A01218;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(191, 26, 32, 0.3);
}

/* モバイルメニュートグル */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    width: 44px;
    height: 44px;
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-accent-black);
    position: absolute;
    left: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 14px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 21px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 28px;
}

/* モバイルメニュー開いた時のアニメーション */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 21px;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 21px;
}

/* モバイルナビゲーション */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 241, 223, 0.98);
    backdrop-filter: blur(20px);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.mobile-nav.active {
    display: block;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.mobile-menu-close {
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    cursor: pointer;
    position: relative;
}

.mobile-menu-close span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-accent-black);
    position: absolute;
    left: 10px;
    top: 21px;
}

.mobile-menu-close span:first-child {
    transform: rotate(45deg);
}

.mobile-menu-close span:last-child {
    transform: rotate(-45deg);
}

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

.mobile-menu > li {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(18, 12, 15, 0.08);
    padding-bottom: 20px;
}

.mobile-menu > li:last-child {
    border-bottom: none;
}

.mobile-menu a {
    color: var(--color-accent-black);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    display: block;
    padding: 12px 0;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold-4);
    transition: width 0.3s ease;
}

.mobile-menu a:hover::after,
.mobile-menu a:focus::after {
    width: 30px;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
    color: var(--color-main);
    padding-left: 8px;
}

.has-submenu .submenu-toggle {
    background: none;
    border: none;
    color: var(--color-accent-black);
    font-size: 18px;
    font-weight: 500;
    padding: 8px 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.has-submenu .submenu-toggle::after {
    content: '+';
    font-size: 20px;
    transition: transform 0.3s ease;
}

.has-submenu.active .submenu-toggle::after {
    transform: rotate(45deg);
}

.sub-menu {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.has-submenu.active .sub-menu {
    max-height: 400px;
}

.sub-menu a {
    font-size: 16px;
    padding: 6px 0;
}

.mobile-cta {
    background: var(--color-main);
    color: white;
    padding: 16px 32px;
    border-radius: 28px;
    text-align: center;
    font-weight: 600;
    margin-top: 32px;
    display: block;
}

/* ========================================
   言語切り替えセレクター
   ======================================== */
.language-selector {
    position: relative;
}

.lang-current {
    background: transparent;
    border: 2px solid rgba(18, 12, 15, 0.1);
    color: var(--color-accent-black);
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* 言語アイコン（地球儀） */
.lang-current::before {
    content: '🌐';
    font-size: 16px;
    opacity: 0.7;
}

/* ドロップダウン矢印 */
.lang-current::after {
    content: '▼';
    font-size: 10px;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.lang-current[aria-expanded="true"]::after {
    transform: rotate(180deg) translateY(50%);
}

.lang-current:hover {
    border-color: var(--color-gold-4);
    background: rgba(240, 204, 126, 0.08);
}

/* メニューが開いているときのスタイル */
.lang-current[aria-expanded="true"] {
    border-color: var(--color-gold-4);
    background: rgba(240, 204, 126, 0.1);
    box-shadow: 0 2px 8px rgba(240, 204, 126, 0.2);
}

/* フォーカス時のスタイル（アクセシビリティ向上） */
.lang-current:focus-visible {
    outline: 2px solid var(--color-main);
    outline-offset: 2px;
}

/* メニューリンクのフォーカススタイル */
.lang-options a:focus-visible {
    outline: 2px solid var(--color-main);
    outline-offset: -2px;
}

.lang-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(18, 12, 15, 0.12);
    padding: 8px;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    min-width: 140px;
    z-index: 1000;
    max-height: 70vh;
    overflow-y: auto;
}

/* 言語リストの三角形 */
.lang-options::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(18, 12, 15, 0.05);
}

.language-selector:hover .lang-options,
.lang-current[aria-expanded="true"] + .lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-options li {
    margin: 0;
}

.lang-options a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--color-accent-black);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    position: relative;
}

/* 各言語のフラグアイコン（Unicode絵文字） */
.lang-options a::before {
    content: attr(data-flag);
    font-size: 18px;
}

.lang-options a[hreflang="en"]::before { content: '🇬🇧'; }
.lang-options a[hreflang="en"][data-variant="us"]::before { content: '🇺🇸'; }
.lang-options a[hreflang="fr"]::before { content: '🇫🇷'; }
.lang-options a[hreflang="de"]::before { content: '🇩🇪'; }
.lang-options a[hreflang="es"]::before { content: '🇪🇸'; }
.lang-options a[hreflang="it"]::before { content: '🇮🇹'; }
.lang-options a[hreflang="pt"]::before { content: '🇵🇹'; }
.lang-options a[hreflang="nl"]::before { content: '🇳🇱'; }
.lang-options a[hreflang="sv"]::before { content: '🇸🇪'; }
.lang-options a[hreflang="da"]::before { content: '🇩🇰'; }
.lang-options a[hreflang="nb"]::before { content: '🇳🇴'; }
.lang-options a[hreflang="fi"]::before { content: '🇫🇮'; }
.lang-options a[hreflang="is"]::before { content: '🇮🇸'; }

.lang-options a:hover {
    background: linear-gradient(90deg, var(--color-gold-3) 0%, transparent 100%);
    color: var(--color-main);
    padding-left: 18px;
}

/* 現在の言語のハイライト */
.lang-options a.current {
    background: var(--color-gold-3);
    font-weight: 600;
}

/* モバイル版言語セレクター */
.mobile-lang-selector {
    padding: 32px 20px;
    border-top: 1px solid rgba(18, 12, 15, 0.08);
    background: linear-gradient(180deg, transparent 0%, rgba(248, 241, 223, 0.5) 100%);
}

.mobile-lang-selector p {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--color-accent-black);
    opacity: 0.7;
    text-align: center;
}

.mobile-lang-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 480px) {
    .mobile-lang-options {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 640px) {
    .mobile-lang-options {
        grid-template-columns: repeat(5, 1fr);
    }
}

.mobile-lang-options li {
    margin: 0;
}

.mobile-lang-options a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent-black);
    text-decoration: none;
    transition: all 0.2s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(18, 12, 15, 0.05);
}

/* モバイル言語フラグ */
.mobile-lang-options a::before {
    content: attr(data-flag);
    font-size: 24px;
}

.mobile-lang-options a[hreflang="en"]::before { content: '🇬🇧'; }
.mobile-lang-options a[hreflang="en"][data-variant="us"]::before { content: '🇺🇸'; }
.mobile-lang-options a[hreflang="fr"]::before { content: '🇫🇷'; }
.mobile-lang-options a[hreflang="de"]::before { content: '🇩🇪'; }
.mobile-lang-options a[hreflang="es"]::before { content: '🇪🇸'; }
.mobile-lang-options a[hreflang="it"]::before { content: '🇮🇹'; }
.mobile-lang-options a[hreflang="pt"]::before { content: '🇵🇹'; }
.mobile-lang-options a[hreflang="nl"]::before { content: '🇳🇱'; }
.mobile-lang-options a[hreflang="sv"]::before { content: '🇸🇪'; }
.mobile-lang-options a[hreflang="da"]::before { content: '🇩🇰'; }
.mobile-lang-options a[hreflang="nb"]::before { content: '🇳🇴'; }
.mobile-lang-options a[hreflang="fi"]::before { content: '🇫🇮'; }
.mobile-lang-options a[hreflang="is"]::before { content: '🇮🇸'; }

.mobile-lang-options a:hover {
    border-color: var(--color-gold-4);
    background: var(--color-gold-3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 12, 15, 0.1);
}

.mobile-lang-options a.active {
    background: var(--color-main);
    color: white;
    border-color: var(--color-main);
}

/* ========================================
   言語通知バナー
   ======================================== */
.language-notice-banner {
    background: linear-gradient(90deg, var(--color-gold-2), var(--color-gold-3));
    border-bottom: 2px solid var(--color-gold-4);
    padding: 12px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* キラキラ装飾 */
.language-notice-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 8s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.language-notice-banner p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent-black);
    position: relative;
    z-index: 1;
}

.language-notice-banner strong {
    display: inline-block;
    margin-right: 8px;
}

/* アイコンデコレーション */
.language-notice-banner p::before {
    content: '🌐 ';
    margin-right: 6px;
    font-size: 16px;
}

/* モバイルで改行 */
@media (max-width: 480px) {
    .language-notice-banner p {
        font-size: 13px;
        line-height: 1.6;
    }
    
    .language-notice-banner strong {
        display: block;
        margin-bottom: 4px;
    }
}