@charset "UTF-8";

/* =========================================================
   年間行事ページ
========================================================= */

.ae-page {
    --ae-text-color: #4f463f;
    --ae-border-color: rgba(107, 91, 77, 0.16);
    --ae-surface-color: rgba(255, 255, 255, 0.92);
    color: var(--ae-text-color);
}

.ae-section {
    position: relative;
    z-index: 1;
    padding: clamp(3.5rem, 7vw, 7rem) 0;
}


/* =========================================================
   ページ見出し
========================================================= */

.ae-page-header {
    margin-bottom: clamp(3.5rem, 7vw, 6.5rem);
    text-align: center;
}

.ae-page-header .midashi img {
    display: block;
    width: min(100%, 560px);
    height: auto;
    margin-inline: auto;
}

.ae-page-lead {
    margin: 0;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 2;
    letter-spacing: 0.08em;
}


/* =========================================================
   月別表示
========================================================= */

.ae-month-list {
    display: grid;
    gap: clamp(4rem, 8vw, 7.5rem);
}

.ae-month {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    scroll-margin-top: 2rem;
}

.ae-month__side {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
}

.ae-month-heading {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
}

.ae-month-heading__image {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.ae-timeline {
    display: flex;
    width: 100%;
    min-height: 4rem;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
}

.ae-timeline__marker {
    width: 13px;
    height: 13px;
    margin-top: 1rem;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--ae-month-color);
    box-shadow: 0 0 0 2px var(--ae-month-color);
}

.ae-timeline__line {
    width: 3px;
    min-height: 3rem;
    flex: 1 1 auto;
    margin-top: 0.5rem;
    border-radius: 999px;
    background-color: var(--ae-month-color);
    background: linear-gradient(
        to bottom,
        var(--ae-month-color),
        color-mix(in srgb, var(--ae-month-color) 18%, transparent)
    );
}

.ae-month__content {
    min-width: 0;
    padding-top: 0.35rem;
}


/* =========================================================
   行事一覧
========================================================= */

.ae-event-list {
    display: grid;
    gap: 1rem;
}

.ae-event-row {
    margin: 0;
}


/* 写真がある行事 */
.ae-event-row--with-image {
    display: grid;
    grid-template-columns: minmax(220px, 38%) minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--ae-border-color);
    border-left: 5px solid var(--ae-month-color, #d98aa6);
    border-radius: 1.25rem;
    background: var(--ae-surface-color);
    box-shadow: 0 12px 32px rgba(91, 75, 61, 0.08);
}

.ae-event-row__image {
    overflow: hidden;
    margin: 0;
    border-radius: 0.9rem;
    background: #f2eee9;
    aspect-ratio: 4 / 3;
}

.ae-event-row__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ae-event-row__body {
    min-width: 0;
    padding: 0.25rem 0;
}

.ae-event-row__title {
    position: relative;
    margin: 0;
    padding-bottom: 0.75rem;
    color: var(--ae-text-color);
    font-size: clamp(1.3rem, 2.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.06em;
}

.ae-event-row__title::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3.5rem;
    height: 3px;
    border-radius: 999px;
    background: var(--ae-month-color, #d98aa6);
    content: "";
}

.ae-event-row__text {
    margin-top: 1rem;
    color: #655b53;
    font-size: 1rem;
    line-height: 1.9;
}

.ae-event-row__text > :first-child {
    margin-top: 0;
}

.ae-event-row__text > :last-child {
    margin-bottom: 0;
}

.ae-event-row__text img,
.ae-event-row__text iframe,
.ae-event-row__text video {
    max-width: 100%;
    height: auto;
}


/* 写真がない行事 */
.ae-event-row--simple {
    position: relative;
    padding: 0.8rem 1rem 0.8rem 2.2rem;
    border-bottom: 1px dashed var(--ae-border-color);
}

.ae-event-row--simple::before {
    position: absolute;
    top: 1.3rem;
    left: 0.75rem;
    width: 0.65rem;
    height: 0.65rem;
    transform: rotate(45deg);
    border-radius: 65% 35% 65% 35%;
    background: var(--ae-month-color, #d98aa6);
    content: "";
}

.ae-event-row__simple-title {
    margin: 0;
    color: var(--ae-text-color);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.7;
    letter-spacing: 0.06em;
}


/* =========================================================
   毎月の行事
========================================================= */

.ae-monthly {
    --ae-month-color: #d98aa6;
    margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.ae-event-list--monthly {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.ae-event-list--monthly .ae-event-row--with-image {
    grid-template-columns: minmax(150px, 40%) minmax(0, 1fr);
    height: 100%;
}

.ae-event-list--monthly .ae-event-row--simple {
    align-self: start;
}


/* =========================================================
   タブレット
========================================================= */

@media (max-width: 991.98px) {
    .ae-month {
        grid-template-columns: 92px minmax(0, 1fr);
        column-gap: 1.75rem;
    }

    .ae-month-heading__image {
        width: 82px;
        height: 82px;
    }

    .ae-event-row--with-image,
    .ae-event-list--monthly .ae-event-row--with-image {
        grid-template-columns: minmax(180px, 42%) minmax(0, 1fr);
    }

    .ae-event-list--monthly {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   スマートフォン
========================================================= */

@media (max-width: 767.98px) {
    .ae-section {
        padding: 3.5rem 0 5rem;
    }

    .ae-page-header {
        margin-bottom: 3.75rem;
    }

    .ae-page-lead {
        text-align: left;
    }

    .ae-month-list {
        gap: 4.5rem;
    }

    .ae-month {
        display: block;
    }

    .ae-month__side {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .ae-month-heading__image {
        width: 76px;
        height: 76px;
    }

    .ae-timeline {
        min-height: 0;
        flex-direction: row;
    }

    .ae-timeline__marker {
        flex: 0 0 auto;
        margin: 0;
    }

    .ae-timeline__line {
        width: auto;
        min-width: 0;
        height: 3px;
        min-height: 3px;
        margin: 0 0 0 0.5rem;
        background-color: var(--ae-month-color);
        background: linear-gradient(
            to right,
            var(--ae-month-color),
            color-mix(in srgb, var(--ae-month-color) 18%, transparent)
        );
    }

    .ae-month__content {
        padding: 0;
    }

    .ae-event-row--with-image,
    .ae-event-list--monthly .ae-event-row--with-image {
        grid-template-columns: 1fr;
        gap: 1.15rem;
        padding: 0.85rem 0.85rem 1.25rem;
        border-left-width: 1px;
        border-top: 5px solid var(--ae-month-color, #d98aa6);
    }

    .ae-event-row__body {
        padding: 0 0.4rem;
    }

    .ae-event-row__image {
        aspect-ratio: 16 / 10;
    }

    .ae-event-row--simple {
        padding-right: 0.5rem;
    }
}


/* =========================================================
   動きを減らす設定
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .ae-page *,
    .ae-page *::before,
    .ae-page *::after {
        scroll-behavior: auto !important;
    }
}
