/* カスタムプロパティの定義 */
:root {
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 14px;
    --font-size-large: 28px;
    --font-size-medium: 24px;
    --font-size-small: 16px;
    --font-size-xsmall: 14px;
    --font-color-primary: #3498db;
    --font-color-secondary: #666;
    --background-color: #f4f4f4;
    --background-color-light: #ffffff;
    --background-color-dark: #000000;
    --border-radius: 5px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --hero-height: 300px;
    --hero-font-size-h1: 45px;
    --hero-font-size-p: 23px;
    --hero-background-image: url('../image/hero-image.jpg');
    --transition-duration: 0.3s;
}

/* Reset some default styles */
body, h1, h2, h3, h4, p, ul {
    margin: 0;
    padding: 0;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-color);
}

/* Container for consistent page width */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* アニメーション */
@keyframes fadeInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(100px);
    animation: fadeInFromBottom 2s ease forwards;
    animation-delay: 0.5s;
}

/* Hero section styles */
.hero {
    position: relative;
    height: var(--hero-height);
    color: #fff;
    text-align: center;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: var(--hero-background-image);
    background-size: cover;
    background-position: center;
    margin-top: 60px;
    


    .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
    padding: 20px;
}

    ::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    animation: fade 12s infinite;
    z-index: -1;
}

    & h1 {
    font-size: var(--hero-font-size-h1);
    margin-bottom: 20px;
    padding: 10px;
    text-shadow: 5px 5px 10px rgba(0, 0, 0, 0.6);
}

    & p {
    font-size: var(--hero-font-size-p);
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 5px 5px 10px rgba(8, 8, 8, 0.6);
}
}

/* Section styles */
.section {
    padding: 60px 0;
    background-color: #f7f7f7;


    .st {
    text-align: center;
    font-size: var(--font-size-large);
    margin-bottom: 50px;
    color: #333;
}

    ul.flex {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 20px;
}

    ul.flex li.wide_1_3 {
    flex: 1;
    background-color: var(--background-color-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInFromBottom 1.5s ease forwards;
}

    ul.flex li.wide_1_3:nth-child(1) {
    animation-delay: 0.4s;
}

    ul.flex li.wide_1_3:nth-child(2) {
    animation-delay: 0.8s;
}

    ul.flex li.wide_1_3:nth-child(3) {
    animation-delay: 1.2s;
}

    ul.flex .img {
    overflow: hidden;
}

    ul.flex .img img {
    width: 100%;
    height: 260px;
    border-bottom: 3px solid var(--font-color-primary);
    object-fit: cover;
}

    ul.flex .text {
    padding: 20px;
    text-align: center;
}

    ul.flex .text .sst {
    font-size: var(--font-size-medium);
    margin-bottom: 15px;
    color: var(--font-color-primary);
}

    ul.flex .text p {
    font-size: var(--font-size-small);
    color: var(--font-color-secondary);
    line-height: 1.5;
}
}
/* Services section styles */
.services {
    background: var(--background-color-light);
    padding: 40px 0;
}

    & h2 {
    text-align: center;
    font-size: var(--font-size-large);
    margin-bottom: 40px;
}

.full-width-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 20px;
}

.service-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}


.service-item:nth-child(1) {
    animation-delay: 0.2s;
}

.service-item:nth-child(2) {
    animation-delay: 0.4s;
}

.service-item:nth-child(3) {
    animation-delay: 0.6s;
}

.service-item:nth-child(4) {
    animation-delay: 0.8s;
}

.service-item:nth-child(5) {
    animation-delay: 1s;
}

.service-item {
    position: relative;
    background: var(--background-color);
    border-radius: var(--border-radius);
    text-align: center;
    flex: 1 1 calc(33.333% - 20px);
    box-sizing: border-box;
    margin-bottom: 20px;
    cursor: pointer;
    overflow: hidden;
    transition: background-color var(--transition-duration) ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInFromBottom 1.5s ease forwards;

& img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

& h3 {
    font-size: 1.5em;
    margin: 10px 20px;
    color: var(--font-color-primary);
}

& p {
        font-size: 1em;
        color: var(--font-color-secondary);
        margin-bottom: 40px; /* Increased margin to ensure there's space above the button */
        padding: 0 20px 20px 20px;
}

.more-link,
.works .more-link {
    position: absolute;
    bottom: 20px; /* Adjust the distance from the bottom */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--background-color-dark);
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-duration) ease;
}

}
.service-item:hover {
    background-color: #e0e0e0;
}

.more-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--background-color-dark);
    color: #fff;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-duration) ease;
}

.more-link:hover {
    background-color: #555555;
}


/* Works section styles */
.works {
    padding: 40px 20px 20px 20px;
    background-color: var(--background-color-light);
    overflow: hidden;


    .container {
    overflow-x: hidden;
}

    & h2 {
    text-align: center;
    font-size: var(--font-size-large);
    margin-bottom: 40px;
}
}

.works-carousel {
    display: flex;
    gap: 20px;
    padding: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.works-item {
    flex: 0 0 auto;
    width: 220px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-sizing: border-box;
    scroll-snap-align: start;
    color: var(--font-color-primary);
    text-align: center; 

    & img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    margin: 0 auto; 
    display: block; 
}

    & h3 {
    font-size: 1.5em;
    margin: 10px 0;
}

    & p {
    font-size: 1em;
    color: var(--font-color-secondary);
}
}

.more-section {
    background-color: var(--background-color-light);
    padding: 20px;
    text-align: center;
}

.more-button-container {
    display: inline-block;
    margin-top: 20px;

    .more-link-custom {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--background-color-dark);
    color: #fff;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-duration) ease;
}

    .more-link-custom:hover {
    background-color: #555555;
}
}

/* NEWSセクションのスタイル */
.news-section {
    padding: 40px 0;
    background-color: #f4f4f4;


    &h2 {
    font-size: 25px;
    text-align: center;
    margin-bottom: 30px;
}
}

.news-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.news-item {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    flex: 1 1 calc(50% - 20px);
    box-sizing: border-box;
    text-align: center;
}

/* スマホ幅のスタイル */
@media (max-width: 768px) {
    .section ul.flex {
        flex-direction: column;
    }

    .section ul.flex li.wide_1_3 {
        flex: 1 1 100%;
        margin-bottom: 20px;
    }

    .service-items {
        flex-direction: column;
    }

    .service-item {
        flex: 1 1 100%;
        margin-bottom: 20px;
    }

    .news-item {
        flex: 1 1 100%;
    }

    .works-carousel {
        display: flex;
        gap: 10px;
        padding: 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .works-item {
        flex: 0 0 auto;
        width: 250px;
        box-sizing: border-box;
        scroll-snap-align: start;
    

    & img {
        width: 100%;
        height: auto;
    }
}
}