/* 赤ちゃんギャラリー用CSS */
:root {
    --accent-pink: #ffe2ee;
    --accent-blue: #bfdbfe;
    --text-brown: #6b5c54;
    --modal-bg: rgba(0, 0, 0, 0.6);
    --radius-md: 20px;
}

body {
    color: var(--text-brown);
}

#gallery-policy {
    margin-bottom: 150px;
}

.gallery-section h1 {
    font-family: 'Zen Maru Gothic', "Noto Sans JP", "Noto Sans", sans-serif;
    text-align: center;
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 40px;
    position: relative;
}
.gallery-section h1 span {
    padding: 0 15px 5px;
    border-bottom: 12px dotted var(--accent-pink);
}

.gallery-section h1 span::after {
    content: "";
    display: inline-block;
    width: 39px;
    height: 30px;
    background: url(../img/gallery_camera.png) no-repeat center / contain;
    vertical-align: top;
    margin-left: 15px;
    transform: rotate(15deg);
    opacity: 0.8;
}

.gallery-section p:nth-child(2) {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.gallery_textbox {
    background-color: #f3efe8;
}

/* --- ピックアップ固定枠セクション --- */
.pickup-section {
    margin-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* 背景画像設定 */
    background-image: url('../img/kirakira_back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* 画面幅いっぱいにする設定 */
    width: 99vw;
    margin-left: calc(50% - 50vw);
    padding: 60px 0;
    /* 上下の余白 */
    position: relative;
    box-sizing: border-box;
}

.pickup-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0) 10%,
            rgba(255, 255, 255, 0) 90%,
            rgba(255, 255, 255, 1) 100%);
    z-index: 1;
}

.pickup-title {
    font-family: 'Zen Maru Gothic', "Noto Sans JP", "Noto Sans", sans-serif;
    font-size: 34px;
    margin-bottom: 30px;
    padding-bottom: 4px;
    font-weight: bold;
    position: relative;
}
.pickup-title::before {
    content: "";
    position: absolute;
    display: inline-block;
    background: url(../img/baby-h2-2.png) no-repeat center / contain;
    height: 100px;
    width: 90px;
    z-index: 1;
    top: -30px;
    left: -140px;
}
.pickup-title::after {
    content: "";
    position: absolute;
    display: inline-block;
    background: url(../img/baby-h2-1.png) no-repeat center / contain;
    height: 95px;
    width: 70px;
    z-index: 1;
    top: -30px;
    right: -140px;
    transform: rotate(10deg);
}
@media (max-width: 768px) {
    .pickup-title {
        font-size: 23px;
    }
/* }
@media (max-width: 600px) { */
    .pickup-title::before {
        height: 75px;
        width: 60px;
        top: -20px; 
        left: -100px;
    }
    .pickup-title::after {
        height: 70px;
        width: 40px;
        top: -20px; 
        right: -100px;
    }
}
@media (max-width: 443px){
    .pickup-title::before {
        height: 60px;
        left: -60px;
    }
    .pickup-title::after {
        height: 57px;
        right: -55px;
    }
}


/* 吹き出し */
.pickup-bubble {
    position: relative;
    background: #fff3d2;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 360px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s;
    margin-bottom: 24px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 768px) {
    .pickup-bubble {
        padding: 0;
    }
}
@media (max-width: 400px) {
    .pickup-bubble {
        width: 90%;
    }
}

.pickup-bubble.show {
    opacity: 1;
}

/* 吹き出しの三角 (下向き) */
.pickup-bubble::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: #fff3d2 transparent transparent transparent;
}

.bubble-comment {
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 4px;
    color: var(--text-brown);
}
.bubble-name {
    font-size: 16px;
    color: #8fa1b3;
}
@media (max-width: 768px) {
    .bubble-comment { font-size: 16px; }
    .bubble-name { font-size: 14px; }
}


/* 固定枠コンテナ */
.pickup-fixed-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    min-height: 400px;
    width: 100%;
}
@media (max-width: 600px) {
    .pickup-fixed-container {
        padding-bottom: 15px;
    }
}

.pickup-fixed-container::after {
    content: "";
    position: absolute;
    display: inline-block;
    background: url(../img/baby-h2-3.png) no-repeat center / contain;
    height: 100px;
    width: 65px;
    z-index: 1;
    bottom: -30px;
    right: 400px;  
}
@media (min-width: 2700px) {
    section div.pickup-fixed-container::after { right: 1000px; }
}
@media (min-width: 2300px) {
    div.pickup-fixed-container::after { right: 800px; }
}
@media (min-width: 1900px) {
    .pickup-fixed-container::after { right: 600px; }
}
@media (max-width: 1600px) {
    .pickup-fixed-container::after { right: 200px; }
}
@media (max-width: 1200px) {
    .pickup-fixed-container::after { right: 100px; }
}
@media (max-width: 1000px) {
    .pickup-fixed-container::after { right: 50px; }
}
@media (max-width: 600px) {
    .pickup-fixed-container::after {
        height: 75px;
        width: 50px;
        right: 30px;
    }
}

/* 枠共通設定 */
.pickup-slot {
    transition: all 0.5s ease;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* スロット内の画像スタイル */
.pickup-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* スライド用クラス */
.pickup-slot img.slide-new {
    transform: translateX(100%);
    z-index: 2;
}

.pickup-slot img.slide-active {
    transform: translateX(0);
    z-index: 2;
}

.pickup-slot img.slide-exit {
    transform: translateX(-100%);
    z-index: 1;
}

/* メイン枠（中央） */
.pickup-slot.main {
    width: 400px;
    height: 400px;
    z-index: 2;
}

/* サブ枠（左右） */
.pickup-slot.sub {
    width: 200px;
    height: 200px;
    margin-top: 100px;
    z-index: 1;
}

/* SP対応 */
@media (max-width: 768px) {
    .gallery-section h1 {
        font-size: 25px;
        letter-spacing: -1px;
    }
    .gallery-section h1 span::after {
        width: 34px;
        margin-top: 3px;
        margin-left: 10px;
    }

    .gallery-section p:nth-child(3) {
        text-align: left;
    }

    .pickup-section {
        padding-bottom: 40px;
    }

    .pickup-slot.sub {
        display: none;
    }

    .pickup-slot.main {
        width: 100%;
        max-width: 350px;
        height: 350px;
    }
}

@media (max-width: 443px){
    section.gallery-section h1 { font-size: 23px; }
    section.gallery-section h1 span { padding: 0 0 5px; }
    section.gallery-section h1 span::after { width: 28px; } 
}

/* --- 説明セクション --- */
.gallery_textbox {
    width: unset;
}

@media (max-width: 768px) {
    .gallery-section .send {
        width: 85%;
        margin: 10px auto;
    }
}

/* --- グリッド一覧セクション --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

.grid-card {
    background: #fff3d2;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.grid-card:hover {
    opacity: 0.8;
}

.grid-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.grid-info {
    padding: 8px;
    text-align: center;
}

@media (max-width: 768px) {
    .grid-info {
        min-height: 18px;
    }
}

.grid-name {
    font-size: 12px;
    color: #555;
}

.grid-data {
    display: none;
}

/* --- モーダル設定 --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    padding: 0;
    top: unset;
    left: unset;
    -webkit-transform: unset;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-comment {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}
.modal-name {
    text-align: center;
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.modal-info-box {
    background: #fff;
    width: 65%;
    padding: 16px;
    margin-top: 16px;
    border-radius: var(--radius-md);
    text-align: left;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.modal-prev {
    left: -70px;
}

.modal-next {
    right: -70px;
}

@media (max-width: 900px) {

    .modal-image-container {
        width: 80%;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
        background: rgba(0, 0, 0, 0.5);
        /* スマホで見やすいように少し濃く */
    }

    .modal-prev {
        left: -10px;
        /* 画面内に入るように調整 */
    }

    .modal-next {
        right: -10px;
        /* 画面内に入るように調整 */
    }
}

/* --- 装飾イラスト設定 --- */
.deco-baby {
    position: absolute;
    height: 120px;
    width: auto;
    z-index: 9;
    pointer-events: none;
}

/* 各イラストの配置微調整 */
.deco-baby-4 {
    top: -120px;
    left: -80px;
}
.deco-baby-5 {
    bottom: -80px;
    right: -90px;
    left: auto;
}
@media (max-width: 1200px) {
    .deco-baby {
        height: 100px;
    }
    .deco-baby-4 {
        left: -20px;
    }
    .deco-baby-5 {
        bottom: -130px;
        right: 10px;
    }
}
@media (max-width: 768px) {
    .deco-baby {
        height: 80px;
    }
    .deco-baby-4 {
        left: -10px;
    }
    .deco-baby-5 {
        bottom: -100px;
        right: -10px;
    }
}