/*
Theme Name: 江和防災株式会社テーマ
Theme URI: 
Author: Your Name
Author URI: 
Description: 江和防災株式会社オリジナルテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ewa-bosai
*/

/* --- 基本設定 --- */
:root {
    --primary-color: #0e3760;
    /* 信頼感のあるネイビー */
    --accent-color: #d32f2f;
    /* 防災をイメージした赤（アクセント） */
    --text-color: #333;
    --bg-light: #f4f7f6;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    line-height: 1.8;
    letter-spacing: 0.05em;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* --- 共通クラス --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

/* 背景色切り替え用クラス */
.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title span {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    opacity: 0.8;
}

/* --- ヘッダー --- */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.header-tel {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* ハンバーガーメニュー（モバイル用） */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}

/* --- メインビジュアル --- */
.hero {
    height: 100vh;
    min-height: 500px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1504328345606-18bbc8c9d7d1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 70px;
    /* ヘッダー分 */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* --- 事業案内 (Service) --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.service-img {
    height: 200px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

/* ダミー画像の指定 */
.img-elec {
    background-image: url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
}

.img-fire {
    background-image: url('https://images.unsplash.com/photo-1599863892770-438686d70889?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
}

.img-ceo {
    background-image: url('https://images.unsplash.com/photo-1542744173-8e7e53415bb0?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
}

/* 施工事例用画像 */
.img-work1 {
    background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
}

.img-work2 {
    background-image: url('https://images.unsplash.com/photo-1581094794329-c8112a89af12?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
}

.img-work3 {
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
}

.service-body {
    padding: 30px;
}

.service-body h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-body p {
    font-size: 0.95rem;
    color: #666;
}

/* --- 施工事例 (Works) --- */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.work-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    text-align: left;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.work-img {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.work-content {
    padding: 20px;
}

.work-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.work-category {
    color: var(--accent-color);
    font-weight: bold;
    background-color: #ffebee;
    padding: 2px 8px;
    border-radius: 4px;
}

.work-date {
    color: #888;
}

.work-content h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0;
    line-height: 1.5;
}

/* --- 代表挨拶 (Message) --- */
.message-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.message-img {
    flex: 1;
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}

.message-text {
    flex: 1.2;
}

.message-text h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    line-height: 1.4;
}

.message-text p {
    margin-bottom: 20px;
    text-align: justify;
}

.ceo-name {
    margin-top: 30px;
    text-align: right;
    font-weight: bold;
    font-size: 1.1rem;
}

/* --- 会社概要 (Company) --- */
.company-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.company-table th,
.company-table td {
    padding: 20px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.company-table th {
    width: 30%;
    background-color: #f9f9f9;
    font-weight: bold;
    color: var(--primary-color);
}

/* --- アクセス (Access) --- */
.access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.access-info h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.access-info p {
    margin-bottom: 15px;
}

.map-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- お問い合わせ (Contact) --- */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

.form-label .required {
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-left: 5px;
    background: #ffebee;
    padding: 2px 6px;
    border-radius: 4px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 55, 96, 0.1);
}

textarea.form-control {
    height: 150px;
    resize: vertical;
}

.submit-btn-wrapper {
    text-align: center;
    margin-top: 30px;
}

/* --- フッター --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    display: inline-block;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {

    .header-tel,
    .nav-menu {
        display: none;
        /* モバイルでは初期非表示 */
    }

    .hamburger {
        display: block;
    }

    /* モバイルメニュー展開時 */
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        text-align: center;
        z-index: 999;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    /* 代表挨拶レスポンシブ */
    .message-wrapper {
        flex-direction: column;
        padding: 20px;
    }

    .message-img {
        width: 100%;
        height: 200px;
        margin-bottom: 20px;
    }

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
    }

    .company-table th {
        background-color: #eee;
        padding: 10px 20px;
    }

    .access-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 20px;
    }
}