/* ============================================
   KML Site - Main Stylesheet
   ศูนย์ปฏิบัติธรรมแก้วเมืองเลย
   ============================================ */

/* --- CSS Variables --- */
:root {
    --brown-dark: #532917;
    --brown-light: #7d3212;
    --gold: #e8c47c;
    --gold-dark: #d4a035;
    --cream: #faf5ef;
    --cream-dark: #f0ebe3;
    --text-dark: #333;
    --text-light: #555;
    --text-muted: #666;
    --text-faded: #999;
    --white: #fff;
    --font-heading: 'K2D', sans-serif;
    --font-body: 'K2D', sans-serif;
    --font-english: 'Dancing Script', cursive;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-medium: 0 8px 30px rgba(0,0,0,0.12);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--text-muted);
    background: var(--white);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--text-dark); font-weight: 400; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; transition: color 0.3s; }

/* --- Scroll Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* --- Site Header --- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    transition: var(--transition-smooth);
}

/* Top bar: Logo area */
.header-top {
    background: rgba(74, 39, 23, 0.94);
    display: flex; justify-content: center; align-items: center;
    min-height: 85px; padding: 8px 20px;
    transition: var(--transition-smooth);
}
.header-logo img {
    height: 76px; width: auto;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}
.header-logo:hover img { transform: scale(1.05); }

/* Bottom bar: Navigation */
.header-nav {
    background: rgba(74, 39, 23, 0.94);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; justify-content: center; align-items: center;
    min-height: 55px; padding: 0 20px;
    transition: var(--transition-smooth);
    position: relative;
}
.nav-links {
    display: flex; align-items: center; justify-content: center;
    gap: 0; flex-wrap: wrap;
}
.nav-links a {
    color: rgba(255,255,255,0.85); text-decoration: none;
    padding: 16px 14px; font-size: 14px;
    font-family: var(--font-body); font-weight: 400;
    transition: color 0.3s, background 0.3s;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    background: rgba(255,255,255,0.08);
}
.header-nav .menu-btn {
    display: none;
    color: var(--white); font-size: 24px; cursor: pointer;
    background: none; border: none;
    width: 42px; height: 42px;
    align-items: center; justify-content: center;
    transition: var(--transition-smooth);
    border-radius: 8px;
    position: absolute; left: 15px;
}
.header-nav .menu-btn:hover { background: rgba(255,255,255,0.15); }
.header-nav .fb-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    color: var(--white); text-decoration: none;
    font-weight: bold; font-size: 16px;
    transition: var(--transition-smooth);
    position: absolute; right: 15px;
}
.header-nav .fb-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

/* Scrolled state: compact single bar */
.site-header.scrolled .header-top {
    min-height: 0; height: 0; padding: 0;
    overflow: hidden; opacity: 0;
}
.site-header.scrolled .header-logo img { height: 0; }
.site-header.scrolled .header-nav {
    min-height: 50px;
    background: rgba(74, 39, 23, 0.98);
    box-shadow: 0 4px 25px rgba(0,0,0,0.2);
}

/* Mobile: show hamburger, hide nav links */
@media (max-width: 850px) {
    .header-top {
        min-height: 60px;
        position: relative;
    }
    .header-logo img { height: 48px; }
    .nav-links { display: none; }
    .header-nav {
        min-height: 0; height: 0; padding: 0;
        overflow: hidden; border-top: none;
    }
    .header-nav .menu-btn {
        display: flex;
        position: fixed; top: 12px; left: 12px;
        z-index: 1001;
    }
    .header-nav .fb-btn {
        position: fixed; top: 14px; right: 12px;
        z-index: 1001;
    }
    .site-header.scrolled .header-top {
        min-height: 50px; height: auto; padding: 5px 20px;
        overflow: visible; opacity: 1;
        box-shadow: 0 4px 25px rgba(0,0,0,0.2);
    }
    .site-header.scrolled .header-logo img { height: 38px; }
}

/* --- Side Menu --- */
.side-menu {
    position: fixed; top: 0; left: -320px; width: 300px; height: 100vh;
    background: linear-gradient(180deg, var(--brown-dark) 0%, #3d1e10 100%);
    z-index: 2000;
    transition: left 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 80px 0 20px; overflow-y: auto;
    box-shadow: 5px 0 30px rgba(0,0,0,0.3);
}
.side-menu.active { left: 0; }
.side-menu a {
    display: block; color: var(--gold); padding: 16px 32px;
    text-decoration: none; font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: var(--transition-smooth);
    font-family: var(--font-heading);
    letter-spacing: 0.3px;
}
.side-menu a:hover, .side-menu a.active {
    background: rgba(232, 196, 124, 0.1);
    padding-left: 40px;
    color: var(--white);
}
.side-menu .close-btn {
    position: absolute; top: 15px; right: 15px;
    color: var(--white); font-size: 28px;
    cursor: pointer; background: none; border: none;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-smooth);
    border-radius: 8px;
}
.side-menu .close-btn:hover { background: rgba(255,255,255,0.1); transform: rotate(90deg); }
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1500;
    display: none; cursor: pointer;
    backdrop-filter: blur(3px);
}
.overlay.active { display: block; }

/* --- Hero (Homepage) --- */
.hero {
    position: relative; width: 100%; height: 100vh;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero img.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 1;
    animation: hero-zoom 25s ease-in-out infinite alternate;
}
@keyframes hero-zoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}
.hero .hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.28);
    z-index: 2;
}
.hero .hero-content {
    position: relative; z-index: 3; color: var(--white);
    text-shadow: 2px 4px 12px rgba(0,0,0,0.6);
    animation: hero-fadeIn 1.5s ease-out;
    margin-bottom: 27vh;
}
@keyframes hero-fadeIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
.hero h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    margin-bottom: 12px; font-weight: 700; letter-spacing: 3px;
    line-height: 1.2;
    color: #fff !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5), 0 0 25px rgba(0,0,0,0.3);
    font-family: 'K2D', sans-serif;
}
.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    font-family: var(--font-heading); font-weight: 300;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5), 0 0 15px rgba(0,0,0,0.2);
    opacity: 0.95;
}

/* --- Page Hero (Subpages) --- */
.page-hero {
    position: relative; width: 100%; height: 75vh; min-height: 550px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; overflow: hidden; margin-top: 140px;
}
.page-hero img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 1;
    animation: hero-zoom 25s ease-in-out infinite alternate;
}
.page-hero .hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.5) 100%);
    z-index: 2;
}
.page-hero .hero-content {
    position: relative; z-index: 3; color: var(--white); padding: 20px;
    animation: hero-fadeIn 1.2s ease-out;
}
.page-hero h1 {
    font-size: clamp(2rem, 5.5vw, 4rem);
    color: #fff !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5), 0 0 20px rgba(0,0,0,0.3);
    font-weight: 700;
    letter-spacing: 2px;
}
.page-hero p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    margin-top: 12px; font-family: var(--font-heading); font-weight: 300;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5), 0 0 15px rgba(0,0,0,0.2);
    opacity: 0.95;
}

/* --- Sparkle Effect --- */
.sparkle-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2; pointer-events: none; overflow: hidden;
}
.sparkle {
    position: absolute;
    width: 4px; height: 4px;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    animation: sparkle-float var(--duration, 4s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    opacity: 0;
    filter: blur(0.5px);
}
.sparkle::after {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 6px; height: 6px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
}
@keyframes sparkle-float {
    0% { opacity: 0; transform: translateY(0) scale(0); }
    25% { opacity: 0.6; }
    50% { opacity: 1; transform: translateY(-40px) scale(1.2); }
    75% { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(-80px) scale(0); }
}

/* --- About Section (Homepage) --- */
.about-section {
    background: var(--cream);
    padding: 80px 30px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 50px;
    position: relative;
    overflow: hidden;
}
.about-section::before {
    content: '';
    position: absolute; top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(232,196,124,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.about-section::after {
    content: '';
    position: absolute; bottom: -30px; left: -30px;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(83,41,23,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.about-left { text-align: center; max-width: 420px; position: relative; z-index: 1; }
.about-left img.about-logo {
    width: 140px; height: auto; margin: 0 auto 20px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    transition: transform 0.5s;
}
.about-left img.about-logo:hover { transform: scale(1.1) rotate(3deg); }
.about-left h2 {
    font-size: 1.6rem; color: var(--brown-light); margin-bottom: 8px;
    letter-spacing: 1px;
}
.about-left h3 {
    font-size: 1.6rem; color: var(--gold-dark); margin-bottom: 25px;
    font-family: var(--font-english);
    font-weight: 400;
}
.about-left .icon-360 {
    font-size: 4.5rem; color: var(--gold-dark); margin-bottom: 12px; font-weight: 700;
    text-shadow: 0 2px 8px rgba(212,160,53,0.2);
}
.btn-360 {
    display: inline-block; background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%); color: var(--white);
    padding: 14px 35px; text-decoration: none;
    font-size: 1.05rem; font-family: var(--font-heading);
    border-radius: 8px; margin-bottom: 20px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(192,57,43,0.3);
    letter-spacing: 0.5px;
}
.btn-360:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(192,57,43,0.4);
}
.about-left .address { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; }
.about-right { max-width: 520px; position: relative; z-index: 1; }
.about-right img {
    width: 100%; border-radius: 16px;
    box-shadow: var(--shadow-medium);
    transition: transform 0.5s;
}
.about-right img:hover { transform: scale(1.02); }

/* --- Video Section --- */
.video-section { position: relative; width: 100%; padding-top: 56.25%; background: #000; }
.video-section iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

/* --- Mahavihara Slider --- */
.mahavihara-section {
    background: linear-gradient(180deg, var(--brown-dark) 0%, #3d1e10 100%);
    padding: 70px 20px 60px; color: var(--white);
}
.mahavihara-section h2 {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    color: var(--gold); margin-bottom: 35px;
    letter-spacing: 1px;
}
.mahavihara-slider {
    position: relative; max-width: 950px; margin: 0 auto;
    overflow: hidden; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.mahavihara-slider img {
    width: 100%; height: 450px; object-fit: cover;
    transition: opacity 0.6s ease;
}
.slider-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 45px; height: 45px; border-radius: 50%;
    background: rgba(0,0,0,0.4); color: var(--white);
    border: none; cursor: pointer; font-size: 20px; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
}
.slider-nav:hover { background: rgba(0,0,0,0.7); }
.slider-nav.prev { left: 15px; }
.slider-nav.next { right: 15px; }
.slider-dots { text-align: center; padding: 16px 0; }
.slider-dots span {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #ccc; margin: 0 4px; cursor: pointer;
    transition: var(--transition-smooth);
}
.slider-dots span.active {
    background: var(--gold);
    width: 24px; border-radius: 4px;
    box-shadow: 0 0 10px rgba(232,196,124,0.5);
}

/* --- Donation Section --- */
.donation-section {
    background: linear-gradient(180deg, #3d1e10 0%, var(--brown-dark) 100%);
    padding: 50px 20px 60px; color: var(--white);
    position: relative;
}
.donation-section::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(232,196,124,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.donation-container {
    max-width: 1000px; margin: 0 auto;
    display: flex; flex-wrap: wrap; gap: 40px; justify-content: center;
    position: relative; z-index: 1;
}
.donation-left, .donation-right {
    flex: 1; min-width: 280px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(232,196,124,0.15);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s, box-shadow 0.3s;
}
.donation-left:hover, .donation-right:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.donation-left h3, .donation-right h3 {
    color: var(--gold); font-size: 1.2rem; margin-bottom: 16px;
    letter-spacing: 0.5px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(232,196,124,0.2);
}
.donation-left p, .donation-right p { font-size: 0.92rem; line-height: 1.9; color: #ddd; }
.donation-left a, .donation-right a {
    color: var(--gold); text-decoration: none;
    border-bottom: 1px solid rgba(232,196,124,0.4);
    transition: all 0.3s;
}
.donation-left a:hover, .donation-right a:hover {
    color: #fff;
    border-bottom-color: #fff;
}
.fund-item {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: background 0.3s;
}
.fund-item:hover { background: rgba(255,255,255,0.08); }
.fund-item .fund-name { color: var(--gold); font-weight: 600; font-size: 1rem; }
.fund-item .fund-price { font-size: 0.9rem; color: #ddd; }

/* QR Code box */
.qr-code-box {
    text-align: center; margin: 18px 0;
}
.qr-code-box img {
    width: 200px; height: auto;
    border-radius: 10px;
    background: #fff; padding: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* --- Card Button --- */
.card-btn-section { background: var(--brown-dark); padding: 30px; text-align: center; }
.card-btn {
    display: inline-block; border: 2px solid rgba(232,196,124,0.3); color: rgba(255,255,255,0.8);
    padding: 16px 45px; text-decoration: none;
    font-family: var(--font-heading); font-size: 1rem;
    transition: var(--transition-smooth); background: transparent;
    border-radius: 8px; letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}
.card-btn::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(232,196,124,0.1), transparent);
    transition: left 0.6s ease;
}
.card-btn:hover::before { left: 100%; }
.card-btn:hover {
    border-color: var(--gold); color: var(--gold);
    box-shadow: 0 0 25px rgba(232,196,124,0.2);
    transform: translateY(-2px);
}

/* --- Full-width Banner --- */
.banner-full {
    position: relative; width: 100%; min-height: 550px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: var(--white); overflow: hidden;
}
.banner-full img.banner-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 1;
    transition: transform 8s ease;
}
.banner-full:hover img.banner-bg { transform: scale(1.05); }
.banner-full .banner-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 2;
}
.banner-full .banner-content {
    position: relative; z-index: 3; padding: 50px 30px; max-width: 800px;
}
.banner-full h2 {
    font-size: clamp(1.6rem, 4.5vw, 2.8rem); margin-bottom: 18px;
    color: var(--gold); text-shadow: 2px 4px 10px rgba(0,0,0,0.6);
    letter-spacing: 1px;
}
.banner-full p {
    font-size: clamp(0.9rem, 2vw, 1.1rem); line-height: 2;
    text-shadow: 1px 2px 6px rgba(0,0,0,0.5);
    font-weight: 300;
}
.btn-readmore {
    display: inline-block; background: rgba(255,255,255,0.95); color: var(--brown-dark);
    padding: 16px 50px; text-decoration: none; font-family: 'K2D', sans-serif;
    border-radius: 50px; margin-top: 25px;
    transition: var(--transition-smooth); font-size: 1.15rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    letter-spacing: 1px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}
.btn-readmore:hover {
    background: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* --- Section Title --- */
.section-title-box { background: var(--white); padding: 50px 20px; text-align: center; }
.section-title-box h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem); color: var(--brown-light);
    border: 3px solid var(--brown-light); display: inline-block;
    padding: 18px 55px; border-radius: 6px;
    transition: var(--transition-smooth);
    letter-spacing: 1px;
}
.section-title-box h2:hover {
    background: var(--brown-light);
    color: var(--white);
}

/* --- 2x2 Grid --- */
.grid-2x2 { display: grid; grid-template-columns: 1fr 1fr; min-height: 500px; }
.grid-2x2 .grid-item {
    position: relative; overflow: hidden; min-height: 320px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; text-decoration: none; color: var(--white);
}
.grid-2x2 .grid-item img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 1;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.grid-2x2 .grid-item:hover img { transform: scale(1.1); }
.grid-2x2 .grid-item .grid-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.35); z-index: 2;
    transition: background 0.5s;
}
.grid-2x2 .grid-item:hover .grid-overlay { background: rgba(0,0,0,0.5); }
.grid-2x2 .grid-item .grid-content {
    position: relative; z-index: 3; padding: 25px;
    transition: transform 0.5s;
}
.grid-2x2 .grid-item:hover .grid-content { transform: translateY(-5px); }
.grid-2x2 .grid-item h3 {
    font-size: clamp(1.3rem, 3vw, 2.2rem); color: var(--gold);
    margin-bottom: 10px; text-shadow: 2px 3px 8px rgba(0,0,0,0.6);
    letter-spacing: 0.5px;
}
.grid-2x2 .grid-item p {
    font-size: 0.9rem; line-height: 1.7;
    text-shadow: 1px 2px 5px rgba(0,0,0,0.5);
    opacity: 0.95;
}

/* --- Gallery --- */
.gallery-section { padding: 50px 20px 70px; background: var(--cream); }
.gallery-grid {
    max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.gallery-card {
    background: var(--white); border-radius: 16px; overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
}
.gallery-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.gallery-card:hover::after { transform: scaleX(1); }
.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.gallery-card img {
    width: 100%; height: 220px; object-fit: cover;
    transition: transform 0.5s;
}
.gallery-card:hover img { transform: scale(1.08); }
.gallery-card .card-label {
    padding: 16px 18px; text-align: center;
    font-family: var(--font-heading); font-size: 1rem; color: var(--brown-light);
    font-weight: 500;
}

/* --- Map --- */
.map-section { background: var(--white); padding: 20px 0; }
.map-section iframe { width: 100%; height: 400px; border: none; }

/* --- Food Slider --- */
.food-slider {
    position: relative; max-width: 100%; margin: 30px 0;
    overflow: hidden; border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.food-slider img {
    width: 100%; height: 550px; object-fit: cover;
    transition: opacity 0.6s ease;
}
.food-slider-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255,255,255,0.85); border: none; cursor: pointer;
    font-size: 1.2rem; color: #555; z-index: 5;
    transition: all 0.3s; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.food-slider-nav:hover { background: var(--gold); color: #fff; }
.food-slider-nav.prev { left: 16px; }
.food-slider-nav.next { right: 16px; }
.food-slider-counter {
    position: absolute; bottom: 16px; right: 20px;
    background: rgba(0,0,0,0.5); color: #fff; padding: 4px 14px;
    border-radius: 20px; font-size: 0.85rem; z-index: 5;
}

/* --- Content Section (Subpages) --- */
.content-section {
    padding: 50px 60px; max-width: 1200px; margin: 0 auto;
}
.content-section h2 {
    font-size: 1.5rem; color: var(--brown-light);
    margin: 50px 0 18px; padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
    letter-spacing: 0.02em; font-weight: 500;
}
.content-section h2::before {
    content: ''; display: inline-block;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gold); margin-right: 10px;
    vertical-align: middle;
}
.content-section h3 {
    font-size: 1.6rem; color: #555; margin: 35px 0 10px;
    font-weight: 400;
}
.content-section p {
    font-size: 1.02rem; line-height: 1.85; color: #666; margin-bottom: 22px;
    text-indent: 1.8em;
}
.content-section .section-img {
    width: 100%; border-radius: 12px; margin: 30px 0;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.content-section .section-img:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}
.content-section .img-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 6px; margin: 30px 0; border-radius: 12px; overflow: hidden;
}
.content-section .img-grid img {
    width: 100%; height: 260px; object-fit: cover; border-radius: 0;
    box-shadow: none;
    transition: transform 0.4s ease, filter 0.4s ease;
}
.content-section .img-grid img:hover {
    transform: scale(1.05);
    filter: brightness(1.05);
    z-index: 1;
}

/* --- Captioned Image Grid --- */
.content-section .img-grid-captioned {
    gap: 0; border-radius: 0; overflow: visible;
}
.content-section .img-grid-captioned figure {
    margin: 0; text-align: center;
}
.content-section .img-grid-captioned figure img {
    border-radius: 0; width: 100%; height: 260px; object-fit: cover;
}
.content-section .img-grid-captioned figcaption {
    font-family: var(--font-heading);
    font-size: 1.05rem; color: var(--text-dark);
    padding: 12px 8px; font-weight: 400;
}

/* --- Highlight Box --- */
.highlight-box {
    background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
    border-left: 5px solid var(--gold);
    padding: 28px 32px; margin: 28px 0; border-radius: 0 16px 16px 0;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.highlight-box::before {
    content: '\201C';
    position: absolute; top: 8px; right: 20px;
    font-size: 4rem; color: rgba(232,196,124,0.15);
    font-family: Georgia, serif; line-height: 1;
}
.highlight-box:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
    border-left-color: var(--gold-dark);
}
.highlight-box h3 {
    color: var(--brown-light); margin-bottom: 12px;
    font-size: 1.3rem;
}
.highlight-box p { color: var(--text-light); text-indent: 0; }

/* --- Quote Box --- */
.quote-box {
    text-align: center; padding: 45px 35px; margin: 40px 0;
    background: linear-gradient(135deg, var(--brown-dark), var(--brown-light));
    border-radius: 20px; color: var(--gold);
    box-shadow: 0 10px 35px rgba(83,41,23,0.25);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}
.quote-box::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(232,196,124,0.1) 0%, transparent 60%);
    pointer-events: none;
}
.quote-box:hover {
    transform: scale(1.01);
    box-shadow: 0 14px 45px rgba(83,41,23,0.3);
}
.quote-box p {
    font-family: var(--font-heading); font-size: 1.5rem; color: var(--gold); margin: 0;
    line-height: 1.8; position: relative; text-indent: 0;
}
.quote-box .quote-sub {
    font-size: 1.05rem; margin-top: 14px; color: var(--white); opacity: 0.85;
    font-weight: 300; position: relative;
}

/* --- Donation Box --- */
.donation-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 60px;
    min-height: 420px;
    display: flex;
    align-items: center;
}
.donation-box .donation-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: blur(2px);
}
.donation-box .donation-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(83,41,23,0.88) 0%, rgba(139,90,43,0.82) 100%);
    z-index: 1;
}
.donation-box .donation-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}
.donation-box .donation-title {
    font-size: 1.15rem;
    color: var(--gold);
    margin-bottom: 30px;
    text-indent: 0;
    font-family: var(--font-heading);
    line-height: 1.8;
}
.donation-box .donation-accounts-grid {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.donation-box .donation-account {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(232,196,124,0.3);
    border-radius: 12px;
    padding: 22px 28px;
    min-width: 280px;
    flex: 1;
    max-width: 360px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s, box-shadow 0.3s;
}
.donation-box .donation-account:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.donation-box .donation-account .bank-name {
    font-size: 0.85rem;
    color: var(--gold);
    margin-bottom: 8px;
    text-indent: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
}
.donation-box .donation-account p {
    font-size: 1rem;
    color: #fff;
    line-height: 1.7;
    margin-bottom: 0;
    text-indent: 0;
}
.donation-box .donation-account .account-number {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.08em;
    margin: 6px 0;
}
.donation-box .donation-contact {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    margin-top: 8px;
    text-indent: 0;
}
.donation-box .donation-facebook {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    text-indent: 0;
}
.donation-box .donation-facebook a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(232,196,124,0.5);
    transition: all 0.3s;
}
.donation-box .donation-facebook a:hover {
    color: #fff;
    border-bottom-color: #fff;
}
@media (max-width: 768px) {
    .donation-box {
        padding: 35px 20px;
        min-height: 300px;
    }
    .donation-box .donation-accounts-grid {
        flex-direction: column;
        align-items: center;
    }
    .donation-box .donation-account {
        min-width: unset;
        width: 100%;
    }
}

/* --- Concept Section (แนวคิด) --- */
.concept-section {
    text-align: center;
    padding: 50px 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid #ddd;
}
.concept-title {
    font-family: 'Dancing Script', 'K2D', cursive;
    font-size: 2.8rem;
    color: var(--gold-dark, #8B6914);
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}
.concept-title::before,
.concept-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: var(--gold-dark, #8B6914);
}
.concept-title::before { right: calc(100% + 15px); }
.concept-title::after { left: calc(100% + 15px); }
.concept-subtitle {
    font-size: 1rem;
    color: #999;
    max-width: 700px;
    margin: 0 auto 35px;
    line-height: 1.8;
    text-indent: 0;
}
.concept-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}
.concept-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}
.concept-card:hover {
    transform: translateY(-5px);
}
.concept-card-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.concept-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.concept-card:hover .concept-card-img img {
    transform: scale(1.08);
}
.concept-card h3 {
    font-size: 1.1rem;
    color: #555;
    font-weight: 600;
    margin-bottom: 8px;
}
.concept-card p {
    font-size: 0.9rem;
    color: #999;
    line-height: 1.6;
    text-indent: 0;
}
@media (max-width: 768px) {
    .concept-section { padding: 35px 20px; }
    .concept-title { font-size: 2rem; }
    .concept-title::before, .concept-title::after { width: 30px; }
    .concept-cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 480px) {
    .concept-cards { grid-template-columns: 1fr; }
    .concept-title { font-size: 1.6rem; }
    .concept-title::before, .concept-title::after { display: none; }
}

/* --- Footer --- */
.footer {
    text-align: center; padding: 30px 20px; background: #383838;
    font-size: 0.95rem; color: rgba(255,255,255,0.7);
    position: relative;
}
.footer::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 80px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer-address { font-size: 1rem; color: rgba(255,255,255,0.8); margin-bottom: 10px; line-height: 1.8; }
.footer-nav {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 0; margin-bottom: 15px;
}
.footer-nav a {
    color: rgba(255,255,255,0.7); text-decoration: none;
    padding: 6px 14px; font-size: 0.9rem;
    transition: color 0.3s;
}
.footer-nav a:hover { color: var(--gold); }
.footer-copyright {
    font-size: 0.85rem; color: rgba(255,255,255,0.5);
    padding: 20px; background: #2d2d2d; text-align: center;
    letter-spacing: 0.3px;
}
.footer-copyright a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.3s; }
.footer-copyright a:hover { color: var(--gold); }

/* --- Scroll to Top --- */
.scroll-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(83,41,23,0.8); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 20px; z-index: 999;
    border: 2px solid rgba(255,255,255,0.3);
    transition: var(--transition-smooth);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0; transform: translateY(20px);
}
.scroll-top.visible {
    opacity: 1; transform: translateY(0);
}
.scroll-top:hover {
    background: rgba(83,41,23,1);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* --- Image Zoom on Hover for Hero Parallax --- */
.page-hero img,
.hero img.hero-bg {
    will-change: transform;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .page-hero { margin-top: 60px; }
    .grid-2x2 { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .about-section { flex-direction: column; padding: 50px 20px; gap: 30px; }
    .donation-container { flex-direction: column; gap: 30px; }
    .mahavihara-slider img { height: 280px; }
    .food-slider img { height: 300px; }
    .content-section { padding: 40px 18px; }
    .content-section h2 { font-size: 1.15rem; }
    .content-section p { text-indent: 1.2em; font-size: 0.95rem; }
    .banner-full { min-height: 450px; }
    .footer-nav a { padding: 4px 10px; font-size: 0.85rem; }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .content-section .img-grid { grid-template-columns: 1fr; }
    .food-slider img { height: 220px; }
    .content-section h2 { font-size: 1.1rem; }
    .content-section p { text-indent: 0.8em; }
    .hero h1 { letter-spacing: 1px; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Print --- */
@media print {
    .site-header, .side-menu, .overlay, .scroll-top, .sparkle-container, .fb-btn { display: none !important; }
    .hero, .page-hero { height: auto; min-height: 0; margin-top: 0; }
    body { color: #000; background: #fff; }
    .reveal { opacity: 1; transform: none; }
}
