/* ===========================
   Base Styles
=========================== */
body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
    background: #fafafa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    /* 横スクロール防止 */
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

/* ===========================
   Content Sections
=========================== */
.content-section {
    background: white;
    border: 2px solid #f1f3f4;
    border-radius: 20px;
    margin: 30px 0;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.events-section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 25px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
}

.events-section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 2px;
}

.about-text {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ===========================
   Flex and Grid Layouts
=========================== */
.flex-container {
    display: flex;
    flex-wrap: wrap;
    /* はみ出し防止 */
    align-items: center;
    gap: 40px;
    margin: 30px 0;
}

.flex-container.reverse {
    flex-direction: row-reverse;
}

.flex-container>* {
    flex: 1 1 300px;
    /* 最低300pxを確保しつつ可変 */
}

.text-content {
    flex: 1;
}

/* ====== 画像レスポンシブ強化 ====== */
.image-placeholder {
    width: 100%;
    /* 常に親幅いっぱい */
    max-width: 500px;
    /* 大画面での最大幅 */
    height: auto;
    aspect-ratio: 4 / 3;
    /* アスペクト比維持 */
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    display: block;
}

.image-placeholder:hover {
    transform: scale(1.05);
}

/* ダブルイメージ */
.double-image {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
}

.double-image .image-placeholder {
    flex: 1 1 48%;
    /* 半分ずつ */
    max-width: 48%;
    aspect-ratio: 4 / 3;
}

/* ===========================
   Grid Layouts
=========================== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* ===========================
   Cards
=========================== */
.event-card {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    color: #333;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-item {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-3px);
}



/* ===========================
   Stats and CTA
=========================== */
.stats {
    display: flex;
    justify-content: space-around;
    margin: 40px 0;
    text-align: center;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    flex: 1;
    min-width: 200px;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.cta-section {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    text-align: center;
    padding: 50px 40px;
    border-radius: 20px;
    margin: 40px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.cta-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    margin-top: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.future-section {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

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

/* 1024px以下：早めに縦並び */
@media (max-width: 1024px) {
    .content-section {
        padding: 25px;
    }

    .flex-container {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .flex-container>* {
        width: 100%;
        /* 横幅いっぱい */
        max-width: 1000px;
        /* PC寄りでも広めに */
    }

    .text-content {
        width: 100%;
    }

    .double-image {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        width: 100%;
    }

    .double-image .image-placeholder {
        flex: 1 1 48%;
        max-width: 48%;
    }
}

/* 768px以下：完全に縦並び */
@media (max-width: 768px) {
    .content-section {
        padding: 20px;
        margin: 20px 0;
    }

    .flex-container {
        flex-direction: column;
        text-align: center;
    }

    .flex-container>* {
        width: 100%;
        max-width: 100%;
    }


    /* デフォルト: 縦並び（主なイベント含む） */
    .flex-container {
        flex-direction: column;
    }

    /* サービス内容だけ、画像を下にしたい */
    .service-section .flex-container {
        flex-direction: column;
    }

    .service-section .text-content {
        order: 1;
    }

    .service-section .double-image {
        order: 2;
    }

    /* 主なイベントはテキストが先・画像が後（順番固定） */
    .events-section .text-content {
        order: 1;
    }

    .events-section .double-image {
        order: 2;
    }

    .text-content {
        width: 100%;
    }

    .double-image {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .double-image .image-placeholder {
        max-width: 100%;
    }

    .stats {
        flex-direction: column;
    }

    .cta-section,
    .future-section {
        padding: 30px 20px;
    }
}

/* 480px以下：小型スマホ */
@media (max-width: 480px) {
    .content-section {
        padding: 15px;
        margin: 15px 0;
    }

    .events-section-title {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .about-text {
        font-size: 1em;
    }

    .text-content,
    .double-image {
        width: 100%;
    }

    .image-placeholder {
        aspect-ratio: 16 / 10;
    }

    .event-card {
        padding: 20px;
        font-size: 1em;
    }

    .service-item {
        padding: 15px;
        font-size: 0.95em;
    }

    .stat-number {
        font-size: 2em;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }
}