.header_wrap {
    overflow: hidden;
    width: auto;
    height: 100%;
}

.header_wrap img {
    aspect-ratio: 3 / 1;
    display: block;
}

.h3_wrapper {
    margin-left: 0px;
}

.header_pic {
    width: 100%;
    height: 100%;
    display: block;
}

.top{
    background-color: var(--themelightblue);
    width: 100%;
    padding: 30px 10% 15px 10%;
    margin-bottom: -30px;
    height: fit-content;
    position: relative;
}

.event_pic{
    width: 30%;
    max-width: 100px;
}

.square_pic{
  width: 100%;
}

.favor {
    background-color: var(--themecream);
    border: solid 1px var(--themered);
    position: absolute;
    right: 10%;
    top: 83px;
    padding: 9px 39px 9px 8px;
    display: inline-block;
    border-radius: 3px;
    cursor: pointer;
    width: 134px;
}

.favor > .favorite_button {
    right: 6px;
    top: 52%;
    transform: translateY(-50%);
}


.card_heart{
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 22px;
    z-index: 12;
    cursor: pointer;
  }

.card_heart img {
    width: 100%;
    height: 100%;
}

.event_name {
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1.3;
    display: block;
    width: 100%;
    padding-top: 10px;
    padding-bottom: 5px;
    position: relative;
}

.event_name::before {
    content: "";
    height: 4px;
    width: 100%;
    position: absolute;
    bottom: 1px;
    transform: scaleY(.5);
    display: block;
    background: var(--themered);
}

.org_name {
    font-size: 1.2em;
}





.mid_part1 {
    padding: 15px 10%;
}

.mid1_component {
    width: 100%;
    display: flex;
    gap: 20px;
    line-height: 5px;
    margin-top: 10px;
    font-size: 1.2em;
    position: relative;
}

.mid1_com_icon {
    height: 25px;
    width: 20px;
    text-align: center;
}

.mid1_com_icon img {
    height: 100%;
    width: 100%;
    margin-top: 2px;
}

.time_icon img {
    margin-top: 0px;
}

.genre_right {
    width: fit-content;
    margin-top: 4px;
}

.sub_info {
    font-size: 0.85em;
}

.days {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 20px;
}

.day_24{
    margin-bottom: 0px;
}

.date {
    color: white;
    background-color: var(--themered);
    padding: 2px 5px;
}

.date p{
    color: white;
}

.location_right {
    margin-top: 4px;
}

.map_link {
    display: inline-block;
    border: solid 2px var(--themered);
    width: fit-content;
    height: fit-content;
    padding: 6px 20px;
    text-align: center;
    line-height: 1;
    font-size: 1em;
    margin-top: 5px;
    transition: all .3s;
    color: var(--themered);
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .map_link:hover {
    background-color: var(--themered);
    color: white;
  }
}



.mid_part2 {
    padding: 15px 10%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mid2_component .h3_wrapper {
    margin-left: 0px;
}

/* SNSアイコンのスタイル */
.sns-icons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.sns-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.sns-icon:hover {
    opacity: 0.8;
}

.x-icon {
    background-color: var(--themered);
}

.instagram-icon {
    background-color: var(--themered);
}

.facebook-icon {
    background-color: var(--themered);
}

.youtube-icon {
    background-color: var(--themered);
}

.website-icon {
    background-color: var(--themered);
}

.sns-icon img {
    width: 25px;
    height: 25px;
    filter: brightness(0) invert(1);
}

.instagram-icon img {
    width: 30px;
    height: 30px;
}

.attention {
    padding: 15px 10%;
}

/* 他の企画のスタイル */
.other-events {
    margin-top: 30px;
    padding: 15px 10%;
}

.other-events-header {
    margin-bottom: 0;
}

.other-events-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.other-events-toggle:hover {
    opacity: 0.8;
}

.other-events-toggle .h3_wrapper {
    margin: 0;
    flex: 1;
}

.accordion-arrow {
    font-size: 16px;
    color: var(--themered);
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.other-events-toggle[aria-expanded="true"] .accordion-arrow {
    transform: rotate(90deg);
}

.other-events-content {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.other-events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

/* 関連企画のスタイル */
.related-events {
    margin-top: 10px;
    padding: 15px 10%;
}

.related-events-header {
    margin-bottom: 0;
}

.related-events-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.related-events-toggle:hover {
    opacity: 0.8;
}

.related-events-toggle .h3_wrapper {
    margin: 0;
    flex: 1;
}

.related-events-content {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.other-events-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 25px;
}

.card_surr img{
    width: 85px;
    height: 85px;
    object-fit: cover;
}

.related-events-list {
    display: flex
;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 25px;
}

.card_genre{
    padding: 5px 12px;
    background: var(--beige40);
    border-radius: 15px;
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
}


@media (min-width: 1024px) {

    main{
        margin-top: 66px;
    }

    .header_wrap {
        display: none;
    }
    .event_name {
        font-size: 24px;
        line-height: 1.6;
    }
    .org_name {
        font-size: 20px;
    }
    .sns-icons {
        gap: 20px;
        margin-top: 15px;
    }
    .sns-icon {
        width: 65px;
        height: 65px;
    }
    .sns-icon img {
        width: 35px;
        height: 35px;
    }
    .mid1_com_icon {
        height: 32px;
        width: 27px;
        text-align: center;
    }
    .favor {
        right: 10%;
        top: 79px;
        padding: 12px 40px 12px 12px;
        width: 185px;
    }
    .card_heart {
        width: 30px;
        height: 28px;
    }
    .favor > .favorite_button {
        right: 9px;
    }

}

/* 企画コマのhover機能（top.phpと同じ） */
.card {
    transition: transform 0.2s ease;
}

.card:hover {
    transform: scale(1.05);
}

/* 1024px以上でのフォントサイズ調整 */
@media (min-width: 1024px) {
    p[style*="font-size: 12px"] {
        font-size: 18px !important;
    }

    .teacher-icon{
        margin-left: 4px;
    }
}