/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kaisei+Tokumin:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;700&display=swap');

:root {
    --primary-color: #4CAF50;
    --secondary-color: #1565C0;
    --text-color: #333;
    --bg-color: #f9f9f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    opacity: 0;
    animation: fadeInAnimation 3s forwards;

    font-size: 1rem;
}

@keyframes fadeInAnimation {
    to { opacity: 1; }
}

/* ====================== ヘッダー ====================== */
header {
    position: relative;
    width: 100%;
    z-index: 1000;
}

.header-content {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #333;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    position: fixed;
    top: 0;
    width: 100%;
    height: 5rem;
    z-index: 1001;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.logo {
    max-width: 200px;
    display: block;
}

.header-content > a {
    display: flex;
    align-items: center;
}

/* PC用のナビ */

nav {
    align-self: stretch;
    display: flex;
    align-items: stretch;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

nav ul li {
    display: flex;
    align-items: stretch;
}

nav ul li a {
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

nav ul li a:hover {
    background-color: #000;
    color: #fff;
}

/* ハンバーガーメニュー */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #333;
    font-size: 1.9rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    z-index: 1002;
}


/* ====================== ヒーロー ====================== */
.hero-image {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 560px;
    max-height: 800px;
    margin-top: 5rem;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.55);
    padding: 1.5rem 2.5rem;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    max-width: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.hero-text2 p {
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    font-weight: 600;
    line-height: 1.7;
    margin: 0;
}

.hero-tag {
    display: inline-block;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    opacity: 0.85;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.2rem 0.8rem;
    border-radius: 2rem;
}


/* ====================== メインコンテンツ ====================== */
main {
    padding-top: 100px;
    padding-left: 5%;
    padding-right: 5%;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: clamp(1.2rem, 4vw, 1.7rem);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.8rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* 画像グリッド */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    max-width: 800px;
}

.image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* サービス一覧 */
#serviceList {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 768px) {
    #serviceList {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service {
    background-color: #fff;
    padding: 1.8rem;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}


.service img {
    width: 100%;
    /* height: 220px; */
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.service h3 {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

@keyframes imgScan {
    0%   { object-position: center 50%; }
    30%  { object-position: center 0%; }
    70%  { object-position: center 100%; }
    100% { object-position: center 50%; }
}

#serviceList .service:nth-child(1):hover img,
#serviceList .service:nth-child(2):hover img {
    animation: imgScan 2.5s ease-in-out;
}

/*
#serviceList .service:first-child:hover img {
    animation: imgScan 2.5s ease-in-out;
}*/


.service p {
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.75;
    color: #444;
}

.service p b {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.15rem;
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.04em;
}

/* 従業員リスト */
#employeeList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.employee img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #eee;
}

/* About items */
.about-items {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 1rem;
}

.about-item {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.about-num {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    margin-top: 0.1rem;
}

.about-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 0.25rem;
}

/* Timeline */
.timeline {
    position: relative;
    margin-top: 0.75rem;
}

/* Vertical line: date(5rem) + gap(0.75rem) + half-marker(0.75rem) = 6.5rem */
.timeline::before {
    content: '';
    position: absolute;
    left: 6.5rem;
    top: 2rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), rgba(76, 175, 80, 0.1));
}

.tl-group {
    display: grid;
    grid-template-columns: 5rem 1.5rem 1fr;
    column-gap: 0.75rem;
    align-items: start;
    margin-bottom: 0.5rem;
}

.tl-year-label {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.12em;
    padding: 0.5rem 0 0.35rem;
    border-bottom: 1px solid rgba(76, 175, 80, 0.25);
    margin-bottom: 0.1rem;
}

.tl-item {
    display: contents;
}

.tl-date {
    font-size: 0.68rem;
    color: #aaa;
    text-align: right;
    white-space: nowrap;
    padding: 0.3rem 0;
    line-height: 1.4;
}

.tl-marker {
    display: flex;
    justify-content: center;
    padding-top: 0.38rem;
}

.tl-marker::after {
    content: '';
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    display: block;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.tl-content {
    font-size: 0.8rem;
    line-height: 1.65;
    color: #444;
    padding: 0.2rem 0 0.3rem;
}

/* テーブル */
table.table {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem auto;
    border-collapse: collapse;
}

table.table th,
table.table td {
    padding: 0.75rem 0.625rem;
    border: 1px solid #ddd;
    text-align: left;
}

table.table th {
    background-color: #f5f5f5;
    font-weight: 500;
}

/* コンタクトフォーム */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.contact-form button {
    width: 100%;
    padding: 0.875rem;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.contact-form button:hover {
    background-color: #218838;
}

/* ====================== レスポンシブ ====================== */

@media (max-width: 767px) {
    .menu-toggle {
        display: block;
    }

    .header-content > a {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 1.2rem 0;
        gap: 1.2rem;
        text-align: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        justify-content: center;
    }

    nav ul li a {
        color: #333;
        font-size: 1.1rem;
        padding: 0.5rem 2rem;
        justify-content: center;
        width: 100%;
    }

    .hero-text2 {
        padding: 1rem 1.5rem;
        max-width: 100%;
        width: 92%;
    }

    .hero-text2 p {
        font-size: clamp(0.95rem, 4vw, 1.1rem);
    }

    .hero-image {
        height: 60vh;
        min-height: 320px;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        width: 100%;
        padding: 1.5rem;
    }

    .tl-group {
        grid-template-columns: 4rem 1.25rem 1fr;
        column-gap: 0.5rem;
    }

    .timeline::before {
        left: calc(4rem + 0.5rem + 0.625rem);
    }

    .tl-date {
        font-size: 0.62rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    main {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* トップへ戻るボタン */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.65rem 1.1rem;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
    transition: background-color 0.3s;
}

#backToTopBtn:hover {
    background-color: #0D47A1;
}

footer {
    background-color: #222;
    color: white;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
}

footer a:hover {
    color: white;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 767px) {
    footer {
        flex-direction: column;
        text-align: center;
    }
}