/* =====================================================
    デジタルスタンプラリー 公式ポータル
    portal/css/portal.css
===================================================== */


/* =====================================================
    基本設定
===================================================== */

:root {
    --portal-bg: #f5f0e8;
    --portal-bg-light: #fffdf9;
    --portal-text: #302d2a;
    --portal-text-light: #746d65;
    --portal-accent: #bd6335;
    --portal-accent-dark: #854021;
    --portal-accent-soft: #f2dfcf;
    --portal-border: rgba(82, 62, 47, 0.12);
    --portal-shadow: 0 18px 50px rgba(63, 47, 35, 0.13);
    --portal-radius-large: 26px;
    --portal-radius-medium: 18px;
}


* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
    background: var(--portal-bg);
}


body {
    position: relative;
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(180deg,
            #f4ede3 0%,
            #fffdf9 42%,
            #f6f0e7 100%);
    color: var(--portal-text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Helvetica Neue",
        "Hiragino Kaku Gothic ProN",
        "Hiragino Sans",
        "Yu Gothic",
        Meiryo,
        sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


img {
    display: block;
    max-width: 100%;
}


a {
    color: inherit;
    text-decoration: none;
}


/* =====================================================
    背景装飾
===================================================== */

.portal-background {
    position: fixed;
    top: -160px;
    left: 50%;
    width: 760px;
    height: 760px;
    border-radius: 50%;
    background:
        radial-gradient(circle,
            rgba(225, 159, 107, 0.24) 0%,
            rgba(225, 159, 107, 0.09) 44%,
            rgba(225, 159, 107, 0) 72%);
    pointer-events: none;
    transform: translateX(-50%);
    z-index: 0;
}


.portal-background::before {
    content: "";
    position: absolute;
    top: 240px;
    left: -280px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background:
        radial-gradient(circle,
            rgba(194, 126, 78, 0.11) 0%,
            rgba(194, 126, 78, 0) 70%);
}


.portal-background::after {
    content: "";
    position: absolute;
    top: 420px;
    right: -300px;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    background:
        radial-gradient(circle,
            rgba(130, 143, 101, 0.10) 0%,
            rgba(130, 143, 101, 0) 70%);
}


/* =====================================================
    ヘッダー
===================================================== */

.portal-header {
    position: relative;
    width: 100%;
    padding: 0;
    text-align: center;
    z-index: 1;
}


.portal-header-inner {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}


.portal-main-visual {
    width: 100%;
}


.portal-main-visual img {
    width: 100%;
    height: auto;
}

.portal-site-label {
    margin: 0 0 14px;
    color: var(--portal-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.24em;
}


.portal-header h1 {
    margin: 0;
    font-size: clamp(30px, 7vw, 48px);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: 0.02em;
}


.portal-header h1 span {
    display: inline-block;
    margin-top: 3px;
    color: var(--portal-text-light);
    font-size: 0.72em;
    font-weight: 500;
    letter-spacing: 0.08em;
}


/* =====================================================
    メイン
===================================================== */

.portal-main {
    position: relative;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px 90px;
    z-index: 1;
}


.rally-section {
    width: 100%;
}


.section-heading {
    margin-bottom: 25px;
    text-align: center;
}


.section-heading-label {
    margin: 0 0 8px;
    color: var(--portal-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
}


.section-heading h2 {
    margin: 0;
    font-size: clamp(23px, 5vw, 34px);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.03em;
}


/* =====================================================
    ラリー一覧
===================================================== */

.rally-list {
    display: grid;
    width: 100%;
    gap: 24px;
}


/* 1件表示 */
.rally-list-single {
    display: block;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}


/* 複数件表示 */
.rally-list-grid {
    grid-template-columns:
        repeat(2,
            minmax(0, 1fr));
}


/* =====================================================
    ラリーカード
===================================================== */

.rally-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius-large);
    background:
        rgba(255,
            255,
            255,
            0.88);

    box-shadow: var(--portal-shadow);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.rally-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}


.rally-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #e9dfd4;
    aspect-ratio: 860 / 680;
}


.rally-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(0, 0, 0, 0) 62%,
            rgba(0, 0, 0, 0.12) 100%);
    pointer-events: none;
}


.rally-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}


.rally-card-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    background:
        linear-gradient(135deg,
            #ead4c1,
            #f8eee5);
}


.rally-card-image-empty span {
    color: rgba(76, 55, 41, 0.42);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
}


/* =====================================================
    カード内容
===================================================== */

.rally-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 25px 26px 27px;
}


.rally-card-content h3 {
    margin: 0;
    font-size: clamp(21px, 3vw, 29px);
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0.02em;
}


.rally-meta {
    margin-top: 3px;
}


.rally-meta p {
    margin: 0;
}


.rally-period {
    margin-bottom: 5px;
    color: var(--portal-accent);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}


.rally-organizer {
    color: var(--portal-text);
    font-size: 14px;
    line-height: 1.6;
}


.rally-description {
    margin: 8px 0 0;
    color: var(--portal-text-light);
    font-size: 15px;
    line-height: 1.5;
    text-align: justify;
}


.rally-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-width: 210px;
    min-height: 48px;
    margin-top: 24px;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--portal-accent);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    box-shadow:
        0 8px 18px rgba(189, 99, 53, 0.24);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}


.rally-card-button::after {
    content: "›";
    margin-left: 10px;
    font-size: 23px;
    font-weight: 400;
    line-height: 0.8;
}


/* =====================================================
    0件表示
===================================================== */

.no-rally-message {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 55px 24px;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius-large);
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
        0 14px 40px rgba(63, 47, 35, 0.08);
    text-align: center;
}


.no-rally-message p {
    margin: 0;
    color: var(--portal-text-light);
    font-size: 16px;
    line-height: 1.8;
}


/* =====================================================
    フッター
===================================================== */

.portal-footer {
    position: relative;
    padding:
        26px 20px calc(26px + env(safe-area-inset-bottom));
    border-top:
        1px solid rgba(82, 62, 47, 0.08);
    color: var(--portal-text-light);
    text-align: center;
    z-index: 1;
}


.portal-footer p {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.06em;
}


/* =====================================================
    ホバー操作が使える端末
===================================================== */

@media (hover: hover) and (pointer: fine) {

    .rally-card:hover {
        transform: translateY(-5px);
        box-shadow:
            0 24px 65px rgba(63, 47, 35, 0.18);
    }


    .rally-card:hover .rally-card-image img {
        transform: scale(1.035);
    }


    .rally-card:hover .rally-card-button {
        background: var(--portal-accent-dark);

        transform: translateX(3px);
    }
}


/* =====================================================
    タブレット・スマートフォン
===================================================== */

@media screen and (max-width: 760px) {

    .portal-background {
        top: -220px;
        width: 620px;
        height: 620px;
    }


    .portal-header {
        padding: 0;
    }


    .portal-header-inner {
        max-width: none;
    }


    .section-heading {
        margin-bottom: 20px;
    }


    /* 複数件でもスマートフォンは1列 */
    /* ココから
    .rally-list-grid {
        grid-template-columns: 1fr;
    }

    .rally-list {
        gap: 20px;
    }


    .rally-card {
        border-radius: 22px;
    }


    .rally-card-content {
        padding: 21px 20px 23px;
    }


    .rally-card-button {
        width: 100%;
        min-width: 0;
        margin-top: 21px;
    }
    ココまで */


    
    /* 複数件表示はスマートフォンでも2列 */
    .rally-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rally-list {
        gap: 12px;
    }


    .rally-card {
        border-radius: 18px;
    }


    .rally-card-content {
        padding: 15px 13px 17px;
    }


    .rally-card-content h3 {
        font-size: 17px;
        line-height: 1.45;
    }


    .rally-period {
        font-size: 12px;
        line-height: 1.5;
    }


    .rally-organizer {
        font-size: 12px;
        line-height: 1.55;
    }


    .rally-description {
        display: -webkit-box;
        margin-top: 7px;
        overflow: hidden;
        font-size: 13px;
        line-height: 1.55;
        text-align: left;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 6;
        line-clamp: 6;
    }


    .rally-card-button {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        margin-top: 16px;
        padding: 10px 6px;
        font-size: 12px;
        white-space: nowrap;
    }


    .rally-card-button::after {
        margin-left: 6px;
        font-size: 19px;
    }
}


/* =====================================================
    小さいスマートフォン
===================================================== */

@media screen and (max-width: 390px) {

    .portal-header h1 {
        font-size: 28px;
    }


    .section-heading h2 {
        font-size: 22px;
    }


    .rally-card-content h3 {
        font-size: 21px;
    }


    .rally-description {
        font-size: 14px;
    }


    .rally-card-button {
        min-height: 46px;

        font-size: 14px;
    }
}


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

@media (prefers-reduced-motion: reduce) {

    .rally-card,
    .rally-card-image img,
    .rally-card-button {
        transition: none;
    }
}