/*
 * site-layout.css
 * Version: 3.0
 * 既存 tsuginohi.com のヘッダー/フッターCSS
 * v3.0: エンタープライズ品質に洗練化
 */

/* ===================================
   共通CSS変数（既存テーマ由来 + 改善）
=================================== */
:root {
    /* 企業カラー */
    --primary-red: #C62828;            /* より深みのある赤 */
    --primary-yellow: #D4AD3C;
    --primary-green: #1B5E20;
    --deep-green: #1B5E20;
    --dark-navy: #1A2B48;

    /* ニュートラルカラー */
    --white: #ffffff;
    --light-gray: #F7F8FA;
    --medium-gray: #E8EBF0;
    --gray: #6c757d;

    /* 補完色 */
    --text-dark: #1A2B48;
    --text-medium: #495057;

    /* 8ポイントグリッドシステム */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-xxxl: 64px;
    --space-xxxxl: 80px;

    /* フォントシステム */
    --font-japanese: 'Noto Sans JP', sans-serif;
    --font-english: 'Poppins', sans-serif;
    --font-serif: 'Noto Serif JP', serif;

    /* フォントサイズ */
    --font-size-sm: 12px;
    --font-size-base: 13px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;

    /* フォントウェイト */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;

    /* シャドウ */
    --shadow-light: 0 1px 4px rgba(0,0,0,0.04);
    --shadow-medium: 0 4px 16px rgba(0,0,0,0.08);

    /* ボーダーラジアス */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
}


/* ===================================
   ヘッダー — 繊細・クリーン
=================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    max-width: 1120px;
    margin: 0 auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transform: scale(0.85);
    transition: opacity 0.3s ease;
}

.header .logo:hover {
    opacity: 0.7;
}

.header .logo-container {
    width: 220px;
    height: 55px;
    background-image: url('../img/common/logo/tsuginohi_logo_20250723_fin_512px.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: var(--radius-sm);
}

.header .nav {
    align-items: center;
    gap: 2px;
}

.header .nav-item {
    padding: 8px 14px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.02em;
}

.header .nav-item::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--deep-green);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header .nav-item:hover::after {
    width: calc(100% - 28px);
}

.header .nav-item:hover {
    color: var(--deep-green);
}

.header .nav-cta {
    background: var(--dark-navy);
    color: var(--white) !important;
    font-weight: var(--font-weight-medium);
    font-size: 12px;
    letter-spacing: 0.06em;
    padding: 10px 20px;
    margin-left: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.header .nav-cta::after {
    display: none;
}

.header .nav-cta:hover {
    background: var(--secondary-color-light, #263B5E);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

@media (min-width: 1024px) {
    .header .nav {
        display: flex;
        align-items: center;
        gap: 2px;
    }
}

@media (max-width: 1023px) {
    .header .nav {
        display: none;
        align-items: center;
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .header .logo {
        transform: scale(0.5);
        margin-left: -30px;
    }
}


/* ===================================
   フッター — 重厚・知的
=================================== */
.footer {
    background: var(--dark-navy);
    color: white;
    padding: 72px 0 40px;
    position: relative;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* 上部の繊細なアクセントライン */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-color, #B8942E) 50%, transparent 100%);
    opacity: 0.4;
    z-index: 2;
}

.footer .container {
    max-width: 1120px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xxl);
}

.footer-logo-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.footer-logo {
    width: 200px;
    height: 50px;
}

.footer-logo a {
    display: block;
    width: 100%;
    height: 100%;
    background-image: url('../img/common/logo/tsuginohi_logo_20250718_fin_bk.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left;
    transition: opacity 0.3s ease;
}

.footer-logo a:hover {
    opacity: 0.7;
}

.footer-company-info {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    line-height: 1.8;
    letter-spacing: 0.02em;
}

.footer-nav {
    display: flex;
    gap: var(--space-xxl);
}

.footer-nav-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.95);
}

.footer-info {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--space-lg);
    color: rgba(255, 255, 255, 0.35);
}

.footer-info p {
    margin-bottom: var(--space-xs);
    font-size: 11px;
    letter-spacing: 0.04em;
}

@media (max-width: 1024px) {
    .footer-content {
        flex-direction: column;
        gap: var(--space-xl);
    }
}

@media (max-width: 768px) {
    .footer-nav {
        flex-direction: column;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .footer-logo {
        width: 180px;
        height: 45px;
    }
}

@media (min-width: 1536px) {
    .footer .container {
        max-width: 1120px;
    }
}


/* ===================================
   トップへ戻るボタン — ミニマル
=================================== */
#to_top {
    position: fixed;
    right: 32px;
    bottom: 32px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

#to_top.visible {
    opacity: 1;
}

#to_top a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--dark-navy);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#to_top a:hover {
    background: var(--deep-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#to_top a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -25%) rotate(45deg);
    width: 10px;
    height: 10px;
    border-top: 1.5px solid white;
    border-left: 1.5px solid white;
}


/* ===================================
   前のページへ戻るボタン
=================================== */
#back_btn {
    position: fixed;
    left: 32px;
    bottom: 32px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

#back_btn.visible {
    opacity: 1;
}

#back_btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 14px;
    height: 44px;
    background: var(--dark-navy);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
    font-size: 13px;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
    letter-spacing: 0.06em;
    white-space: nowrap;
    text-decoration: none;
}

#back_btn a::before {
    content: '＜';
    font-size: 12px;
    line-height: 1;
    color: #fff;
}

#back_btn a::after {
    content: '戻る';
}

#back_btn a:hover {
    background: var(--deep-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff;
}

@media screen and (max-width: 1023px) {
    #back_btn {
        display: none;
    }
}


/* ===================================
   モバイルメニュー
=================================== */
#mobile-menu .logo {
    transform: scale(0.85);
}

#mobile-menu .logo-container {
    width: 220px;
    height: 55px;
    background-image: url('../img/common/logo/tsuginohi_logo_20250723_fin_512px.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ハンバーガーボタン is-active 時 */
#menu-btn.is-active {
    background: white !important;
}

#menu-btn.is-active span {
    background: var(--primary-red) !important;
}
