/*
  基本設定（リセット、フォントなど）
*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #333;
    background-color: #f0f0f0;
    line-height: 1.7;
    font-size: 14px;
}

h1, h2, h3 {
    font-weight: 700;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
}

/*
  ヘッダー
*/
.header {
    background-color: #d63333;
    padding: 10px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
}

.instagram-icon {
    display: block;
}

/*
  新しいメインビジュアルのスタイル
*/
.main-visual-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url('https://donchaka-festa.com/img/9512.jpg');
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.background-back,
.main-visual-content {
    grid-area: 1 / 1 / 2 / 2;
}

.background-back {
    width: 650px;
    height: 637px;
    background-image: url('https://donchaka-festa.com/img/back.svg');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
}

.main-visual-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

.main-visual-center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.catchphrase-box {
    background-color: #fff;
    color: #000;
    font-size: 18pt;
    padding: 0;
    display: inline-block;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 10px;
}

.catchphrase-box p {
    padding: 5px 10px;
    margin: 0;
}

.logo {
    width: 230px;
    height: 264px;
    margin-bottom: 10px;
}

.bubble {
    background-color: red;
    color: #fff;
    font-size: 18pt;
    font-weight: bold;
    padding: 0;
    border-radius: 20px;
    margin-bottom: 10px;
    display: inline-block;
}

.bubble p {
    padding: 4px 8px;
    margin: 0;
}

.main-visual-title {
    font-size: 36pt;
    font-weight: bold;
    margin: 0;
    color: #000;
}

.main-visual-date {
    font-size: 18pt;
    margin: 0;
    color: #000;
}

.description-box {
    background-color: #fff;
    color: #000;
    font-size: 14pt;
    max-width: 600px;
    line-height: 1.8;
    text-align: center;
    padding: 0;
    border-radius: 5px;
    margin-top: 15px;
}

.description-box p {
    padding: 15px;
    margin: 0;
}

/*
  メインコンテンツの背景を鮮やかな黄色に、和柄模様を追加
*/
.main-content {
    background-color: #FFD700;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='1' d='M 0,0 L 50,25 L 100,0 M 0,100 L 50,75 L 100,100 M 50,25 L 50,75 M 0,50 L 100,50'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    opacity: 1;
    margin-top: -60px;
    padding-top: 60px;
    padding-bottom: 0;
}

/*
  共通セクションタイトル
*/
.section-title {
    text-align: center;
    font-size: 32px;
    margin: 60px auto 30px;
    display: block;
    width: fit-content;
    padding: 10px 20px;
    background-color: #fff;
    color: #fff; /* ここを修正 */
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

/*
  h2見出しアニメーションのスタイル
*/
.section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: -1;
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.section-title.animated::before {
    transform: translateX(0);
}

.section-title span {
    display: inline-block;
    position: relative;
    z-index: 1;
}

/*
  募集セクション
*/
.recruitment-section {
    text-align: center;
}

.recruitment-box {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.recruitment-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-basis: 45%;
}

.recruitment-item h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.recruitment-item p {
    font-size: 14px;
    margin-bottom: 20px;
}

.recruitment-btn {
    display: inline-block;
    background-color: #d63333;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.recruitment-btn:hover {
    background-color: #ff5555;
}

/*
  募集終了時のスタイル
*/
.recruitment-item.closed {
    background-color: #f0f0f0;
    position: relative;
    overflow: hidden;
    color: #999;
}

.recruitment-item.closed h3,
.recruitment-item.closed p {
    color: #999;
}

.recruitment-item.closed .recruitment-btn {
    background-color: #ccc;
    color: #666;
    pointer-events: none;
    cursor: default;
}


/*
  2カラムセクション
*/
.two-column-section {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 60px;
}

.stage-schedule, .quiz-rally {
    flex-basis: 50%;
}

.stage-schedule {
    text-align: center;
}

.stage-location {
    font-size: 14px;
    margin-bottom: 20px;
    color: #666;
}

.schedule-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: left;
}

.schedule-list li {
    font-size: 14px;
    margin-bottom: 10px;
    border-bottom: 1px dotted #ccc;
    padding: 15px 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.schedule-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.schedule-list li span {
    font-weight: bold;
    color: #d63333;
    width: auto;
}

.quiz-rally {
    text-align: center;
}

.prizes {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quiz-info {
    font-size: 14px;
    font-weight: bold;
    color: #d63333;
    margin-bottom: 10px;
}

.prizes p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 5px;
}

.prize-list {
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

.prize-images {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.prize-item {
    text-align: center;
}

.prize-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/*
  3カラムセクション
*/
.three-column-events {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 60px auto 30px; /* ここを修正 */
}

.event-section {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 25px 25px; /* ここを修正 */
    position: relative;
    overflow: visible;
    transition: transform 0.3s ease;
    height: auto;
    display: flex;
    flex-direction: column;
    margin-top: 40px;
}

.event-section:hover {
    transform: translateY(-5px);
}

.event-bubble {
    /* ここを修正 */
    position: relative;
    margin-top: 10px;
    background-color: #f7a61d;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.event-bubble p {
    margin: 0;
    white-space: nowrap;
}

.event-content {
    margin-top: 0;
    flex-grow: 1;
    margin-top: 15px;
}

.event-content .event-title {
    font-size: 24px;
    font-weight: 700;
    color: #d63333;
    margin-bottom: 10px;
}

.event-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #666;
    margin-top: auto;
    margin-bottom: 10px;
}

.detail-item::before {
    content: "●";
    color: #d63333;
    margin-right: 5px;
}

.campaign-steps {
    list-style: none;
    padding-left: 20px;
}

.campaign-steps p {
    position: relative;
    font-size: 14px;
    margin-bottom: 5px;
}

/*
  フッター
*/
.footer {
    text-align: center;
    background-color: #333;
    color: #fff;
    padding: 40px 20px;
    margin-top: 0;
}

.footer p {
    margin-bottom: 5px;
    font-size: 12px;
}

.organizer {
    font-weight: bold;
    font-size: 14px;
}

/*
  アニメーション
*/
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); opacity: 1; }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animated-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animated-element.animated {
    opacity: 1;
    transform: translateY(0);
}

.logo.animated {
    animation: bounceIn 1s ease-out;
}

.main-visual-title.animated {
    animation-delay: 0.2s;
}

.main-visual-date.animated {
    animation-delay: 0.4s;
}

.catchphrase-box.animated {
    animation-delay: 0.6s;
}

.description-box.animated {
    animation-delay: 0.8s;
}

/* h2見出しアニメーションのスタイル */
.section-title {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    color: #fff;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: -1;
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.section-title.animated::before {
    transform: translateX(0);
}

.section-title span {
    display: inline-block;
    position: relative;
    z-index: 1;
}

/*
  レスポンシブデザイン
*/
@media (max-width: 1024px) {
    .three-column-events {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 10px 15px;
    }

    .main-content {
        margin-top: 0;
        padding-top: 20px;
    }

    .recruitment-box {
        flex-direction: column;
        gap: 20px;
    }

    .recruitment-item {
        flex-basis: 100%;
        padding: 20px;
    }

    .two-column-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .schedule-list {
        padding: 20px;
    }

    .prize-images {
        flex-direction: column;
        gap: 15px;
    }
    
    .prize-image {
        width: 120px;
        height: 120px;
    }
    
    .background-back {
        width: 100%;
        height: auto;
        background-size: 100% auto;
        background-image: url('https://donchaka-festa.com/img/back.svg');
    }

    .main-visual-content {
        gap: 10px;
        width: 100%;
        padding: 10px;
    }

    .catchphrase-box,
    .bubble {
        font-size: 14pt;
    }

    .catchphrase-box p {
        padding: 4px 8px;
    }

    .bubble p {
        padding: 3px 6px;
    }

    .logo {
        width: 150px;
        height: auto;
    }

    .main-visual-title {
        font-size: 28pt;
    }

    .main-visual-date {
        font-size: 16pt;
    }

    .description-box {
        max-width: 90%;
        font-size: 12pt;
    }

    .description-box p {
        padding: 10px;
    }
}