/* ====================================
   株式会社烏枢 (Usu Inc.)
   Rich Modern Style - Complete Ver.
   ==================================== */

/* --- Fonts & Base --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap');

:root {
    --primary-color: #0b1c3c; /* 濃紺 */
    --accent-color: #c5a059;  /* ゴールド */
    --text-color: #444444;
    --bg-gray: #f5f7fa;
    --white: #ffffff;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    line-height: 1.8;
    letter-spacing: 0.05em;
}

h1, h2, h3, h4 {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.4;
}

/* --- Layout Utils --- */
.section { padding: 100px 0; position: relative; }
.bg-gray { background-color: var(--bg-gray); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
}
.section-title span {
    display: block; font-size: 1rem; font-weight: 400; color: var(--accent-color);
    margin-top: 10px; letter-spacing: 0.2em;
}
.section-desc { max-width: 600px; margin: 0 auto 60px; }

/* Buttons */
.btn-arrow a, .link-arrow-white a {
    text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; transition: 0.3s;
}
.btn-arrow a { color: var(--primary-color); border-bottom: 2px solid var(--accent-color); padding-bottom: 5px; }
.btn-arrow a:hover { gap: 15px; color: var(--accent-color); }
.link-arrow-white a { color: var(--white); }
.link-arrow-white a:hover { gap: 15px; opacity: 0.8; }

.btn-outline-dark {
    display: inline-block; padding: 15px 50px; border: 2px solid var(--primary-color);
    color: var(--primary-color); text-decoration: none; font-weight: 700; transition: 0.3s;
}
.btn-outline-dark:hover { background: var(--primary-color); color: var(--white); }

.btn-contact a {
    display: inline-block; padding: 15px 40px; background: var(--primary-color);
    color: var(--white); text-decoration: none; font-weight: bold; border-radius: 50px;
    box-shadow: 0 5px 15px rgba(11,28,60,0.3); transition: 0.3s;
}
.btn-contact a:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(11,28,60,0.4); }

/* --- Hero Slider (Box Style Fix) --- */
.hero-slider {
    position: relative; height: 85vh; min-height: 600px; overflow: hidden;
    display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white);
}
.slider-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.slide-item {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; opacity: 0;
    animation: slideFade 12s infinite; /* 2枚なら12秒くらいが自然 */
}
.slide-item:nth-child(1) { animation-delay: 0s; }
.slide-item:nth-child(2) { animation-delay: 6s; }
/* .slide-item:nth-child(3) { animation-delay: 12s; } 3枚目がある場合 */

@keyframes slideFade {
    0% { opacity: 0; transform: scale(1.1); } 5% { opacity: 1; transform: scale(1); }
    45% { opacity: 1; transform: scale(1); } 50% { opacity: 0; transform: scale(1.1); } 100% { opacity: 0; }
}
.slider-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.2); z-index: 1; }

/* 修正：文字を見やすくする白ボックス */
.hero-content {
    position: relative; z-index: 2;
    background: rgba(255, 255, 255, 0.9); /* 白背景 */
    padding: 50px 40px;
    border-radius: 4px;
    max-width: 680px;
    margin: 0 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}
.hero-title {
    font-size: 3rem; font-weight: 900; margin-bottom: 20px; line-height: 1.3;
    color: var(--primary-color) !important; text-shadow: none !important;
}
.hero-subtitle {
    font-size: 1.1rem; font-weight: 700; letter-spacing: 0.2em;
    color: var(--accent-color) !important; text-shadow: none !important;
}

/* --- News --- */
.news-list { max-width: 900px; margin: 0 auto; }
.news-item { 
    border-bottom: 1px solid #ddd; 
    padding: 15px 0; 
    display: block;
    position: relative;
}
.news-date, .news-tag {
    display: inline-block; 
    margin-right: 15px; 
    margin-bottom: 5px; 
}
.news-title { 
    margin: 0; 
    font-weight: 500;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 2px;
}
/* 日付の色を強調（白背景の上で強調） */
.news-date { 
    font-weight: 700; 
    color: var(--primary-color); 
}
.news-tag { 
    background: var(--accent-color);
    color: #fff; 
    font-size: 0.8rem; 
    padding: 3px 10px; 
    border-radius: 2px; 
}
.news-title a { 
    color: var(--white) !important; 
    text-decoration: none; 
}
.news-more { margin-top: 20px; font-size: 0.9rem; font-weight: 700; }

/* --- About --- */
.about-grid { gap: 40px; }
.section-title-left { font-size: 2.2rem; font-weight: 900; margin-bottom: 10px; border-left: 5px solid var(--accent-color); padding-left: 20px; }
.about-img img { box-shadow: 20px 20px 0 rgba(0,0,0,0.1); border-radius: 8px; }

/* --- Aboutセクションのテキストボックスデザイン --- */

/* 左側のテキストが入っているカラム全体を白いボックスにする */
.about-section .wp-block-column:first-child {
    background-color: var(--white); /* 白背景を追加 */
    padding: 40px; /* ボックスの内側に余白を追加 */
    border-radius: 8px; /* 角丸を適用 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* 影を適用 */
}

/* 既存のタイトルスタイルはそのまま使用（padding-left: 20px;が効いているため） */

/* モバイル対応：画面幅が狭い場合は角丸と左右のパディングを解除 */
@media (max-width: 768px) {
    .about-section .wp-block-column:first-child {
        padding: 30px 20px; /* 縦方向の余白を少し減らす */
        border-radius: 0; /* 角丸を解除し、画面端まで広げる */
    }
}

/* --- Service (4 Cols with Images) --- */
.service-overlay-grid.service-grid-4 {
    display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 20px;
}
.service-overlay-item { position: relative; overflow: hidden; height: 450px; border-radius: 4px; }
.service-bg-img img { height: 100%; object-fit: cover; transition: 0.6s; width: 100%; }
.service-overlay-item:hover .service-bg-img img { transform: scale(1.1); }
.service-overlay-content {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(11,28,60,0.3), rgba(11,28,60,0.9)); /* グラデーションで見やすく */
    color: var(--white);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 25px; transition: 0.3s;
}
.service-overlay-item:hover .service-overlay-content { background: rgba(11,28,60,0.85); } /* ホバー時は濃く */
.icon-box { font-size: 2rem; color: var(--accent-color); margin-bottom: 15px; }
.service-list-sm { list-style: none !important; padding: 0 !important; margin: 10px 0 20px !important; }
.service-list-sm li { font-size: 0.85rem; color: rgba(255,255,255,0.95); border-bottom: 1px solid rgba(255,255,255,0.3); padding: 5px 0 5px 15px; position: relative; }
.service-list-sm li::before { content: '・'; position: absolute; left: 0; }
.service-overlay-item:hover .service-overlay-content {
    background: rgba(255, 255, 255, 0.9); 
}

/* ホバー時に文字色が読めるように色を調整 */
.service-overlay-item:hover .service-overlay-content h3,
.service-overlay-item:hover .service-overlay-content .icon-box {
    color: var(--primary-color); /* タイトルとアイコンを濃紺に */
}

/* ホバー時にリストの文字色を調整 */
.service-overlay-item:hover .service-overlay-content {
    color: var(--text-color); 
}
.service-overlay-item:hover .service-list-sm li { 
    color: var(--text-color); 
    border-bottom-color: rgba(68, 68, 68, 0.3); 
}

/* ホバー時に「詳しく見る」のリンクの色を調整 */
.service-overlay-item:hover .link-arrow-white a { 
    color: var(--primary-color); 
}
/* --- サービスボックス文字色切り替え (最終版) --- */

/* 1. ホバー前のタイトル色を明示的に白に設定し、アニメーションを追加 */
.service-overlay-content h3 {
    color: var(--white); 
    transition: color 0.3s ease;
}
.service-overlay-item:hover .service-overlay-content {
    background: rgba(255, 255, 255, 0.9); 
    color: var(--text-color);
}

/* 3. ホバー時のタイトル/アイコンの色を濃紺に設定 */
.service-overlay-item:hover .service-overlay-content h3,
.service-overlay-item:hover .service-overlay-content .icon-box {
    color: var(--primary-color); 
}

/* 4. ホバー時のリストの文字色・ボーダーの色を調整 */
.service-overlay-item:hover .service-list-sm li { 
    color: var(--text-color);
    border-bottom-color: rgba(68, 68, 68, 0.3);
}
/* 5. ホバー時のリンクの色を濃紺に調整 */
.service-overlay-item:hover .link-arrow-white a { 
    color: var(--primary-color); 
}

/* --- その他のサービスサイトリンク (バナー) --- */
.other-services-section {
    padding: 60px 0;
}
.service-link-grid {
    gap: 50px; /* バナー間の間隔 */
}
.service-link-item {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 5px 20px rgba(255,255,255,0.5);
    transition: 0.3s;
}
.service-link-item a {
    display: block;
    text-decoration: none;
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.service-banner-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease; /* ホバーで拡大するアニメーションを準備 */
    min-height: 250px; /* 最小高さを設定して高さを安定させる */
    object-fit: cover;
}

/* ホバーアニメーション: 浮上と拡大 */
.service-link-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255,255,255,0.5);
}
.service-link-item:hover .service-banner-img img {
    transform: scale(1.05);
}

/* オーバーレイのデザイン */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0, 0.5), rgba(11,28,60, 0.3));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}
.banner-overlay h3 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 5px;
}
.banner-overlay p {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0;
}

/* --- モバイル対応 --- */
@media (max-width: 768px) {
    .service-link-grid {
        display: block !important; /* 縦積み */
    }
    .service-link-item {
        margin-bottom: 20px;
    }
}

/* --- Works --- */
.works-main { position: relative; margin-bottom: 20px; overflow: hidden; border-radius: 4px; }
.work-img-lg img, .work-item-sm img { transition: 0.6s; width: 100%; display: block; object-fit: cover; }
.works-main:hover .work-img-lg img { transform: scale(1.05); }
.work-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: var(--white);
}
.work-cat { color: var(--accent-color); font-size: 0.9rem; margin-bottom: 5px; font-weight: 700; }
.work-title { font-size: 1.5rem; margin: 0; color: #fff; }
.works-sub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.work-item-sm { position: relative; overflow: hidden; border-radius: 4px; }
.work-item-sm:hover img { transform: scale(1.1); }
.work-item-sm img { height: 200px; }
.work-info-sm {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 10px 15px;
    background: rgba(0,0,0,0.7); color: var(--white); font-size: 0.9rem; font-weight: 700;
}

/* --- Flow --- */
.flow-grid { gap: 30px; }
.flow-item { background: #fff; padding: 30px 20px; border-top: 3px solid var(--accent-color); box-shadow: 0 5px 15px rgba(0,0,0,0.05); position: relative; }
.flow-step { color: var(--accent-color); font-size: 0.9rem; font-weight: 900; margin-bottom: 5px; }
.flow-head { font-size: 1.2rem; margin-bottom: 15px; }
@media (min-width: 768px) {
    .flow-item:not(:last-child)::after {
        content: '\f054'; font-family: "Font Awesome 6 Free"; font-weight: 900;
        position: absolute; right: -25px; top: 50%; transform: translateY(-50%); color: #ddd; font-size: 1.2rem;
    }
}

/* --- FAQ --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid #ddd; border-radius: 4px; padding: 20px; margin-bottom: 20px; background: #fff; }
.faq-q { font-weight: 700; color: var(--primary-color); margin-bottom: 10px; padding-left: 1.5em; text-indent: -1.5em; }
.faq-q::before { content: 'Q. '; color: var(--accent-color); font-size: 1.2rem; }
.faq-a { margin: 0; padding-left: 1.5em; font-size: 0.95rem; color: #666; border-top: 1px dashed #eee; padding-top: 10px; }

/* --- Company --- */
.company-content { text-align: center; max-width: 800px; margin: 0 auto; }

/* --- Mobile --- */
@media (max-width: 1024px) {
    .service-overlay-grid.service-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-content { padding: 30px; }
    .about-grid { flex-direction: column-reverse; }
    .works-sub-grid { grid-template-columns: repeat(2, 1fr); }
    .service-overlay-grid.service-grid-4 { grid-template-columns: 1fr !important; }
    .service-overlay-item { height: 350px; }
}
/* ====================================
   魔法のスパイス (Scroll Animation)
   ==================================== */

.scroll-spice {
    opacity: 0;
    transform: translateY(40px); 
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

/* 2. 画面に入った時の状態（フワッと元の位置へ） */
.scroll-spice.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-title.scroll-spice,
.hero-subtitle.scroll-spice {
    transition-delay: 0.5s;
}

/* --- 修正点1: NEWSセクションのリスト全体に白背景を追加 --- */
.news-list {
    max-width: 900px;
    margin: 0 auto 30px; 
    background: var(--white);
    padding: 20px 30px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* company-content ボックスにも白背景を強制適用 */
.company-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: var(--white) !important;
    padding: 40px 30px; 
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}

/* --- 事業内容ページ用 CSS --- */
/* 目次（アンカーリンク）をボックス化 */
.anchor-links {
    max-width: 9000px;
    margin: 40px auto 60px;
    background: var(--bg-gray); 
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 30px;
}
.anchor-links p {
    margin: 0;
}
.anchor-links a {
    display: inline-block;
    color: var(--primary-color); 
    font-weight: 700;
    text-decoration: none;
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}
/* ホバー時のデザイン */
.anchor-links a:hover {
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

/* 事業内容リスト全体に白背景を追加 */
.service-detail-list {
    background: var(--white);
    padding: 20px 20px; /* 内側の余白 */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* モバイル対応：内側の余白を調整し、角丸をなくして端まで広げる */
@media (max-width: 768px) {
    .service-detail-list {
        padding: 40px 20px;
        border-radius: 0; 
    }
}

/* 詳細リストのデザイン調整 */
.check-list {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}
.check-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
/* ゴールドのチェックマーク */
.check-list li::before {
    content: '\f058'; 
    font-family: "Font Awesome 6 Free"; 
    font-weight: 900;
    color: var(--accent-color); 
    position: absolute;
    left: 0;
    top: 0;
}

/* --- 会社概要ページ (COMPANY) 用 CSS --- */

/* 共通スタイル: 各セクションコンテナに白背景と装飾を追加 */
.message-section,
.philosophy-section,
.profile-section,
.access-section {
    background: var(--white); /* 白背景 */
    padding: 60px; /* 内側の余白 */
    margin-bottom: 40px; /* セクション間の余白 */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* 企業理念セクションの調整 */
.philo-grid {
    gap: 30px;
    margin-top: 30px;
}

.philo-grid .wp-block-column {
    padding: 20px;
    border-top: 3px solid var(--accent-color); /* ゴールドのライン */
    background-color: var(--bg-gray); /* わずかにグレーにしてボックスを強調 */
    border-radius: 4px;
}

.philo-grid h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* 会社情報リスト (dl) のスタイル調整 */
.company-list {
    margin-top: 40px;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.company-list dt {
    background: var(--bg-gray); /* 見出し（項目名）の背景をグレーに */
    padding: 15px 20px;
    font-weight: 700;
    color: var(--primary-color);
    border-top: 1px solid #ddd;
}
.company-list dd {
    padding: 10px 20px 10px 20px;
    border-bottom: 1px solid #ddd;
    margin-left: 0;
}

/* マップのフレーム調整 */
.map-frame {
    margin-top: 30px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #eee; /* マップの境界線 */
}

/* --- モバイル対応 --- */
@media (max-width: 768px) {
    /* メインセクションの余白と角丸を調整 */
    .message-section,
    .philosophy-section,
    .profile-section,
    .access-section {
        padding: 30px 20px;
        margin-bottom: 20px;
        border-radius: 0;
    }
    
    /* 企業理念を縦積みに */
    .philo-grid {
        display: block !important;
    }
    .philo-grid .wp-block-column {
        margin-bottom: 20px;
    }
}

/* --- お問い合わせページ (CONTACT) 用 CSS --- */
.contact-form-section {
    background: var(--white); 
    padding: 40px;
    margin: 20px auto;
    max-width: 900px; /* フォームの幅を調整 */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
/* --- モバイル対応 --- */
@media (max-width: 768px) {
    .contact-form-section {
        padding: 30px 20px;
        margin: 20px 0; /* モバイルではマージンを左右0に */
        border-radius: 0;
    }
}
