/* 
 * サイトヘッダー（グローバルナビゲーション）専用スタイル
 * ファイル: header.css
 * 対象: header.php
 */

/* ===== ヘッダーメイン ===== */
.header-main {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(31, 78, 121, 0.1);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 28px;
}

/* ===== サイトブランディング ===== */
.site-branding {
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.site-title a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.company-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.company-name {
    font-size: 20px;
    font-weight: 700;
    color: #1f4e79;
    line-height: 1;
    letter-spacing: -0.02em;
}

.company-tagline {
    font-size: 11px;
    font-weight: 500;
    color: #e74c3c;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ===== メインナビゲーション ===== */

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* .nav-menu定義はstyle.cssに統一 */

.header-actions {
    display: flex;
    align-items: center;
}

.header-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary-dark, #3a7bc8) 0%, var(--color-primary, #4a8dd1) 100%);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    box-shadow: 0 18px 35px rgba(17, 65, 111, 0.28);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.header-contact-btn i {
    font-size: 13px;
}

.header-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(17, 65, 111, 0.32);
}

.mobile-menu-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(17, 65, 111, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #12325f;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(13, 30, 60, 0.12);
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 30, 60, 0.18);
    border-color: rgba(17, 65, 111, 0.3);
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid rgba(17, 65, 111, 0.55);
    outline-offset: 3px;
}

.mobile-menu-toggle.active {
    transform: translateY(-1px);
}

.hamburger {
    position: relative;
    z-index: 1;
    width: 22px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background-color: currentColor;
    opacity: 1;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== モバイルメニュートグル ===== */
/* ===== モバイルメニューオーバーレイ ===== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(71, 126, 192, 0.42), transparent 55%),
        linear-gradient(150deg, rgba(8, 15, 28, 0.92) 0%, rgba(8, 18, 36, 0.88) 60%, rgba(8, 18, 36, 0.82) 100%);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-menu-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 40%);
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    height: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 36px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.mobile-logo:hover {
    opacity: 0.8;
}

.mobile-company-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.mobile-company-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-logo .company-name {
    font-size: 18px;
    font-weight: 700;
    color: rgba(233, 241, 255, 0.92);
    display: block;
}

.mobile-logo .company-tagline {
    font-size: 10px;
    font-weight: 500;
    color: rgba(231, 116, 95, 0.75);
    letter-spacing: 0.1em;
}

.mobile-menu-close {
    background: rgba(233, 241, 255, 0.06);
    border: 1px solid rgba(233, 241, 255, 0.12);
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(233, 241, 255, 0.12);
    border-color: rgba(233, 241, 255, 0.24);
}

.close-icon {
    width: 20px;
    height: 20px;
    position: relative;
    display: block;
}

.close-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(233, 241, 255, 0.85);
    border-radius: 1px;
    box-shadow: 0 8px 16px rgba(15, 32, 52, 0.35);
}

.close-line:nth-child(1) {
    transform: translateY(-50%) rotate(45deg);
}

.close-line:nth-child(2) {
    transform: translateY(-50%) rotate(-45deg);
}

.mobile-nav {
    flex: 1;
    padding: 12px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(233, 241, 255, 0.2) transparent;
}

.mobile-nav::-webkit-scrollbar {
    width: 6px;
}

.mobile-nav::-webkit-scrollbar-thumb {
    background: rgba(233, 241, 255, 0.2);
    border-radius: 999px;
}

.mobile-nav::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav-menu li {
    border: none;
    position: relative;
}

.mobile-nav-menu a {
    color: rgba(233, 241, 255, 0.92);
    text-decoration: none;
    padding: 16px 18px;
    display: block;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: rgba(233, 241, 255, 0.05);
    border: 1px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.mobile-nav-menu a:hover {
    transform: translateX(6px);
    border-color: rgba(233, 241, 255, 0.18);
    background: rgba(233, 241, 255, 0.12);
}

.mobile-contact-info {
    padding: 12px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mobile-phone {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: rgba(233, 241, 255, 0.92);
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}

.mobile-phone i {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px rgba(233, 241, 255, 0.12);
}

.mobile-contact-btn {
    background: linear-gradient(135deg, #ff7a45, #ffb347);
    color: white;
    padding: 14px 24px;
    border-radius: 14px;
    text-align: center;
    margin-top: 12px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 14px 28px rgba(255, 142, 80, 0.35);
}

.mobile-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(255, 142, 80, 0.4);
}

.mobile-search-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.mobile-search-form input:focus {
    outline: none;
    border-color: #4A8DD1;
}

.mobile-menu .social-links a {
    color: #4A8DD1;
    font-size: 20px;
    transition: all 0.3s ease;
}

/* ===== レスポンシブデザイン ===== */
@media (max-width: 1024px) {
    /* .nav-menu定義はstyle.cssに統一 */
    
    .header-actions {
        gap: 20px;
    }
    
    .header-phone .phone-number {
        display: none;
    }
}

@media (min-width: 769px) {
    /* デスクトップ表示時は常にメインナビゲーションを表示 */
    .main-navigation {
        display: flex !important;
    }
    
    /* モバイルメニュー要素を非表示 */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 70px;
        padding: 0 16px;
    }
    
    .company-name {
        font-size: 18px;
    }
    
    .company-tagline {
        font-size: 10px;
    }
    
    /* モバイル表示時はメインナビゲーションを非表示 */
    .main-navigation {
        display: none !important;
    }
    
    /* モバイルメニュートグルを表示 */
    .mobile-menu-toggle {
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .header-container {
        height: 60px;
    }
    
    .company-name {
        font-size: 16px;
    }
    
    .company-tagline {
        font-size: 9px;
    }
}
