/*
Theme Name: Apple Spa
Theme URI:
Author: 
Author URI:
Description: 朝日町 りんご温泉 WordPressテーマ（大正ロマン風）
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apple-spa
*/

/* =============================================
   朝日町 りんご温泉 - style.css
   ============================================= */

body {
    font-family: 'Zen Old Mincho', serif;
    background-color: #fcf9f2;
    color: #333;
}

/* 縦書きクラス */
.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.2em;
}

/* 左から右へ読む縦書き（フッター修正用） */
.writing-vertical-lr {
    writing-mode: vertical-lr;
    text-orientation: upright;
    letter-spacing: 0.2em;
}

/* 大正モダンな枠線装飾 */
.retro-border {
    border: 1px solid #8e354a;
    position: relative;
}

.retro-border::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid #1d334a;
    z-index: -1;
}

/* 画像プレースホルダーのアニメーション用 */
.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fcf9f2;
    z-index: 10;
    transform-origin: top;
}

/* ローディング */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #8e354a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    flex-direction: column;
}

.smooth-wrapper {
    width: 100%;
}

/* 菱形装飾 */
.hishi {
    width: 12px;
    height: 12px;
    background-color: #8e354a;
    transform: rotate(45deg);
    display: inline-block;
    margin: 0 10px;
}

/* カスタムスクロールバー */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #fcf9f2;
}

::-webkit-scrollbar-thumb {
    background: #8e354a;
}

.bg-fv {
    background-image: url(img/001.jpg);
    background-size: cover;
    background-position: center;
}

.img-obj img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   WordPress ギャラリー — グリッドレイアウト上書き
   ========================================================= */

/* WordPress デフォルトのギャラリースタイルを無効化 */
.gallery { display: block; }

/* グリッドコンテナ */
.gallery {
    display: grid !important;
    gap: 1.5%;
    margin: 1.5rem 0;
    grid-template-columns: repeat(3, 1fr); /* デフォルト3列 */
}

/* 管理画面の列数設定を反映 */
.gallery-columns-1 { grid-template-columns: repeat(1, 1fr) !important; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr) !important; }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr) !important; }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr) !important; }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr) !important; }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr) !important; }

/* スマホ（600px以下）は2列 */
@media (max-width: 600px) {
    .gallery,
    .gallery-columns-3,
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.gallery-item {
    margin: 0;
    overflow: hidden;
}

.gallery-icon {
    height: 100%;
}

.gallery-icon a {
    display: block;
    width: 100%;
    cursor: zoom-in;
}

.gallery-icon img {
    width: 100%;
    height: auto;
    display: block;
}

/* りんご浮遊アニメーション */
@keyframes apple-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-18px); }
}

.anim-float {
    animation: apple-float 3.6s ease-in-out infinite;
}