/* --- Variables & Reset --- */
:root {
    --primary-color: #0f172a; /* Deep Navy */
    --accent-color: #3b82f6;  /* Modern Blue */
    --text-color: #334155;    /* Slate Grey */
    --bg-light: #f8fafc;
    --white: #ffffff;
    --font-main: 'Noto Sans JP', sans-serif;
    --font-eng: 'Oswald', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* --- Utilities --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
}

.section-subtitle {
    display: block;
    font-family: var(--font-eng);
    color: var(--accent-color);
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-eng);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
}

.btn-contact {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 50px;
}

.btn-contact:hover {
    background-color: var(--accent-color);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
background-image: url(../img/yamatomaegawa_header.png );
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.hero-sub {
    font-family: var(--font-eng);
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 30px;
}

.hero-desc {
    margin-bottom: 40px;
    font-size: 1.1rem;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    background-color: var(--white);
    color: var(--accent-color);
}

.btn-primary.invert {
    background-color: var(--white);
    color: var(--primary-color);
}
.btn-primary.invert:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 24px;
    text-align: justify;
}

.about-img-real {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.img-placeholder {
    width: 100%;
    height: 400px;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    border-radius: 8px;
    font-weight: bold;
}

/* --- Philosophy (Cards) --- */
.philosophy {
    background-color: var(--bg-light);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border-top: 4px solid var(--accent-color);
}

.card:hover {
    transform: translateY(-5px);
}

.card h4 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* --- Contact Section --- */
.contact {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.contact-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.contact p {
    margin-bottom: 40px;
    opacity: 0.8;
}

/* --- Footer --- */
.footer {
    background-color: #020617;
    color: #94a3b8;
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    color: var(--white);
    font-weight: bold;
    margin-bottom: 10px;
}

.copyright {
    font-size: 0.8rem;
}

/* --- Footerの追加スタイル --- */

/* 認証ロゴの配置設定 */
.footer-cert {
    margin: 20px 0; /* 上下に余白を開ける */
}

/* 画像のデザイン */
.footer-cert img {
    height: 80px;       /* ヘッダーより少し大きめに見やすく設定 */
    width: auto;
    border-radius: 4px; /* 角を少し丸くして優しく見せる */
    background-color: #fff; /* 背景を白くしてロゴをはっきりさせる */
    padding: 5px;       /* ロゴの周りに少し余白を作る */
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .nav {
        display: none; /* 簡易的な実装のためモバイルメニューは省略 */
    }
    
    .section {
        padding: 60px 0;
    }
}

/* --- Products Section --- */
.products {
    background-color: var(--white);
}

.product-grid {
    display: grid;
    /* PCでは3列、狭くなると自動で折り返し、スマホでは1列 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 40px;
    justify-content: center;
}

/* 5つの製品をきれいに並べるための調整（最後の行を中央寄せにするオプション） */
@media (min-width: 1024px) {
    .product-grid {
        /* 必要に応じてグリッドの挙動を調整できますが、
           標準の左詰めで整列する方が工業製品らしくはあります。
           もし最後の2つを中央に寄せたい場合は以下を有効化してください */
        /* justify-items: center; */
    }
}

.product-card {
    background-color: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.product-img-box {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 画像プレースホルダー（実際は img タグに入れ替えてください） */
.dummy-img {
    color: #94a3b8;
    font-weight: bold;
    font-family: var(--font-eng);
    font-size: 1.2rem;
}

/* 画像左上のラベル */
.img-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.img-label.new {
    background-color: var(--accent-color);
}

.product-info {
    padding: 24px;
    flex-grow: 1; /* カードの高さを揃える */
    display: flex;
    flex-direction: column;
}

.product-info h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    display: inline-block;
}

.product-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像を枠いっぱいに綺麗にトリミング */
}

.product-info p {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.6;
}

.company {
    background-color: var(--bg-light);
}

.company-wrapper {
    display: flex;
    flex-wrap: wrap; /* スマホで縦積みになるように */
    gap: 40px;
    justify-content: space-between;
}

/* 会社情報テーブル（dl/dt/dd）のデザイン */
.company-info {
    flex: 1;
    min-width: 300px; /* 狭くなりすぎないように */
}

.company-list {
    border-top: 1px solid #e2e8f0;
}

.list-row {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 0;
}

.list-row dt {
    width: 120px;
    font-weight: bold;
    color: var(--primary-color);
    flex-shrink: 0; /* ラベル幅を固定 */
    text-align: left;
}

.list-row dd {
    flex-grow: 1;
    color: var(--text-color);
        text-align: left;
}

/* マップエリアのデザイン */
.company-map {
    flex: 1;
    min-width: 300px;
    min-height: 350px; /* 高さを確保 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.company-map iframe {
    width: 100%;
    height: 100%;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .company-wrapper {
        flex-direction: column; /* スマホでは地図を下に */
    }
    
    .company-map {
        min-height: 300px;
    }

    .list-row {
        flex-direction: column; /* スマホでは項目名を上に */
        padding: 15px 0;
    }
    
    .list-row dt {
        margin-bottom: 5px;
        color: var(--accent-color); /* スマホで見やすいよう色変更 */
    }
}