/* ==========================================================================
   0. デザイントークン
   ========================================================================== */
:root {
    --color-primary: #005bac;
    --color-primary-dark: #00447f;
    --color-primary-light: #eaf2fb;
    --color-text: #2a2e34;
    --color-text-muted: #6b7280;
    --color-border: #e8e8ec;
    --color-bg-alt: #f7f8fa;
    --shadow-sm: 0 1px 3px rgba(20, 30, 50, 0.07);
    --shadow-md: 0 6px 18px rgba(20, 30, 50, 0.09);
    --radius: 4px;
    --radius-sm: 3px;
}

/* ==========================================================================
   1. 基本設定（リセット・共通）
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    line-height: 1.8;
    color: var(--color-text);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ==========================================================================
   2. ヘッダー（ナビゲーション）
   ========================================================================== */
header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.35rem;
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-list a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 8px 4px;
    margin: 0 10px;
    transition: color 0.25s;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 2px;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-list a:hover {
    color: var(--color-primary);
}

.nav-list a:hover::after {
    transform: scaleX(1);
}

/* ==========================================================================
   3. メインビジュアル（各ページ個別の背景設定）
   ========================================================================== */
.hero-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0 0 0 0;
    left: 0;
    width: 6px;
    background: var(--color-primary);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
    animation: heroFadeUp 0.9s ease both;
}

.hero-content h2 {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.hero-content h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 18px auto 0;
    background: #fff;
    opacity: 0.85;
    border-radius: 2px;
}

.hero-content p {
    font-size: 0.95rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.9;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 各ページごとの背景画像と高さの指定 */
/* rgba(0,0,0,0.4) は画像に重ねる黒いフィルターです */

/* ホーム（index.html） — 背景は .hero-slide で複数枚スライド（手動切替） */
.home-hero {
    height: 520px;
    touch-action: manipulation;
    cursor: grab;
    user-select: none;
}

.home-hero:active {
    cursor: grabbing;
}

.home-hero .hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.home-hero .hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.home-hero .hero-slide.active {
    opacity: 1;
}

.home-hero .hero-slide-1 {
    background-image: linear-gradient(rgba(0, 10, 30, 0.45), rgba(0, 10, 30, 0.45)), url('honsha.jpg');
}

.home-hero .hero-slide-2 {
    background-image: linear-gradient(rgba(0, 10, 30, 0.45), rgba(0, 10, 30, 0.45)), url('contact_bg.jpg');
}

.home-hero .hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 2px;
    transition: background 0.2s, transform 0.15s;
}

.home-hero .hero-nav:hover {
    background: rgba(255, 255, 255, 0.38);
}

.home-hero .hero-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.home-hero .hero-nav-prev {
    left: 12px;
}

.home-hero .hero-nav-next {
    right: 12px;
}

@media (max-width: 480px) {
    .home-hero .hero-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .home-hero .hero-nav-prev {
        left: 8px;
    }
    .home-hero .hero-nav-next {
        right: 8px;
    }
}

.home-hero .hero-content {
    user-select: text;
    cursor: auto;
}

/* 事業内容（service.html） — 背景は .hero-slide で3枚を自動クロスフェード */
.service-hero {
    height: 560px;
}

.service-hero .hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.service-hero .hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: serviceHeroCrossfade 12s infinite;
}

.service-hero .hero-slide-1 {
    background-image: linear-gradient(rgba(0, 10, 30, 0.45), rgba(0, 10, 30, 0.45)), url('service_top1.jpg');
    animation-delay: 0s;
}

.service-hero .hero-slide-2 {
    background-image: linear-gradient(rgba(0, 10, 30, 0.45), rgba(0, 10, 30, 0.45)), url('service_top2.jpg');
    animation-delay: -4s;
}

.service-hero .hero-slide-3 {
    background-image: linear-gradient(rgba(0, 10, 30, 0.45), rgba(0, 10, 30, 0.45)), url('service_top3.jpg');
    animation-delay: -8s;
}

@keyframes serviceHeroCrossfade {
    0% {
        opacity: 0;
    }
    7% {
        opacity: 1;
    }
    33% {
        opacity: 1;
    }
    40% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-hero .hero-slide {
        animation: none;
    }
    .service-hero .hero-slide-1 {
        opacity: 1;
    }
}

/* 会社概要（company.html） */
.company-hero {
    background-image: linear-gradient(rgba(0, 10, 30, 0.45), rgba(0, 10, 30, 0.45)), url('company_bg.jpg');
    height: 320px;
}

/* お問い合わせ（contact.html） */
.contact-hero {
    background-image: linear-gradient(rgba(0, 10, 30, 0.45), rgba(0, 10, 30, 0.45)), url('contact_bg.jpg');
    height: 320px;
}

@media (max-width: 600px) {
    .home-hero {
        height: 400px;
    }
    .service-hero {
        height: 380px;
    }
    .company-hero,
    .contact-hero {
        height: 240px;
    }
    .hero-content h2 {
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   4. コンテンツエリア共通
   ========================================================================== */
.content-area {
    padding: 100px 0;
}

@media (max-width: 768px) {
    .content-area {
        padding: 70px 0;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 50px 0;
    }
}

.btn {
    display: inline-block;
    padding: 13px 36px;
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.25s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--color-primary-dark);
}

.btn:focus-visible,
.nav-list a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* 京セラ風「詳しく見る ›」丸アイコン付きリンク（ヒーロー内のCTA） */
.hero-content .btn {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    background: none;
    border-radius: 0;
}

.hero-content .btn::after {
    content: "\2192";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    font-size: 1rem;
    transition: transform 0.25s, background 0.25s;
}

.hero-content .btn:hover {
    background: none;
}

.hero-content .btn:hover::after {
    background: var(--color-primary-dark);
    transform: translateX(4px);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.25em;
    margin-bottom: 40px;
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    background: var(--color-primary);
}

/* ==========================================================================
   5. 事業内容ページ用（カードレイアウト）
   ========================================================================== */
.service-intro {
    max-width: 820px;
    margin: 0 auto 60px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.02rem;
    line-height: 2;
}

.service-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.service-card {
    flex: 1;
    min-width: 300px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.card-img {
    width: 100%;
    height: 210px;
    background-color: var(--color-bg-alt);
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-img img {
    transform: scale(1.07);
}

.card-body {
    padding: 26px 24px 28px;
}

.category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.category::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--color-primary);
}

.card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card-body p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   6. 会社概要・お問い合わせ用スタイル
   ========================================================================== */
/* テーブル */
.table-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.company-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table th, .company-table td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

.company-table th {
    background-color: var(--color-bg-alt);
    width: 30%;
    font-weight: 700;
    color: var(--color-text);
}

@media (max-width: 600px) {
    .company-table, .company-table tbody, .company-table tr, .company-table th, .company-table td {
        display: block;
        width: 100%;
    }
    .company-table tr {
        padding: 6px 0;
    }
    .company-table th {
        padding-bottom: 6px;
        border-bottom: none;
    }
    .company-table td {
        padding-top: 0;
    }
}

/* フォーム */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 44px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

@media (max-width: 600px) {
    .contact-form {
        padding: 28px 22px;
    }
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.92rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--color-text);
    border: 1px solid #d6d9e0;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.contact-form .btn {
    width: 100%;
    font-size: 1rem;
}

/* ==========================================================================
   7. フッター
   ========================================================================== */
footer {
    background: #1b2027;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    padding: 44px 0;
    margin-top: 60px;
    border-top: 3px solid var(--color-primary);
    font-size: 0.88rem;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   会社理念セクションのスタイル
   ========================================================================== */
.philosophy {
    text-align: center;      /* 中央揃え */
    margin-bottom: 80px;    /* 下のテーブルとの間隔 */
}

.philosophy-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
    letter-spacing: 0.2em;  /* 文字の間隔を少し広げて上品に */
}

.philosophy-title::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    background: var(--color-primary);
}

.philosophy-catch {
    font-size: 2.2rem;      /* キャッチコピーは大きく */
    font-weight: bold;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 30px;
}

.philosophy-text {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 2;         /* 行間を広げて読みやすく */
}

/* スマホ用の改行調整（必要であれば） */
.sp-only {
    display: none;
}

@media (max-width: 480px) {
    .philosophy-catch {
        font-size: 1.6rem;
    }
    .sp-only {
        display: block;
    }
}

/* ==========================================================================
   8. トップページ（最新情報）
   ========================================================================== */
.news {
    background: var(--color-bg-alt);
    padding: 70px 0;
}

.news h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.25em;
    margin-bottom: 30px;
}

.news h3::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    background: var(--color-primary);
}

.news-list {
    list-style: none;
    max-width: 720px;
    margin: 0 auto;
    border-top: 1px solid var(--color-border);
}

.news-list li {
    display: flex;
    gap: 24px;
    align-items: baseline;
    padding: 18px 16px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
    transition: padding-left 0.2s, border-color 0.2s;
}

.news-list li:hover {
    padding-left: 22px;
    border-color: var(--color-primary);
}

.news-list .date {
    flex-shrink: 0;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

@media (max-width: 480px) {
    .news-list li {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
}

/* ==========================================================================
   9. 会社概要ページ（ご挨拶）
   ========================================================================== */
.philosophy-container {
    max-width: 900px;
    margin: 0 auto;
    color: var(--color-text);
    line-height: 1.8;
}

.philosophy-text-block {
    margin-bottom: 50px;
    text-align: justify;
}

.philosophy-text-block p {
    margin-bottom: 1.2em;
}

.section-divider {
    margin: 80px 0;
    border: 0;
    border-top: 1px solid var(--color-border);
}
