/* 全体設定 */
html, body {
    margin: auto;
    padding: 0;
    max-width: 1600px;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    background-color: #444; /* 背景色（統一） */
}

/* トップ画像コンテナ */
.top-image-container {
    position: relative;
    overflow: hidden;
    margin: auto;
}

/* コンテンツセクション */
.content-section {
    position: relative;
    background-color: #f9f9f9;
}

.content-image {
    width: 100%;
    height: auto;
    display: block;
}

.content-text {
    position: absolute;
    top: 40%;
    left: 5%;
    right: 10%;
    background-color: rgba(0, 0, 0, 0); /* 半透明の黒背景 */
    padding: 20px;
    border-radius: 8px;
    color: white;
    max-width: 90%;
}

.content-text h2 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 20px;
}

.content-text p {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.8;
    color: white;
}

@media (max-width: 768px) {
    .content-text {
        position: absolute;
        top: 20%;
        left: 1%;
        right: 3%;
        background-color: rgba(0, 0, 0, 0); /* 半透明の黒背景 */
        padding: 20px;
        border-radius: 8px;
        color: white;
        max-width: 90%;
    }
    .content-text h2 {
        font-size: 1.5rem;
    }
    .content-text p {
        font-size: 1.4rem;
    }
}

@media (max-width: 500px) {
    .content-text {
        position: absolute;
        top: 10%;
        left: 1%;
        right: 1%;
        background-color: rgba(0, 0, 0, 0); /* 半透明の黒背景 */
        padding: 20px;
        border-radius: 8px;
        color: white;
        max-width: 90%;
    }
    .content-text h2 {
        font-size: 1.2rem;
    }
    .content-text p {
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .content-text {
        position: absolute;
        top: 7%;
        left: 1%;
        right: 1%;
        background-color: rgba(0, 0, 0, 0); /* 半透明の黒背景 */
        padding: 20px;
        border-radius: 8px;
        color: white;
        max-width: 90%;
    }
    .content-text h2 {
        font-size: 1rem;
    }
    .content-text p {
        font-size: 0.6rem;
    }
}

header {
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #FFF;
    color: white;
    position: relative;
    box-sizing: border-box;
    z-index: 1000;
}

header .logo {
    height: 40px;
}

.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: 1600px;
    /* 高さやその他のスタイルは必要に応じて */
}

.sticky-header.active {
    transform: translateY(0);
}

/* image-textコンテナ */
.image-text-container {
    background-color: #FFFFFF; /* 背景色（統一） */
    padding: 50px 0;
    width: 100%;
}

.image-text-wrapper {
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 50px; /* 各ブロック間の間隔 */
}

.image-text-section {
    display: flex;
    align-items: stretch; /* 画像の高さにテキストを合わせる */
    justify-content: space-between;
    width: 100%;
}

.image-block {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-block img {
    width: 100%;
    height: auto;
}

.text-block {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 画像の高さに揃えて中央寄せ */
    padding: 30px;
    background-color: #FFFFFF; /* 白背景 */
    color: #111;
    border-radius: 12px;
    text-align: left;
}

.text-block h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.text-block p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 画像が左（PC表示時） */
.image-left .image-block {
    order: 1;
}

.image-left .text-block {
    order: 2;
}

/* レスポンシブ対応（スマホで全て「画像 → テキスト」に統一） */
@media (max-width: 768px) {
    .image-text-section {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .image-block {
        width: 100%;
        order: 1 !important; /* どのレイアウトでも画像が最初に表示される */
    }
    .text-block {
        width: 90%; /* テキストブロックの幅を調整 */
        max-width: 600px; /* 最大幅を設定して読みやすく */
        order: 2 !important; /* どのレイアウトでもテキストが2番目に表示される */
        padding: 20px;
        text-align: left; /* テキストを左揃え */
        display: flex;
        align-items: center; /* テキスト全体を中央配置 */
    }
    .text-block h2 {
        font-size: 1.5rem;
    }
    .text-block p {
        font-size: 0.75rem;
    }
}

/* サービス内容セクション */
.services-section {
    position: relative;
    width: 100%;
    padding: 5rem 0;
    text-align: center;
    background: url('img/service_background.png') no-repeat center center/cover;
    color: white;
}

.services-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); /* アルファ付きの背景 */
}

.services-title {
    position: relative;
    font-size: 2.5rem;
    color: #222;
    margin-bottom: 2rem;
    z-index: 1;
}

.services-container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    z-index: 1;
}

.service-item {
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.service-item img {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.service-item h3 {
    min-height: 3em; /* 2行分に合わせる。値はフォントサイズ・行間に応じて調整 */
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.service-item p {
    margin: 7% 7%;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 1024px) {        
    .services-container {
        grid-template-columns: 1fr;
        position: relative;
        display: grid;
        gap: 1.5rem;
        max-width: 1000px;
        margin: auto 5%;
        padding: 0rem;
        z-index: 1;
    }
    .service-item {
        background: white;
        padding: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        text-align: center;
    }    
    .service-item h3 {
        min-height: 0em;
        padding: 0 10%;
    }
    .service-item p {
        padding: 5px 10%;
        margin: 3% 4%;
    }
}

@media (max-width: 768px) {
    .services-title {
        font-size: 2rem;
    }
    .service-item h3 {
        font-size: 1.3rem;
    }
    .service-item p {
        font-size: 0.9rem;
        margin: 5% 3%;
        text-align: left;
    }
}

/* ヒーローセクション */
.hero-section {
    position: relative;
    height: 80vh; /* 高さをビューポートに応じて調整 */
    background: url('img/hero-background.png') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 背景の暗さを調整 */
}

.hero-content {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    line-height: 1.8;
}

.hero-content .quote {
    font-size: 1.1rem;
    font-style: italic;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .hero-section {
        height: 60vh;
    }
    .hero-content h2 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 50vh;
        padding: 1rem;
    }
    .hero-content h2 {
        font-size: 1rem;
    }
    .hero-content p {
        font-size: 0.7rem;
    }
    .hero-content .quote {
        font-size: 0.7rem;
        font-style: italic;
        margin-top: 0.5rem;
        font-style: bold;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 40vh;
    }
    .hero-content h2 {
        font-size: 0.7rem;
    }
    .hero-content p {
        font-size: 0.6rem;
    }
    .hero-content .quote {
        font-size: 0.7rem;
        font-style: bold;
        margin-top: 0.4rem;
    }
}

/* フッター全体 */
.footer {
    background: url('img/footer.png') no-repeat center bottom;
    background-size: cover;
    color: white;
    padding: 2rem 0; /* 全体の上下余白 */
    position: relative;
    text-align: left; /* デフォルトは左揃え */
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); /* オーバーレイ必要なら変更 */
    z-index: 0;
}

.footer-container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 0rem;
}

.footer-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.footer-logo img {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.footer-header h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.footer-header p {
    font-size: 1rem;
    line-height: 1.6;
}

.footer-content {
    display: flex;
    gap: 0 0;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-company {
    width: 200px;
    padding: 0rem 2rem;
    text-align: left;
}

.footer-company h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.footer-company ul {
    list-style: none;
    padding: 0;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-company ul li {
    margin-bottom: 5px;
}

.contact-button {
    display: inline-block;
    background-color: #ffdc4e;
    color: black;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s ease;
}

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

.footer-mission {
    width: 300px;
    text-align: left;
}

.footer-mission h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.mission-list {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.mission-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mission-list ul li {
    margin-bottom: 5px;
}

.footer-company2 {
    width: auto;
    text-align: left;
}

.footer-company2 h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.company2-list {
    display: block;
    gap: 1rem;
    font-size: 0.9rem;
}

.company2-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.company2-list ul li {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .footer-header {
        margin-bottom: 1.5rem;
    }
    .footer-header h3 {
        margin: auto;
        font-size: 1.2rem;
    }
    .footer-header p {
        font-size: 0.9rem;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
    }
    .footer-company,
    .footer-company2,
    .footer-mission {
        width: 250px;
        margin-bottom: 1rem;
    }
    .mission-list {
        flex-direction: column;
        align-items: flex-start;
        display: block;
    }
    .company2-list {
        flex-direction: column;
        align-items: flex-start;
        display: block;
    }
}
