@charset "UTF-8";

/* -------------------------------------
   共通変数（色・テーマ）
-------------------------------------- */
:root {
    --primary: #c25e24; /* 温かいオレンジ */
    --bg-color: #fcf9f2; /* 古い紙のようなクリーム色 */
    --text-main: #3d2f26; /* テキスト用のダークブラウン */
}

/* -------------------------------------
   リセット＆基本設定
-------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Yu Mincho', 'Sawarabi Mincho', serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; /* 横スクロール防止 */
    -webkit-text-size-adjust: 100%; /* スマホでの文字サイズ自動拡大を防止 */
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* -------------------------------------
   各種アニメーション定義
-------------------------------------- */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   index.html 用スタイル
========================================================================= */

/* -------------------------------------
   ヒーローセクション（トップ画面）
-------------------------------------- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('images/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(61, 47, 38, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    padding: 20px;
    width: 100%;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    animation: fadeInDown 1.5s ease-out;
}

.hero p {
    font-size: 1.4rem;
    animation: fadeInUp 1.5s ease-out 0.5s both;
}

/* -------------------------------------
   コンテンツエリア（共通設定）
-------------------------------------- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px;
}

.title-with-btn {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

h2.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0; /* title-with-btn で余白を管理するため 0 に */
    color: var(--primary);
    position: relative;
}

h2.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    margin: 8px auto 0;
    border-radius: 2px;
}

/* 校歌再生ボタン */
.bgm-btn {
    background: white;
    border: 1.5px solid var(--primary); /* 少し線を細く */
    color: var(--primary);
    padding: 4px 10px; /* 余白を小さく */
    border-radius: 30px;
    font-size: 0.75rem; /* 文字を小さく */
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    font-weight: bold;
    font-family: sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    margin-top: -10px; /* タイトルの下線にぶつからないよう少し上げる */
}
.bgm-btn img {
    width: 16px; /* アイコンを小さく */
    height: 16px;
    object-fit: contain;
}
.bgm-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}
.bgm-btn:hover img {
    filter: brightness(0) invert(1);
}
.bgm-btn.playing {
    background: var(--primary);
    color: white;
    animation: pulseBgm 2s infinite;
}
.bgm-btn.playing img {
    filter: brightness(0) invert(1);
}

@keyframes pulseBgm {
    0% { box-shadow: 0 0 0 0 rgba(194, 94, 36, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(194, 94, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(194, 94, 36, 0); }
}


.gallery {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.polaroid {
    background: white;
    padding: 15px 15px 40px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
    max-width: 350px;
    width: 100%; /* スマホできれいに収まるように */
}

.polaroid:nth-child(even) {
    transform: rotate(4deg);
    margin-top: 20px;
}

.polaroid:hover {
    transform: scale(1.05) rotate(0deg);
    z-index: 10;
}

.polaroid img {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
}

.polaroid-caption {
    text-align: center;
    margin-top: 15px;
    font-family: sans-serif;
    color: #666;
    font-size: 0.9rem;
}

/* -------------------------------------
   開催概要（カードデザイン）
-------------------------------------- */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 60px;
    border: 1px solid #f0e6d2;
}

.info-row {
    display: flex;
    border-bottom: 1px dashed #e0d5c1;
    padding: 20px 0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    width: 120px;
    font-weight: bold;
    color: var(--primary);
    flex-shrink: 0;
}

.info-value {
    flex: 1;
}

/* -------------------------------------
   コールトゥアクション (出欠ボタン等)
-------------------------------------- */
.cta-section {
    text-align: center;
    margin-top: 60px;
    padding: 60px 20px;
    background-color: rgba(194, 94, 36, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(194, 94, 36, 0.2);
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 18px 40px;
    font-size: 1.2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(194, 94, 36, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #a64c1c;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(194, 94, 36, 0.5);
    color: white;
}

/* 埋め込みフォーム部分のコンテナ */
.form-container {
    max-width: 640px; 
    margin: 0 auto; 
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    overflow: hidden;
}

/* =========================================================================
   album.html 用スタイル
========================================================================= */

.header-bar {
    background-color: var(--primary);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-bar a.back-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    position: absolute;
    left: 20px;
    top: 25px;
    font-family: sans-serif;
    border-bottom: 1px solid white;
}

/* パスワードロック画面 */
#lock-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    padding: 20px;
    text-align: center;
}

.lock-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: 450px;
    width: 100%;
    border: 1px solid #f0e6d2;
}

.lock-box h3 {
    color: var(--primary);
    font-size: 1.4rem;
}

.lock-box input {
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 2px;
}

.btn-submit {
    background-color: var(--primary);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: #a64c1c;
    transform: translateY(-2px);
}

#error-msg {
    color: #d94b4b;
    font-size: 0.9rem;
    margin-top: 15px;
    display: none;
    font-weight: bold;
}

/* アルバム画面コンテンツ */
#album-content {
    display: none; 
    padding: 40px 20px;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 1s;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.photo-item {
    background: white;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-radius: 4px;
    transition: transform 0.3s;
}

.photo-item:hover {
    transform: scale(1.03);
    z-index: 10;
}

.photo-item img, .photo-item .dummy-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 2px;
}

.photo-item .dummy-img {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.caption {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
    font-family: sans-serif;
}

/* =========================================================================
   スマートフォン用メディアクエリ（重要）
========================================================================= */

@media (max-width: 768px) {
    /* ---- 全体調整 ---- */
    .container {
        padding: 15px 10px; /* 余白を極力減らす */
    }
    
    h2.section-title {
        font-size: 1.3rem; /* 少し小さく */
        margin-bottom: 15px;
    }
    h2.section-title::after {
        margin: 8px auto 0;
    }

    /* ---- ヒーローセクション ---- */
    .hero {
        background-attachment: scroll; 
        min-height: 25svh; /* 1画面に収めるため高さを大幅に縮小 */
        height: auto;
        padding: 30px 0;
    }
    
    .hero h1 { 
        font-size: 1.6rem; 
        margin-bottom: 5px;
        letter-spacing: 0.05em;
    }

    .hero p {
        font-size: 0.9rem;
    }
    
    /* ---- ご挨拶 ---- */
    .greeting-text {
        margin-bottom: 20px;
    }
    .greeting-text p {
        font-size: 0.85rem;
        line-height: 1.6;
        text-align: center; 
        padding: 0;
    }

    /* ---- ギャラリー ---- */
    .gallery {
        gap: 10px;
        margin-bottom: 20px;
        flex-wrap: nowrap; /* スマホなら横並びで小さく表示するか、あるいは小さめにする */
        overflow-x: auto; /* はみ出し対策 */
        padding-bottom: 10px;
        justify-content: center;
    }

    .polaroid {
        transform: rotate(0deg) !important;
        margin-top: 0 !important;
        width: 45%; /* 2枚並べるために幅を縮小 */
        max-width: 160px;
        padding: 5px 5px 15px 5px; 
    }
    
    .polaroid-caption {
        font-size: 0.7rem;
        margin-top: 8px;
    }

    /* BGMボタンのモバイル調整 */
    .bgm-btn {
        padding: 2px 8px;
        font-size: 0.7rem;
        gap: 4px;
        margin-top: -5px; /* モバイルでは少し上げ幅を減らす */
    }
    .bgm-btn img {
        width: 14px;
        height: 14px;
    }

    /* アルバムボタンと開催概要エリアの余白調整 */
    #gallery {
        margin-bottom: 60px; /* スマホでは広すぎない程度にゆとりを持たせる */
    }
    #gallery > div:last-child {
        margin-top: 10px !important;
    }
    #gallery .btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 90%;
    }

    /* ---- 開催概要カード ---- */
    .info-card { 
        padding: 15px 10px; 
        margin-bottom: 30px;
    }
    
    .info-row { 
        flex-direction: column; 
        padding: 10px 0;
    }
    
    .info-label { 
        margin-bottom: 3px; 
        width: 100%;
        border-left: 3px solid var(--primary);
        padding-left: 8px;
        font-size: 0.9rem;
    }
    
    .info-value {
        padding-left: 11px;
        font-size: 0.85rem;
    }

    /* ---- フォーム・CTAエリア ---- */
    .cta-section {
        padding: 25px 10px;
        margin-top: 20px;
    }
    
    .btn-primary { 
        box-sizing: border-box; 
    }
    
    .cta-text {
        font-size: 0.9rem;
        text-align: left;
        margin-bottom: 15px;
    }

    .form-container iframe {
        height: 1000px; /* スマホ用には高さを確保 */
    }

    /* ---- album.html の調整 ---- */
    .header-bar {
        padding: 15px;
    }
    
    .header-bar h2 {
        font-size: 1.2rem;
        margin-top: 25px;
    }

    .header-bar a.back-link {
        top: 15px;
    }

    .lock-box {
        padding: 25px 20px;
    }

    .lock-box h3 {
        font-size: 1.2rem;
    }
    
    .lock-box input {
        font-size: 1rem;
        padding: 12px;
    }

    #album-content {
        padding: 20px 15px;
    }

    #album-content p {
        font-size: 0.95rem;
        text-align: left;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 
        gap: 10px;
        margin-top: 20px;
    }

    .photo-item {
        padding: 8px;
    }

    .photo-item img, .photo-item .dummy-img {
        height: 130px;
    }
}
