/* =================================== */
/* Base & Common Styles
/* =================================== */

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.fade-in-infra {
    opacity: 0;
    animation: fadeIn 0.8s ease-in-out forwards;
}

.section__title {
    font-size: 36px;
    padding-top: 120px; 
    margin-bottom: 40px; 
    padding-bottom: 20px;
    text-align: center;
    color: #333;
    position: relative;
    font-weight: 700;
}

.section__title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #333;
    margin: 15px auto 0;
    border-radius: 2px;
}

.fab {
    font-family: 'Font Awesome 5 Brands';
}


/* =================================== */
/* Page Sections
/* =================================== */

/* --- イントロダクションセクション --- */
.intro-section {
    text-align: center;
    padding: 20px 20px 60px;
}
.intro-section .section-subtitle {
    font-size: 2em;
    color: #333;
    margin-bottom: 20px;
}
.intro-section .section-description {
    font-size: 1.1em;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* --- 3つの主要サービスセクション --- */
.features-section {
    padding: 60px 20px;
    background-color: #fff;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}
.feature-item {
    text-align: center;
    padding: 30px;
}
.feature-icon {
    font-size: 3em;
    color: #333;
    margin-bottom: 20px;
}
.feature-item h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #333;
}
.feature-item p {
    color: #666;
    line-height: 1.7;
}

/* --- 具体的なサービス事例セクション --- */
.service-examples-section {
    padding: 80px 20px;
    background-color:#f7f7f7;
}

/* ★★★ ここからレイアウトを修正 ★★★ */
.service-card-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6分割のグリッドを作成 */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.service-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* 上段の3つのカード */
.service-card:nth-child(-n+3) {
    grid-column: span 2; /* 6分割のうち2つ分の幅を使用 (3等分) */
}
/* 下段の2つのカード */
.service-card:nth-child(4) {
    grid-column: 2 / span 2; /* 2列目から開始して2つ分の幅 */
}
.service-card:nth-child(5) {
    grid-column: 4 / span 2; /* 4列目から開始して2つ分の幅 */
}
/* ★★★ ここまで ★★★ */


.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.service-card-icon {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 20px;
}
.service-card-title {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 15px;
    height: 45px;
}
.service-card-description {
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
}

/* --- 弊社の強みセクション (2x2 グリッドレイアウト) --- */
.strengths-section.unified {
    padding: 80px 20px;
    background-color: #f7f7f7;
}
.strengths-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}
.strengths-grid-2x2 .strength-item {
    background-color: #fff;
    padding: 35px 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.strengths-grid-2x2 .strength-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.strengths-grid-2x2 .strength-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.strengths-grid-2x2 .strength-icon {
    font-size: 1.8em;
    color: #333;
}
.strengths-grid-2x2 h3 {
    font-size: 1.25em;
    color: #333;
}
.strengths-grid-2x2 p {
    font-size: 0.95em;
    line-height: 1.8;
    color: #555;
    flex-grow: 1;
}

/* --- 対応技術一覧セクション --- */
.technology {
    padding: 60px 20px;
    background: linear-gradient(145deg, #f5f5f5, #e0e0e0);
    color: #333;
    font-family: Arial, sans-serif;
    overflow: hidden;
}
.technology-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.technology-title {
    font-size: 2.5em;
    margin-bottom: 50px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}
.technology-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #333;
    margin: 10px auto 0;
}
.technology-categories-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}
.technology-category {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    flex: 1 1 calc(50% - 30px);
    min-width: 320px;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.technology-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.technology-icon {
    margin-right: 10px;
    color: #666;
    font-size: 1.2em;
    vertical-align: middle;
}
.technology-category-title {
    font-size: 1.6em;
    color: #555;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.technology-category-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #777;
    margin: 8px auto 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
}
.technology-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
    width: 100%;
}
.technology-list-item {
    font-size: 1.1em;
    color: #777;
    padding: 8px 15px;
    background-color: #eee;
    border-radius: 5px;
    flex-grow: 1;
    white-space: nowrap;
    min-width: fit-content;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}
.technology-hover-area {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-top: auto;
    cursor: pointer;
    padding-top: 10px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    max-height: 50px;
    position: relative;
}
.technology-hover-area:hover {
    max-height: 200px;
}
.technology-view-detail-btn {
    background-color: #666;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.technology-view-detail-btn:hover {
    background-color: #444;
    transform: translateY(-2px);
}
.technology-view-detail-btn .fas {
    font-size: 0.9em;
    transition: transform 0.3s ease-in-out;
}
.technology-view-detail-btn:hover .fas {
    transform: translateX(5px);
}
.technology-detail {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
    flex-grow: 1;
    text-align: left;
    padding-left: 20px;
    box-sizing: border-box;
    color: #333;
    font-size: 0.95em;
    line-height: 1.6;
}
.technology-hover-area:hover .technology-detail {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.technology-detail p {
    margin: 0;
    padding: 0;
}

/* --- インフラ基盤構築プロセスセクション --- */
.infra-process-section {
    padding: 80px 20px;
    background-color: #f7f7f7;
}
.infra-process-section .section__title {
    margin-bottom: 60px;
    margin-top: 0;
}
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px 0;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}
.process-step {
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.process-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.step-icon {
    flex-shrink: 0;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-right: 25px;
}
.step-icon img {
    width: 40px;
    height: 40px;
    filter: invert(100%) brightness(200%);
}
.step-content {
    text-align: left;
    margin-left: 30px;
    flex-grow: 1;
}
.step-number {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
    margin-bottom: 5px;
}
.step-title {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}
.step-description {
    font-size: 0.95em;
    color: #666;
    line-height: 1.7;
}

/* =================================== */
/* Animations
/* =================================== */

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}
.fade-in-left {
    opacity: 0;
    animation: fadeInLeft 0.8s ease-out forwards;
}
.fade-in-right {
    opacity: 0;
    animation: fadeInRight 0.8s ease-out forwards;
}

.process-step:nth-child(1) { animation-delay: 0.1s; }
.process-step:nth-child(2) { animation-delay: 0.3s; }
.process-step:nth-child(3) { animation-delay: 0.5s; }
.process-step:nth-child(4) { animation-delay: 0.7s; }


/* =================================== */
/* Responsive Design
/* =================================== */

@media (max-width: 1200px) {
    .service-card-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 992px以上では3列を維持 */
    }
    .service-card:nth-child(4) {
        grid-column: 1 / 2;
    }
    .service-card:nth-child(5) {
        grid-column: 2 / 3;
    }
}


@media (max-width: 992px) {
    /* ★★★ ここからレイアウトを修正 ★★★ */
    .service-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .service-card:nth-child(-n+5) {
        grid-column: auto; /* 全ての指定をリセット */
    }
     /* ★★★ ここまで ★★★ */
    .section__title {
        font-size: 30px;
        margin-bottom: 50px;
    }
    .infra-process-section {
        padding: 60px 15px;
    }
    .step-icon {
        width: 50px;
        height: 50px;
        margin-right: 20px;
    }
    .step-icon img {
        width: 35px;
        height: 35px;
    }
    .step-title {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .section__title {
        padding-top: 80px;
        font-size: 26px;
        margin-bottom: 40px;
    }
    .section__title::after {
        width: 60px;
        height: 3px;
    }
    .intro-section .section-subtitle {
        font-size: 1.8em;
    }
    .service-card-title {
        height: auto;
    }
    .feature-item {
        padding: 20px 10px;
    }
    .feature-item h3 {
        font-size: 1.1em;
    }
    .feature-item p {
        font-size: 0.9rem;
    }
    .strengths-grid-2x2 {
        grid-template-columns: 1fr;
    }
    .infra-process-section {
        padding: 40px 10px;
    }
    .process-grid {
        gap: 30px 0;
    }
    .process-step {
        padding: 20px;
    }
    .step-icon {
        width: 40px;
        height: 40px;
        margin-right: 15px;
    }
    .step-icon img {
        width: 30px;
        height: 30px;
    }
    .step-title {
        font-size: 1.1em;
    }
    .step-description {
        font-size: 0.9em;
    }
    .technology {
        padding: 40px 15px;
    }
    .technology-title {
        font-size: 2em;
        margin-bottom: 40px;
    }
    .technology-category {
        flex: 1 1 100%;
        max-width: 450px;
    }
    .technology-categories-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .technology-category-title {
        font-size: 1.4em;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .technology-category-title::after {
        position: static;
        margin: 8px auto 0;
        transform: none;
    }
    .technology-list {
        gap: 8px 15px;
    }
    .technology-list-item {
        font-size: 1em;
        padding: 6px 12px;
        white-space: normal;
        flex-basis: auto;
    }
    .technology-hover-area {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 0;
        max-height: 70px;
    }
    .technology-hover-area:hover {
        max-height: 200px;
    }
    .technology-view-detail-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    .technology-view-detail-btn:hover .fas {
        transform: none;
    }
    .technology-detail {
        padding-left: 0;
        margin-top: 10px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .service-card-grid {
        grid-template-columns: 1fr;
    }
    .section__title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    .process-step {
        padding: 15px;
        flex-direction: row !important;
    }
    .step-icon {
        margin-right: 15px !important;
        margin-left: 0 !important;
    }
    .technology-title {
        font-size: 1.8em;
    }
    .technology-category-title {
        font-size: 1.2em;
    }
    .technology-detail p {
        font-size: 1rem;
        font-weight: normal;
        text-align: justify;
    }
}