﻿






/* ===== 手機版加強：更適合細螢幕 ===== */
@media (max-width: 600px) {
    .container {
        padding: 8px;
    }

    header {
        padding: 16px 0 22px;
    }

    .title-wrapper {
        gap: 6px;
    }

    .mascot {
        width: 44px;
    }

    h1 {
        font-size: 1.28rem;
        padding: 9px 18px;
    }

    main {
        padding: 12px;
        border-radius: 20px;
    }

    .banner-img {
        border-radius: 16px;
    }

    .social-links {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 12px;
        margin: 18px 0;
    }

    .social-item {
        min-height: 82px;
        font-size: 0.72rem;
        padding: 8px 4px;
    }

    .social-item img {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .polaroid-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .polaroid {
        padding: 8px 8px 32px;
    }

    .polaroid figcaption {
        font-size: 0.68rem;
        bottom: 7px;
    }
}
/* ===== 還原呼吸感、背景層次、柔和學校風格 ===== */

body {
    background:
        radial-gradient(circle at 8% 8%, rgba(78, 205, 196, 0.24), transparent 28%),
        radial-gradient(circle at 92% 18%, rgba(255, 107, 107, 0.18), transparent 26%),
        radial-gradient(circle at 18% 88%, rgba(255, 220, 120, 0.22), transparent 30%),
        var(--cream);
    min-height: 100vh;
}

.container {
    width: min(100%, 1080px);
    padding: clamp(18px, 4vw, 36px);
}

header {
    padding: clamp(28px, 6vw, 58px) 0 clamp(28px, 5vw, 48px);
}

.title-wrapper {
    gap: clamp(10px, 3vw, 22px);
}

.mascot {
    width: clamp(58px, 12vw, 96px);
}

h1 {
    padding: clamp(11px, 2.5vw, 16px) clamp(26px, 6vw, 46px);
    font-size: clamp(1.45rem, 5vw, 2.45rem);
    box-shadow: 0 8px 22px rgba(78, 205, 196, 0.32);
}

main {
    padding: clamp(22px, 5vw, 42px);
    border-radius: clamp(26px, 5vw, 38px);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 38px rgba(93, 64, 55, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.banner-section {
    margin-bottom: clamp(26px, 5vw, 40px);
}

.banner-img {
    border-radius: clamp(20px, 4vw, 30px);
    box-shadow: 0 10px 28px rgba(93, 64, 55, 0.12);
}

.social-links {
    margin: clamp(28px, 5vw, 42px) 0;
    padding: clamp(18px, 4vw, 30px);
    gap: clamp(14px, 3vw, 24px);
    border-radius: 28px;
    background: rgba(250, 250, 250, 0.9);
}

.social-item {
    min-height: clamp(100px, 18vw, 132px);
    border-radius: 22px;
}

.social-item img {
    width: clamp(54px, 11vw, 74px);
    height: clamp(54px, 11vw, 74px);
}

.gallery-title {
    margin: clamp(34px, 6vw, 52px) 0 clamp(20px, 4vw, 30px);
    font-size: clamp(1.35rem, 4.5vw, 1.8rem);
}

.polaroid-grid {
    gap: clamp(22px, 4vw, 36px);
    margin-top: clamp(22px, 4vw, 32px);
}

.polaroid {
    padding: clamp(12px, 2.5vw, 16px) clamp(12px, 2.5vw, 16px) clamp(40px, 6vw, 52px);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(93, 64, 55, 0.11);
}

.polaroid img {
    border-radius: 5px;
}

.polaroid-caption {
    bottom: 12px;
    font-size: clamp(0.72rem, 2vw, 0.82rem);
}

/* 電腦版：更鬆、更像相簿牆 */
@media (min-width: 768px) {
    .polaroid-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 38px;
    }

    .social-links {
        padding: 30px;
    }
}

/* 手機版：保留兩欄，但不要太擠 */
@media (max-width: 600px) {
    .container {
        padding: 16px 12px;
    }

    header {
        padding: 28px 0 30px;
    }

    .mascot {
        width: 54px;
    }

    h1 {
        font-size: 1.45rem;
        padding: 11px 24px;
    }

    main {
        padding: 18px;
        border-radius: 26px;
    }

    .social-links {
        padding: 16px;
        gap: 12px;
        margin: 28px 0;
    }

    .social-item {
        min-height: 96px;
        font-size: 0.78rem;
    }

    .social-item img {
        width: 48px;
        height: 48px;
    }

    .polaroid-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .polaroid {
        padding: 10px 10px 38px;
    }
}

/* 非常細手機：避免兩欄太迫 */
@media (max-width: 340px) {
    .polaroid-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== 強制讓內容區顯示柔和背景 ===== */

:root {
    --primary-mint: #4ECDC4;
    --primary-mint-dark: #35B8AF;
    --pink: #FF6B6B;
    --cream: #FFF9E6;
    --brown: #5D4037;
}

/* 網站後台有時不吃 body，所以同時套用到 container */
body,
.container {
    background:
        radial-gradient(circle at 8% 8%, rgba(78, 205, 196, 0.24), transparent 28%),
        radial-gradient(circle at 92% 18%, rgba(255, 107, 107, 0.18), transparent 26%),
        radial-gradient(circle at 18% 88%, rgba(255, 220, 120, 0.22), transparent 30%),
        #FFF9E6 !important;
}

/* 令背景有足夠空間顯示 */
.container {
    padding: clamp(18px, 4vw, 36px) !important;
    border-radius: 0;
}
/* ===== 每張相片加入呼吸感及動態效果 ===== */

/* 重新定義相簿卡片，配合你現在的 HTML 結構：.polaroid > .polaroid-link */
.polaroid-grid > .polaroid {
    --tilt: 0deg;
    position: relative;
    overflow: hidden;
    transform: rotate(var(--tilt));
    animation: photo-breathe 5.5s ease-in-out infinite;
    transform-origin: center center;
    will-change: transform, box-shadow;
}

/* 電腦版保留拍立得微微錯落感 */
@media (min-width: 768px) {
    .polaroid-grid > .polaroid:nth-child(odd) {
        --tilt: -1.4deg;
    }

    .polaroid-grid > .polaroid:nth-child(even) {
        --tilt: 1.4deg;
    }
}

/* 每張相延遲不同時間，避免全部一起郁，感覺更自然 */
.polaroid-grid > .polaroid:nth-child(1) { animation-delay: 0s; }
.polaroid-grid > .polaroid:nth-child(2) { animation-delay: 0.35s; }
.polaroid-grid > .polaroid:nth-child(3) { animation-delay: 0.7s; }
.polaroid-grid > .polaroid:nth-child(4) { animation-delay: 1.05s; }
.polaroid-grid > .polaroid:nth-child(5) { animation-delay: 1.4s; }
.polaroid-grid > .polaroid:nth-child(6) { animation-delay: 1.75s; }
.polaroid-grid > .polaroid:nth-child(7) { animation-delay: 2.1s; }
.polaroid-grid > .polaroid:nth-child(8) { animation-delay: 2.45s; }
.polaroid-grid > .polaroid:nth-child(9) { animation-delay: 2.8s; }
.polaroid-grid > .polaroid:nth-child(10) { animation-delay: 3.15s; }
.polaroid-grid > .polaroid:nth-child(11) { animation-delay: 3.5s; }
.polaroid-grid > .polaroid:nth-child(12) { animation-delay: 3.85s; }

/* 呼吸動畫：輕微上浮、放大、陰影變柔 */
@keyframes photo-breathe {
    0%, 100% {
        transform: rotate(var(--tilt)) translateY(0) scale(1);
        box-shadow: 0 10px 24px rgba(93, 64, 55, 0.11);
    }

    50% {
        transform: rotate(var(--tilt)) translateY(-5px) scale(1.018);
        box-shadow: 0 16px 30px rgba(78, 205, 196, 0.20);
    }
}

/* 圖片本身也有非常輕微的 zoom，令畫面更有生命感 */
.polaroid img {
    transition: transform 0.45s ease, filter 0.45s ease;
}

/* 滑鼠移上或手機點擊聚焦時，卡片更明顯浮起 */
.polaroid:hover,
.polaroid:focus-within {
    animation-play-state: paused;
    transform: rotate(0deg) translateY(-10px) scale(1.035) !important;
    box-shadow: 0 18px 36px rgba(78, 205, 196, 0.26) !important;
    border-color: var(--primary-mint);
    z-index: 3;
}

/* hover 時圖片輕微放大，但不變形 */
.polaroid:hover img,
.polaroid:focus-within img {
    transform: scale(1.045);
    filter: brightness(1.04) saturate(1.08);
}

/* 加一層淡淡光暈，令動態更柔和 */
.polaroid::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.35),
        rgba(78, 205, 196, 0.08),
        rgba(255, 107, 107, 0.08)
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 1;
}

.polaroid:hover::before,
.polaroid:focus-within::before {
    opacity: 1;
}

/* 確保相片和文字在光暈上面 */
.polaroid img,
.polaroid-caption {
    position: relative;
    z-index: 2;
}

/* 你的 a 在 polaroid 入面，所以要確保整張卡片都可點擊 */
.polaroid-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}