.about-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: left;
    margin-top: 4rem;
}

/* 1番目と4番目のリンクを2列分に広げる */
.cards-grid > a:nth-child(1),
.cards-grid > a:nth-child(4) {
  grid-column: span 2;
}

@media screen and (max-width: 1200px) {
    .cards-grid {
        margin-top: 3.5rem;
    }
    .about-section {
        padding: 0;
    }
}
/* Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
}

.contact-btn {
    padding: 0.8rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color) !important;
}

/* Cards */
.card {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    height: 300px;
    color: var(--white);
    box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.16);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #014261;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    border-radius: 1.25rem;
}
@media (hover: hover) and (pointer: fine) {
.card:hover::before {
    opacity: 0.5;
}

.card:hover::after {
    transform: scale(1.1);
}
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
    z-index: -1;
}

/* 各カードごとの背景設定 */
.journey-card::after {
    background-image: 
        linear-gradient(
            1deg,
            rgba(0, 84, 125, 0.21) 18.25%, /* 70% の透明度に 0.3 を掛けた結果 */
            rgba(0, 84, 125, 0.06) 40.99%, /* 20% の透明度に 0.3 を掛けた結果 */
            rgba(0, 84, 125, 0.00) 51.15%  /* 0% の透明度に 0.3 を掛けた結果 */
        ),
            url('https://test-kankyosite.com/wordpress/wp-content/themes/environment-site-w/src/assets/aboutus/ourjourney.webp');
    background-position: 0% 40%;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -1; /* ← これを追加！ */
}

.mission-card::after {
    background-image: 
        linear-gradient(
                22deg,
                rgba(0, 84, 125, 0.21) 40.42%, /* 70% の透明度に 0.3 を掛けた結果 */
                rgba(0, 84, 125, 0.06) 65.13%, /* 20% の透明度に 0.3 を掛けた結果 */
                rgba(0, 84, 125, 0.00) 80.69%  /* 0% の透明度に 0.3 を掛けた結果 */            
        ), 
        url('https://test-kankyosite.com/wordpress/wp-content/themes/environment-site-w/src/assets/aboutus/ouredge.webp');
    background-repeat: no-repeat;
}

.achievements-card::after {
    background-image: 
        linear-gradient(
                29deg,
                rgba(0, 84, 125, 0.21) 26.07%, /* 70% の透明度に 0.3 を掛けた結果 */
                rgba(0, 84, 125, 0.06) 56.35%, /* 20% の透明度に 0.3 を掛けた結果 */
                rgba(0, 84, 125, 0.00) 74.54%  /* 0% の透明度に 0.3 を掛けた結果 */            
        ), 
        url('https://test-kankyosite.com/wordpress/wp-content/themes/environment-site-w/src/assets/aboutus/achievements.webp');
        background-position: 25% 50%;
        background-size: 180%;
        background-repeat: no-repeat;
    }

.overview-card::after {
    background-image: 
        linear-gradient(
                11deg,
                rgba(0, 84, 125, 0.18) 22.06%, /* 60% の透明度に 0.3 を掛けた結果 */
                rgba(0, 84, 125, 0.06) 41.93%, /* 20% の透明度に 0.3 を掛けた結果 */
                rgba(0, 84, 125, 0.00) 50.81%  /* 0% の透明度に 0.3 を掛けた結果 */            
        ), 
        url('https://test-kankyosite.com/wordpress/wp-content/themes/environment-site-w/src/assets/aboutus/overview.webp');
        background-position: 0% 30%;
        background-size: cover;
        background-repeat: no-repeat;
}

.corporate-card::after {
    background-image: 
        linear-gradient(
            1deg,
            rgba(0, 84, 125, 0.21) 18.25%, /* 70% の透明度に 0.3 を掛けた結果 */
            rgba(0, 84, 125, 0.06) 40.99%, /* 20% の透明度に 0.3 を掛けた結果 */
            rgba(0, 84, 125, 0.00) 51.15%  /* 0% の透明度に 0.3 を掛けた結果 */
        ),
            url('https://test-kankyosite.com/wordpress/wp-content/themes/environment-site-w/src/assets/aboutus/corporate.webp');
    background-position: 0% 35%;
    background-size: cover;
    background-repeat: no-repeat;
}


/* Full-width cards */
.journey-card,
.overview-card {
    grid-column: 1 / -1;
}
/* Full-width cards */
.achievements-card,
.mission-card {
    grid-column: auto; /* ←ここが重要！1列占有しないようにする */
}

.aboutus-card-link {
    width: 100%;
    height: 100%;
}
.card-content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding-left: 2.5rem;
    z-index: 2;
    width: 100%;
}

.card-label {
    display: block;
    color: #FFF;
text-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);
font-family: "Open Sans";
font-size: 0.75rem;
font-style: normal;
font-weight: 700;
line-height: normal;
}

.card h2 {
    margin-top: 0.81rem;
    color: #FFF;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    font-family: "Noto Sans JP";
    font-size: 2.1875rem;
    font-style: normal;
    font-weight: 700;
    line-height: 2.5rem; /* 114.286% */
    letter-spacing: 0.0875rem;
}

.more-link {
    color: #FFF;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    font-family: "Noto Sans JP";
    font-size: 1.0625rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1.625rem;
    letter-spacing: 0.0425rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    bottom: -4rem;
    right: 2rem;
}

.more-link::after {
    content: "→";
    transition: transform 0.3s;
}
@media (hover: hover) and (pointer: fine) {
.more-link:hover::after {
    transform: translateX(5px);
}
}
/* Media Queries */
@media screen and (max-width: 1200px) {
    .container {
        padding: 0 3rem;
    }

    .card {
        height: 250px;
    }
    
    .card h2 {
        font-size: 1.25rem;
    }
    .journey-card::after {
        background-position: 0 40%;
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    /* 1番目と4番目のリンクを2列分に広げる */
.cards-grid > a:nth-child(1),
.cards-grid > a:nth-child(4) {
  grid-column: span 1;
}

    .journey-card,
    .overview-card {
        grid-column: auto;
    }


    .card {
        height: 200px;
    }
    
    .card-content {
        padding-left: 0;
        text-align: center;
    }
    
    .card h2 {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    .card-label {
        font-size: 1rem;
    }
    
    .more-link {
        font-size: 0.9375rem;
        bottom: -3rem;
        right: 1.5rem;
    }
    .journey-card::after {
        background-position: 0 102%;
        transform: scale(1.1);
    }
    .achievements-card::after {
        background-position: 45% 50%;
        background-size: 150%;
    }
    .overview-card::after {
        background-position: 50% 45%;
    }
}