/* 基本設定 */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #6A5ACD;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #757575;
    --mint-color: #e0f7fa;
    --purple-color: #e8eaf6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: var(--text-color);
    line-height: 1.6;
}

/* ページヘッダーのパディング調整 */
.page-header {
    padding-top: calc(var(--header-height) + 5rem); /* ヘッダーの高さ + 追加パディング */
    padding-bottom: 5rem;
}

/* スクロール時のアンカーリンク位置調整 */
html {
    scroll-padding-top: var(--header-height);
    scroll-behavior: smooth;
}

/* 特にセクションのパディング調整が必要な場合 */
section.page-header {
    padding-top: calc(var(--header-height) + 5rem); /* ヘッダー + 余白 */
    padding-bottom: 5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

/* ヘッダー */
header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}



.btn-green {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

.btn-green:hover {
    opacity: 0.9;
}

/* ページヘッダー */
.page-header {
    background-color: var(--light-gray);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    color: var(--dark-gray);
    font-weight: 500;
}

/* 会社情報セクション */
.company-info, .history, .business, .access {
    padding: 60px 0;
    border-bottom: 1px solid var(--medium-gray);
}

h2 {
    font-size: 24px;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 情報テーブル */
.info-table {
    width: 100%;
}

.info-row {
    display: flex;
    border-bottom: 1px solid var(--medium-gray);
}

.info-label {
    width: 25%;
    padding: 15px;
    background-color: var(--light-gray);
    font-weight: 600;
}

.info-value {
    width: 75%;
    padding: 15px;
}

/* 沿革テーブル */
.history-table {
    width: 100%;
}

.history-row {
    display: flex;
    border-bottom: 1px solid var(--medium-gray);
}

.history-date {
    width: 25%;
    padding: 15px;
    font-weight: 600;
}

.history-event {
    width: 75%;
    padding: 15px;
}

/* 事業紹介 */
.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.business-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.business-item:hover {
    transform: translateY(-5px);
}

.business-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.business-item h3 {
    padding: 15px 15px 10px;
    font-size: 18px;
}

.business-item p {
    padding: 0 15px 20px;
    font-size: 14px;
    color: var(--dark-gray);
}

/* アクセス */
.access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.access-info h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.access-info p {
    margin-bottom: 10px;
}

.access-info i {
    margin-right: 5px;
    color: var(--primary-color);
}

.map-full {
    margin-top: 30px;
}

/* CTA セクション */
.cta-section {
    padding: 60px 0;
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.cta-box {
    padding: 40px;
    border-radius: 8px;
    text-align: center;
}

.bg-mint {
    background-color: var(--mint-color);
}

.bg-purple {
    background-color: var(--purple-color);
}

.cta-box h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.cta-box p {
    margin-bottom: 20px;
}

.btn-outline {
    display: inline-block;
    padding: 10px 30px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-white {
    display: inline-block;
    padding: 10px 30px;
    background-color: white;
    color: var(--secondary-color);
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-white:hover {
    background-color: #f5f5f5;
}

/* フッター */
footer {
    background-color: #333;
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 50px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
}

.footer-links a:hover {
    color: var(--medium-gray);
}

.footer-contact p {
    margin-bottom: 10px;
    font-size: 14px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 14px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .info-row, .history-row {
        flex-direction: column;
    }
    
    .info-label, .info-value, .history-date, .history-event {
        width: 100%;
    }
    
    .info-label, .history-date {
        background-color: var(--light-gray);
        font-weight: 600;
        padding: 10px 15px;
    }
    
    .access-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        margin-bottom: 20px;
    }
    
    .business-grid {
        grid-template-columns: 1fr;
    }
}

/* 正方形のマップコンテナ */
.map-container {
    width: 100%;
}

.square-map {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 正方形にするためのアスペクト比 */
    height: 0;
    overflow: hidden;
}

.square-map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px; /* 任意：角を丸くする */
}

/* レスポンシブ対応の調整 */
@media (max-width: 768px) {
    .access-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .square-map {
        padding-bottom: 100%; /* モバイルでも正方形を維持 */
    }
}
