
/* ページヒーロー */
.company-hero {
    position: relative;
    height: 400px; /* 適切な高さを指定 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
}

.page-title {
    font-size: 3.25rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
    font-family: var(--headline-font);
    color: #000;
}

.page-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* =====================================
   セクション共通
===================================== */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
    font-family: var(--headline-font);
    color: #000;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* =====================================
   会社理念・価値観・代表メッセージ
===================================== */
/* 企業理念セクション */
.mission-statement {
    padding: 80px 0;
    background: #f8f9fa;
}
.mission-content { max-width: 1200px; margin: 0 auto; }
.mission-visual { text-align: center; margin-bottom: 60px; }
.mission-quote { position: relative; display: inline-block; }
.quote-mark {
    font-size: 4rem;
    color: var(--primary-blue, #0066cc);
    line-height: 1;
    position: absolute;
    top: -20px;
    left: -30px;
}
.quote-mark.closing { top: auto; bottom: -20px; right: -30px; left: auto; }
.mission-text {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-dark, #333);
    margin: 0;
    padding: 20px 40px;
}
.mission-description {
    display: grid;
    grid-template-columns: 1.4fr 1fr; /* 2fr から 1.4fr に縮小 */
    gap: 0; /* gapを無効化して個別マージンで制御 */
    align-items: center;
}
.description-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary-blue, #0066cc);
}
.description-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-dark, #333);
}
.description-content {
    margin-right: 16px; /* 右側の画像との間隔を狭める */
}

/* 1025px以上で左右に余白を追加 */
@media (min-width: 1025px) {
    .description-content {
        margin-left: 60px; /* 文章の左側に余白 */
    }
    .mission-image {
        margin-right: 60px; /* 写真コンテナの右側に余白 */
    }
    .mission-image img {
        margin-right: 0; /* 画像自体のマージンはリセット */
    }
}

.mission-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-left: 16px; /* 左側の文章との間隔を狭める */
}

/* 価値観セクション */
.core-values { padding: 80px 0; background: white; }
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.value-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.value-card:hover { transform: none; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.value-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue, #0066cc);
    margin-bottom: 20px;
}
.value-icon { margin-bottom: 12px; }
.icon-circle { width: auto; height: auto; background: none; border-radius: 0; display: inline-block; box-shadow: none; }
.icon-circle .np-icon { width: 72px; height: 72px; object-fit: contain; display: inline-block; }
.value-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark, #333);
}
.value-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light, #666);
}

/* 代表メッセージセクション */
.president-message { padding: 80px 0; background: #f8f9fa; }
.message-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}
.message-container > .president-card { align-self: center; }
.message-container > .message-content { align-self: center; }
.president-card { position: relative; display: flex; align-items: center; }
.president-card .president-photo { margin-top: -120px; }
.president-photo { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.president-photo img { width: 100%; height: 400px; object-fit: cover; }
.photo-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    text-align: center;
}
.president-info h3 { font-size: 1rem; font-weight: 400; margin-bottom: 5px; opacity: 0.9; }
.president-info h4 { font-size: 1.3rem; font-weight: 600; margin: 0; }
.message-content { padding: 20px 0; }
.message-text { margin-bottom: 40px; }
.message-lead {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--primary-blue, #0066cc);
}
.message-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-dark, #333);
}
.message-closing { font-weight: 500; color: var(--primary-blue, #0066cc); }
.message-signature {
    border-top: 2px solid var(--primary-blue, #0066cc);
    padding-top: 30px;
    text-align: right;
}
.signature-line {
    width: 200px; height: 1px; background: var(--text-light, #666);
    margin: 0 0 15px auto;
}
.message-signature p { font-size: 0.9rem; color: var(--text-light, #666); margin-bottom: 5px; }
.message-signature h5 { font-size: 1.3rem; font-weight: 600; color: var(--text-dark, #333); margin: 0; }

/* レスポンシブ（抜粋） */
@media (max-width: 768px) {
    .mission-description { grid-template-columns: 1fr; gap: 24px; }
    .description-content { margin-right: 0; } /* モバイルではマージンリセット */
    .mission-image img { margin-left: 0; } /* モバイルではマージンリセット */
    .values-grid { grid-template-columns: 1fr; gap: 30px; }
    .message-container { grid-template-columns: 1fr; gap: 24px; }
    .president-photo { width: 100%; height: 280px; }
    .president-photo img { width: 100%; height: 280px; object-fit: cover; object-position: center 50%; }
    .president-card .president-photo { margin-top: 0; }
    .message-container { gap: 40px; }
    .mission-text { font-size: 1.8rem; padding: 15px 25px; }
    .quote-mark { font-size: 3rem; left: -20px; top: -15px; }
    .quote-mark.closing { right: -20px; bottom: -15px; }
}
/* =====================================
   会社概要
===================================== */
.company-overview {
    padding: 120px 0;
    background: var(--gradient-subtle);
}

.overview-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 96px;
    align-items: start;
}

.company-info-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--medium-gray);
}

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

.company-info-table th {
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: 1.0625rem;
    white-space: nowrap;
    width: 200px;
    letter-spacing: 0.025em;
}

.company-info-table td {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
}

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

.overview-visual {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.company-stats {
    background: var(--white);
    padding: 48px 36px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--medium-gray);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.company-stats:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.stat-item {
    text-align: center;
    margin-bottom: 36px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--text-gray);
    font-weight: 500;
}

.company-features {
    background: var(--white);
    padding: 48px 36px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--medium-gray);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.company-features:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.company-features h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--trust-navy);
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: -0.025em;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    position: relative;
    padding: 10px 0 10px 28px;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 0.9375rem;
    font-weight: 400;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: bold;
    font-size: 1.125rem;
    top: 8px;
}


/* =====================================
   アクセス情報
===================================== */
.access-info {
    padding: 80px 0;
    background: #ffffff;
}

/* アクセス情報: 住所3拠点を可能なら3列で表示 */
.merged-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    row-gap: 28px; /* 上下段の間隔をやや広めに */
}
.merged-col { min-width: 0; }

/* 薄い区切り線（3列時） */
.merged-columns .merged-col {
    border-right: 1px solid #e5e7eb;
    padding-right: 16px;
}
.merged-columns .merged-col:nth-child(3n) {
    border-right: none;
    padding-right: 0;
}

@media (max-width: 1024px) {
    .merged-columns {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 28px; /* 二段になる場合の縦間隔を広げる */
    }
    /* 2列時の区切り線調整 */
    .merged-columns .merged-col {
        border-right: 1px solid #e5e7eb;
        padding-right: 16px;
    }
    .merged-columns .merged-col:nth-child(2n) {
        border-right: none;
        padding-right: 0;
    }
}

@media (max-width: 600px) {
    .merged-columns {
        grid-template-columns: 1fr;
        row-gap: 20px; /* 1列でもやや余裕を持たせる */
    }
    /* 1列時は縦の区切り線に切替 */
    .merged-columns .merged-col {
        border-right: none;
        padding-right: 0;
        border-top: 1px solid #e5e7eb;
        padding-top: 16px;
    }
    .merged-columns .merged-col:first-child {
        border-top: none;
        padding-top: 0;
    }
}

/* 横並び時（2列/3列）は主要ブロックの高さを確実に揃える */
@media (min-width: 601px) {
    .merged-columns { align-items: stretch; }
    .merged-columns .merged-col {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    .merged-columns .merged-col .contact-block,
    .merged-columns .merged-col .transport-block,
    .merged-columns .merged-col .address-map {
        min-height: 0;
        overflow: hidden;
    }
    .merged-columns .merged-col .address-map iframe {
        width: 100% !important;
        height: 100%;
        display: block;
    }
    /* 地図を交通アクセスの直下に配置し、横並び要素と位置を揃える */
    .merged-columns .merged-col .contact-block { 
        margin-bottom: 16px; 
        flex-shrink: 0;
    }
    .merged-columns .merged-col .transport-block { 
        margin-bottom: 8px; 
        flex-shrink: 0;
    }
    .merged-columns .merged-col .address-map { 
        height: 280px;
        margin-top: 0;
        flex-shrink: 0;
    }
    
    /* 3列時: 全ての地図位置を揃える（交通アクセス内容を考慮した高さ） */
    @media (min-width: 1025px) {
        .merged-columns .merged-col .contact-block { 
            height: 220px; /* 固定高さで確実に揃える */
        }
        .merged-columns .merged-col .transport-block { 
            height: 320px; /* お車でお越しの場合まで含む十分な高さ */
        }
    }
    
    /* 2列時: 1行目の2つのみ地図位置を揃える（3番目は自然配置） */
    @media (max-width: 1024px) and (min-width: 601px) {
        .merged-columns .merged-col:nth-child(-n+2) .contact-block { 
            height: 220px; /* 固定高さで確実に揃える */
        }
        .merged-columns .merged-col:nth-child(-n+2) .transport-block { 
            height: 320px; /* お車でお越しの場合まで含む十分な高さ */
        }
        /* 3番目（2行目）は自然な高さ */
        .merged-columns .merged-col:nth-child(3) .contact-block,
        .merged-columns .merged-col:nth-child(3) .transport-block { 
            height: auto; 
        }
        /* 安治川本社（3番目）の住所と電話の間隔を詰める */
        .merged-columns .merged-col:nth-child(3) .contact-block .address-text {
            margin-bottom: 8px;
            min-height: 0;
        }
        .merged-columns .merged-col:nth-child(3) .contact-block .contact-info {
            padding-top: 12px;
        }
    }
    /* 連絡先ブロック内で住所の高さを揃え、TEL開始位置を一致させる */
    .merged-columns .merged-col .contact-block {
        display: grid;
        grid-template-rows: auto 1fr auto; /* タイトル / 住所 / 連絡先 */
        row-gap: 8px;
        min-height: 0;
    }
    .merged-columns .merged-col .contact-block .address-text {
        min-height: 120px; /* 住所部の高さを統一してTELの位置を揃える */
    }
    /* 交通アクセスの縦幅をコンパクトに */
    .merged-columns .merged-col .transport-block h4 {
        margin-bottom: 6px;
    }
    .merged-columns .merged-col .transport-block .access-list li {
        margin-bottom: 4px;
        line-height: 1.4;
    }
}
.address-map iframe {
    width: 100% !important;
    height: 320px;
    border: 0;
    display: block;
}

.access-link a {
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* アクセス情報: 静的画像マップを横幅いっぱいに */
.map-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* 968px以上は地図画像をコンテナ外まで広げて全幅表示 */
@media (min-width: 968px) {
    .map-container {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        display: block;
    }
}

.access-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: start;
}

.access-details h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 24px;
}

.address-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f4f8;
    margin-bottom: 40px;
}

.address-text {
    margin-bottom: 24px;
}

.address-main {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.address-detail {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.address-building {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 0;
}

.contact-info {
    border-top: 1px solid #f0f4f8;
    padding-top: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-label {
    font-weight: 600;
    color: var(--primary-blue);
    min-width: 50px;
    margin-right: 12px;
}

.contact-value {
    color: var(--text-dark);
    font-weight: 500;
}

.transportation {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f4f8;
}

.transport-methods {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.transport-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.transport-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 4px;
}

.transport-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.transport-details ul {
    list-style: none;
    padding: 0;
}

.transport-details li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

.transport-details li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: bold;
}

.map-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 24px;
}

.map-placeholder {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f4f8;
    margin-bottom: 16px;
}

.map-content {
    position: relative;
    height: 400px;
    background: #f8fbff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}

.marker-icon {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.marker-text {
    font-weight: 600;
    color: var(--text-dark);
}

.map-note {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.5;
    text-align: center;
    padding: 0 20px;
}



/* =====================================
   レスポンシブデザイン
===================================== */
@media (max-width: 968px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .overview-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .access-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .department-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 500px;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 500px;
    }
    
    .org-level {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-content {
        margin-left: 0;
        margin-top: 20px;
        width: 100%;
    }
    
    .address-map iframe {
        height: 260px;
    }
    
    .access-link a {
        word-break: break-word;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .history-timeline::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 100px 0 60px;
        background-attachment: scroll;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .company-overview,
    .company-history,
    .organization,
    .access-info,
    .certifications {
        padding: 60px 0;
    }
    
    .company-info-table th,
    .company-info-table td {
        padding: 16px 20px;
        font-size: 0.9rem;
    }
    
    .company-info-table th {
        width: 140px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .timeline-year {
        min-width: 100px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .timeline-content {
        padding: 20px 24px;
    }
    
    .department-card,
    .cert-card {
        padding: 40px 32px;
    }
    
    .map-content {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .overview-visual {
        gap: 30px;
    }
    
    .company-stats,
    .company-features {
        padding: 30px 20px;
    }
    
    .department-grid,
    .cert-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .department-card,
    .cert-card {
        padding: 32px 24px;
    }
    
    .department-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 28px;
    }
    
    .department-icon img {
        width: 35px;
        height: 35px;
    }
    
    .org-level {
        flex-direction: column;
        align-items: center;
    }
    
    .org-box {
        min-width: 200px;
    }
    
    .address-card,
    .transportation {
        padding: 20px;
    }
    
    .transport-item {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .transport-icon {
        margin-top: 0;
    }
    
    .map-content {
        height: 250px;
    }
}

/* =====================================
   アニメーション
===================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.department-card,
.cert-card,
.org-box {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}



/* =====================================
   印刷スタイル
===================================== */
@media print {
    .page-hero,
    .floating-recruit-btn {
        display: none;
    }
    
    .company-info-table,
    .timeline-item,
    .department-card,
    .cert-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .overview-content,
    .access-content {
        grid-template-columns: 1fr;
    }
} 