/* common_parts.css - ナビゲ��ション、フッター、CTA、FAQ等の共通パーツ */

/* ========================================
   スティッキーナビゲーション (.sn)
======================================== */
.sn {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.sn-in {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 80px;
}

/* ロゴ画像 */
.nav-logo {
    margin-right: auto;
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo img {
    height: 44px;
    width: auto;
    display: block;
}

/* ナビリンク */
.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
}

.nav-links > li {
    position: static;
}

.nav-links > li > a {
    padding: 0 16px;
    height: 80px;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links > li > a:hover {
    color: #CC0000;
}

/* メインメニューアイコン */
.nav-links > li > a::before {
    font-family: 'Material Symbols Outlined';
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    margin-right: 4px;
}

.nav-links > li:nth-child(1) > a::before { content: "home"; }
.nav-links > li:nth-child(2) > a::before { content: "design_services"; }
.nav-links > li:nth-child(3) > a::before { content: "lightbulb"; }
.nav-links > li:nth-child(4) > a::before { content: "cases"; }
.nav-links > li:nth-child(5) > a::before { content: "apartment"; }

/* カレントページ */
.nav-links > li > a.is-active {
    color: #CC0000;
    box-shadow: inset 0 -3px 0 #CC0000;
}

/* ドロップダウン矢印 */
.nav-links > li > a.has-child::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 6px;
    margin-bottom: 2px;
    transition: transform 0.3s ease;
}

.nav-links > li:hover > a.has-child::after {
    transform: rotate(-135deg);
    margin-bottom: -2px;
}

/* ========================================
   メガドロップダウン
======================================== */
.nav-dropdown {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border-top: 2px solid #CC0000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 24px calc((100% - 1200px) / 2 + 32px);
    gap: 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

@media (min-width: 769px) {
    .nav-links > li:hover > .nav-dropdown {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

.nav-dropdown li {
    width: 25%;
}

.nav-dropdown li a,
.nav-dropdown li .nav-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-dropdown li a:hover {
    background: #f5f5f5;
    color: #CC0000;
}

.nav-dropdown li .nav-current {
    color: #CC0000;
    font-weight: 600;
}

/* サブメニューアイコン */
.nav-dropdown li a::before,
.nav-dropdown li .nav-current::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* アイコンマッピング */
.nav-dropdown li a[href*="product-web"]::before,
.nav-dropdown li .nav-current[data-icon="web"]::before {
    background-image: url(../img/common/icon-web-support.svg);
}
.nav-dropdown li a[href*="product-corporate"]::before {
    background-image: url(../img/common/icon-corporate.svg);
}
.nav-dropdown li a[href*="product-medical"]::before {
    background-image: url(../img/common/icon-medical.svg);
}
.nav-dropdown li a[href*="product-recruit"]::before {
    background-image: url(../img/common/icon-recruit.svg);
}
.nav-dropdown li a[href*="product-lp"]::before {
    background-image: url(../img/common/icon-lp.svg);
}
.nav-dropdown li a[href*="service-operation"]::before {
    background-image: url(../img/common/icon-operation.svg);
}
.nav-dropdown li a[href*="service-seo"]::before {
    background-image: url(../img/common/icon-seo.svg);
}
.nav-dropdown li a[href*="service-analytics"]::before {
    background-image: url(../img/common/icon-analytics.svg);
}
.nav-dropdown li a[href*="feature-webmarketing"]::before,
.nav-dropdown li .nav-current[data-icon="webmarketing"]::before {
    background-image: url(../img/common/icon-web-support.svg);
}
.nav-dropdown li a[href*="feature-sns"]::before {
    background-image: url(../img/common/icon-sns-support.svg);
}
.nav-dropdown li a[href*="feature-webproduction"]::before {
    background-image: url(../img/common/icon-ai-site.svg);
}
.nav-dropdown li a[href*="feature-list"]::before {
    background-image: url(../img/common/icon-update.svg);
}

/* CTAボタン（ナビ） */
.nav-cta {
    margin-left: 16px;
    background: #CC0000;
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.nav-cta:hover {
    background: #a80000;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.3);
}

/* ハンバーガーボタン */
.nav-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 24px;
    color: #2D2D2D;
    line-height: 1;
}

/* ========================================
   モバイルメニュー
======================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        padding: 8px 0;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links > li > a {
        height: auto;
        padding: 12px 24px;
    }

    .nav-dropdown {
        position: static;
        border: none;
        border-top: none;
        box-shadow: none;
        min-width: auto;
        background: #f9f9f9;
        padding: 8px 12px;
        flex-direction: column;
        visibility: hidden;
        opacity: 1;
        transform: none;
        transition: none;
        pointer-events: auto;
    }

    .nav-dropdown.is-open {
        visibility: visible;
    }

    .nav-dropdown li {
        width: 100%;
    }

    .nav-dropdown li a,
    .nav-dropdown li .nav-current {
        padding: 10px 18px 10px 24px;
    }

    .nav-dropdown li a::before,
    .nav-dropdown li .nav-current::before {
        width: 22px;
        height: 22px;
    }

    .nav-cta {
        margin: 8px 24px 12px;
        display: block;
        text-align: center;
    }

    .nav-burger {
        display: block;
    }
}

/* ========================================
   CTAセクション - パターンA（背景画像付き）
======================================== */
.cta-section {
    padding: 80px 0 80px 50%;
    background: url(../img/common/cta_bg.png) no-repeat left center #f1f1f1;
    background-size: 70% auto;
    color: #000;
    text-align: center;
    margin: 1px 0;
}

.cta-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background: #dc000c;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #dc000c;
}

.cta-button:hover {
    background: #b3000a;
    border-color: #b3000a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 0, 12, 0.3);
}

/* CTAセクション - パターンB（グラデーション背景） */
.cta-section.gradient {
    padding: 48px 0;
    background: #f8f9fa;
    color: #333;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.cta-section.gradient .cta-title {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.cta-section.gradient .cta-description {
    color: #666;
    font-size: 0.9rem;
}

.cta-section.gradient .cta-button {
    background: #dc000c;
    color: #fff;
    border-color: #dc000c;
    padding: 12px 32px;
    font-size: 0.9rem;
}

.cta-section.gradient .cta-button:hover {
    background: #b3000a;
    color: #fff;
    border-color: #b3000a;
}

/* CTA Dual */
.cta-dual { background: #f5f5f5; padding: 56px 0; text-align: center; }
.cta-dual__inner { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.cta-dual__lead { font-size: 1.05rem; font-weight: 600; color: #333; line-height: 1.8; margin-bottom: 32px; }
.cta-dual__buttons { display: flex; justify-content: center; gap: 20px; margin-bottom: 16px; }
.cta-dual__btn { display: flex; align-items: center; justify-content: space-between; min-width: 300px; padding: 18px 28px; font-size: 0.95rem; font-weight: 600; text-decoration: none; border-radius: 4px; transition: all 0.3s; }
.cta-dual__btn--primary { background: #CC0000; color: #fff; padding: 22px 32px; box-shadow: 0 4px 16px rgba(204, 0, 0, 0.25); }
.cta-dual__btn--secondary { background: #fff; color: #333; border: 1px solid #ddd; }
.cta-dual__btn-body { display: flex; flex-direction: column; text-align: left; }
.cta-dual__btn-sub { font-size: 0.75rem; font-weight: 400; opacity: 0.6; margin-top: 4px; }
.cta-dual__btn--primary .cta-dual__btn-sub { opacity: 0.8; }
.cta-dual__btn-arrow { margin-left: 16px; font-size: 1.1rem; flex-shrink: 0; transition: transform 0.3s; }
.cta-dual__btn:hover .cta-dual__btn-arrow { transform: translateX(4px); }

@media (max-width: 768px) {
    .cta-dual__buttons { flex-direction: column; align-items: center; }
    .cta-dual__btn { min-width: 280px; width: 100%; max-width: 340px; }

    .cta-section {
        background: url(../img/common/cta_bg.png) no-repeat left bottom #f1f1f1;
        padding: 60px 0;
        background-size: 100% auto;
    }

    .cta-title { font-size: 1.8rem; }
    .cta-description { font-size: 1rem; }
}

@media (max-width: 480px) {
    .cta-title { font-size: 1.6rem; }
    .cta-button { padding: 12px 24px; font-size: 0.9rem; }
}

/* ========================================
   FAQセクション
======================================== */
.faq-section {
    padding: 64px 0;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #dc000c;
    box-shadow: 0 5px 15px rgba(220, 0, 12, 0.1);
}

.faq-question {
    background: #f8f9fa;
    padding: 20px;
    cursor: pointer;
    font-weight: 700;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #dc000c;
    transition: transform 0.3s ease;
}

.faq-question:hover {
    background: #dc000c;
    color: white;
}

.faq-question:hover::after {
    color: white;
}

.faq-question.active::after {
    content: '-';
    transform: translateY(-50%) rotate(0deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.faq-answer.active {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    color: #666;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .faq-section { padding: 60px 0; }
}

@media (max-width: 480px) {
    .faq-question { padding: 15px; font-size: 0.9rem; }
    .faq-answer { padding: 0 15px; }
    .faq-answer.active { padding: 15px; }
}

/* ========================================
   カードスタイル
======================================== */
.service-card {
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    padding: 28px 24px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.service-card-icon {
    width: 56px;
    height: 56px;
    background: #FFF0F0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.service-card-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* ========================================
   サービスナビゲ��ションセクション（共通）
======================================== */
.service-nav-section {
    padding: 60px 0 80px;
    background: #f5f5f5;
}

.service-nav-category {
    font-size: 0.9rem;
    font-weight: 700;
    color: #888;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.service-nav-category:not(:first-child) {
    margin-top: 40px;
}

.service-nav-grid {
    display: grid;
    gap: 15px;
}

.service-nav-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.service-nav-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.service-nav-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.service-nav-item:hover {
    border-color: #dc000c;
    box-shadow: 0 4px 15px rgba(220,0,12,0.1);
}

.service-nav-item-current {
    background: #dc000c;
    border-color: #dc000c;
    color: #fff;
    pointer-events: none;
    cursor: default;
}

.service-nav-item-current:hover {
    background: #dc000c;
    border-color: #dc000c;
    box-shadow: none;
}

.service-nav-item-current .service-nav-title,
.service-nav-item-current .service-nav-desc {
    color: #fff;
}

.service-nav-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.service-nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-nav-item-current .service-nav-icon img {
    filter: brightness(0) invert(1);
}

.service-nav-content {
    flex: 1;
    min-width: 0;
}

.service-nav-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.4;
}

.service-nav-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 1024px) {
    .service-nav-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .service-nav-section { padding: 50px 0 60px; }
    .service-nav-grid-2,
    .service-nav-grid-4 { grid-template-columns: 1fr; }
    .service-nav-item { padding: 15px; gap: 12px; }
    .service-nav-icon { width: 32px; height: 32px; }
    .service-nav-title { font-size: 0.9rem; }
    .service-nav-desc { font-size: 0.75rem; }
    .service-nav-category { font-size: 0.85rem; }
}

/* ========================================
   ページトップへ戻るボタン
======================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #1A3A5C;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #CC0000;
}

.back-to-top .material-symbols-outlined {
    font-size: 24px;
}

/* ========================================
   サイトフッター
======================================== */
.site-footer { background: #1A3A5C; color: #ccc; padding: 48px 0 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px; display: flex; gap: 48px; }
.footer-brand { flex-shrink: 0; min-width: 210px; }
.footer-logo img { height: 40px; filter: brightness(0) invert(1); }
.footer-address { font-size: 0.78rem; line-height: 1.8; color: #9aa3b0; margin-top: 16px; }
.footer-address a { color: inherit; text-decoration: none; }
.footer-nav-simple { flex: 1; display: flex; align-items: center; justify-content: flex-end; }
.footer-nav-simple ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav-simple ul li a { font-size: 0.82rem; color: #9aa3b0; text-decoration: none; transition: color 0.2s; }
.footer-nav-simple ul li a:hover { color: #fff; }
.footer-copy { background: rgba(0,0,0,0.25); text-align: center; font-size: 0.75rem; color: #9aa3b0; padding: 16px 20px; }

@media (max-width: 768px) {
    .footer-inner { flex-direction: column; gap: 32px; }
    .footer-brand { width: 100%; }
    .footer-nav-simple { justify-content: flex-start; }
    .footer-nav-simple ul { gap: 6px 16px; }
}

/* ========================================
   フッター (.fmin - minimal) ※一部ページ用
======================================== */
.fmin {
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    padding: 28px 24px;
}

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

.fmin-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.fmin-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.fmin-links {
    display: flex;
    gap: 18px;
    padding-left: 24px;
    border-left: 1px solid #d0d0d0;
}

.fmin-links a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fmin-links a:hover {
    color: #2D2D2D;
}

.fmin-copy {
    font-size: 12px;
    color: #999;
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

.fmin-address {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.5rem;
    line-height: 1.6;
}

.fmin-address a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   クッキー同意バナー
======================================== */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid #e0e0e0; z-index: 9999; padding: 14px 20px; box-shadow: 0 -2px 12px rgba(0,0,0,0.08); }
.cookie-banner__inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cookie-banner__text { flex: 1; font-size: 0.82rem; line-height: 1.6; color: #666; min-width: 200px; }
.cookie-banner__text a { color: #333; text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner__btn { padding: 7px 18px; border-radius: 4px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: opacity 0.2s; }
.cookie-banner__btn--accept { background: #f5f5f5; color: #333; border: 1px solid #ccc; }
.cookie-banner__btn--decline { background: transparent; color: #999; border: 1px solid #e0e0e0; }
.cookie-banner__btn:hover { opacity: 0.75; }
