@import url('https://fonts.googleapis.com/css2?family=Pridi:wght@300;400;600;700&family=Sarabun:wght@300;400;500;700&display=swap');

:root {
    /* --- Golden Bodhi Palette --- */
    --primary: #1b4d3e;
    /* Deep Emerald */
    --primary-light: #2c6e58;
    --primary-dark: #0d2b22;

    --gold: #c5a059;
    /* Luxury Gold */
    --gold-light: #e6c88a;
    --gold-dark: #8a6d32;

    --bg-page: #f9fbf9;
    /* Off-white Green tint */
    --bg-white: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);

    --text-main: #1f2933;
    --text-muted: #52606d;
    --text-white: #ffffff;

    --shadow-soft: 0 10px 40px -10px rgba(27, 77, 62, 0.1);
    --shadow-hover: 0 20px 50px -15px rgba(27, 77, 62, 0.2);

    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius: 24px;
}

/* --- Base & Typography --- */
html {
    margin: 0;
    padding: 0;
    width: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* offset for fixed header */
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    /* overflow-x: hidden; */
    /* Fixed: Allow scroll if needed, but prefer hidden on body */
}

@media (max-width: 1024px) {
    html {
        scroll-padding-top: 70px; /* mobile header shorter */
    }
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.7;
    padding-top: 100px;
    /* Space for fixed header */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Pridi', serif;
    margin-top: 0;
    line-height: 1.3;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Premium Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    /* Increased to accommodate a huge logo */
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    /* Solid for readability */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

header.header-scrolled {
    height: 90px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}

.nav-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    /* Prevent wrapping */
}

/* Logo Area */
.logo {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    /* Prevent logo from squishing */
}

.logo-img {
    height: 120px;
    /* Huge Logo */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
    /* Stronger shadow */
    transition: var(--transition);
}

header.header-scrolled .logo-img {
    height: 70px;
}

.brand-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    font-family: 'Pridi', serif;
    font-size: 2.8rem;
    /* Even larger text to match logo */
    font-weight: 800;
    /* Bolder */
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.5;
    /* Increased from 1.1 to fix Thai vowel clipping */
    padding: 5px 0;
    /* Extra safe space */
    white-space: nowrap;
    /* text-shadow removed as it conflicts with background-clip:text on some browsers causing artifacts, 
       and we want clean edges for the vowels. */
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
    /* Use filter instead for clipped text shadow */
}

/* --- Header Branding Effects --- */
.logo-glow {
    filter: drop-shadow(0 0 10px rgba(197, 160, 89, 0.4));
    animation:
        glow-pulse 3s infinite ease-in-out,
        logo-float 4s infinite ease-in-out;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-glow:hover {
    transform: scale(1.1) rotate(8deg);
    filter: drop-shadow(0 0 20px rgba(197, 160, 89, 0.8));
}

@keyframes glow-pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(197, 160, 89, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(197, 160, 89, 0.7)) drop-shadow(0 0 10px rgba(27, 77, 62, 0.4));
    }
}

@keyframes logo-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.shine-effect {
    position: relative;
    overflow: visible;
    /* Fix vowel clipping */
    display: inline-block;
    padding-top: 8px;
    /* Safe space for upper vowels */
    margin-top: -8px;
    line-height: 1.6 !important;
    /* Proper Thai spacing */
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(25deg);
    pointer-events: none;
}

.shine-effect:hover::after {
    left: 150%;
    transition: left 0.6s ease-in-out;
}

.brand-address {
    display: block;
    font-size: 0.75rem;
    color: var(--secondary-dark);
    opacity: 0.8;
    margin-top: -2px;
}

/* Navigation Links */
nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    position: relative;
    font-weight: 600;
    color: var(--text-main);
    /* Dark text on white header */
    padding: 8px 12px;
    font-size: 1rem;
    white-space: nowrap;
    /* Force single line */
}

/* Hover Effect: Gold Underline Expansion */
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gold);
    transition: var(--transition);
    border-radius: 2px;
}

nav a:hover::after {
    width: 80%;
}

nav a:hover {
    color: var(--gold-dark);
}

/* --- Hero Section (Parallax) --- */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-white);
    overflow: hidden;
    margin-top: -100px;
    /* Pull up behind header */
}

/* Background Image with Overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1528127269322-539801943592?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    filter: brightness(0.85);
    z-index: -2;
    background-attachment: fixed;
    /* Parallax Magic */
}

/* Gradient Overlay for Text Readability */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13, 43, 34, 0.4) 0%, rgba(13, 43, 34, 0.1) 50%, rgba(13, 43, 34, 0.8) 100%);
    z-index: -1;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
    animation: slideUpFade 1s ease-out;
}

.hero p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 300;
    opacity: 0.9;
    animation: slideUpFade 1.2s ease-out;
}

.btn-main-action {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #fff !important;
    padding: 16px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.4);
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
    animation: slideUpFade 1.4s ease-out;
}

.btn-main-action:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(197, 160, 89, 0.6);
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Section Styling --- */
.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
    margin-top: 15px;
}

/* --- News Cards (Glass & Float) --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.news-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--gold), var(--primary));
    opacity: 0;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-hover);
}

.news-card:hover::before {
    opacity: 1;
}

.news-img {
    aspect-ratio: 4 / 3;
    width: 100%;
    background: #f0f4f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.news-card:hover .news-img img {
    transform: scale(1.1);
}

.news-body {
    padding: 30px;
}

.news-body h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.read-more {
    font-weight: 700;
    color: var(--gold-dark);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-top: 15px;
    display: inline-block;
}

/* --- About Section --- */
.about-section {
    background-color: #fff;
    position: relative;
}

/* Decorative Background Pattern */
.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#204c38 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.03;
    pointer-events: none;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.about-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.visual-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 50px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 20px 60px rgba(13, 43, 34, 0.3);
    position: relative;
    overflow: hidden;
}

.visual-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.stat-number {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 10px;
}


/* --- Footer Improvements --- */
footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.9);
    padding: 20px 0;
    overflow: hidden;
    border-top: 4px solid var(--gold);
}

.footer-marquee-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 0;
    width: 100%;
    margin-bottom: 20px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.footer-marquee-text {
    display: inline-block;
    font-size: 1.1rem;
    color: var(--gold-light);
    animation: marquee 25s linear infinite;
    padding-left: 100%;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.visitor-counter {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--gold-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-top: 15px;
}

.counter-label {
    font-size: 0.9rem;
    color: #ccc;
}

.counter-number {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(197, 160, 89, 0.5);
}

/* --- Directory (Monks) --- */
.temple-directory-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.temple-directory-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold-light);
}

.portrait-frame {
    width: 100%;
    aspect-ratio: 3 / 4;
    max-width: 180px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 3px solid var(--gold);
    padding: 5px;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.temple-directory-card:hover .portrait-frame {
    transform: scale(1.05);
    border-color: var(--gold-light);
    box-shadow: 0 15px 35px rgba(197, 160, 89, 0.3);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
    object-position: center 20%;
    /* Prioritize upper part of photo (face) */
    transition: transform 0.8s ease;
}

.temple-directory-card:hover .portrait-frame img {
    transform: scale(1.1);
}

.portrait-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f0;
    overflow: hidden;
}

.monk-name {
    font-size: 1.25rem;
    margin: 10px 0 5px;
    color: var(--primary-dark);
    font-family: 'Pridi', serif;
    font-weight: 700;
}

.monk-title {
    font-size: 0.85rem;
    color: var(--gold-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Contact Section (New Grid) --- */
.contact-container-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.address-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 30px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.address-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    font-size: 3rem;
    background: #f0f7f4;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-content h3 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.btn-map-glow {
    display: inline-block;
    background: linear-gradient(135deg, #4285F4 0%, #3367D6 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
    transition: var(--transition);
}

.btn-map-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.5);
}

/* Info Grid (Phone, Line, FB) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    cursor: pointer;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.info-item .card-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    margin-bottom: 15px;
    background: transparent;
    box-shadow: none;
}

.info-item h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.highlight-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Specific Social Colors */
.social-link.line:hover {
    background: #06C755;
    color: white !important;
}

.social-link.line:hover h3,
.social-link.line:hover .highlight-text {
    color: white;
}

.social-link.facebook:hover {
    background: #1877F2;
    color: white !important;
}

.social-link.facebook:hover h3,
.social-link.facebook:hover .highlight-text {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .address-card {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Footer --- */
footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 30px;
    text-align: center;
    font-size: 0.95rem;
}

footer a {
    color: var(--gold);
}

footer a:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

/* --- Modal styling --- */
.temple-modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 43, 34, 0.9);
    backdrop-filter: blur(8px);
    opacity: 1 !important;
    pointer-events: auto !important;
}

.temple-modal-container {
    background: var(--bg-white);
    margin: 5vh auto;
    width: 90%;
    max-width: 700px;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--primary);
}



/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 10px 0;
    }

    .nav-bar {
        flex-direction: column;
        gap: 15px;
    }

    nav {
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    nav a {
        white-space: nowrap;
        padding: 5px 10px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .about-grid,
    .booking-container {
        grid-template-columns: 1fr;
    }

    .visual-card {
        order: -1;
        /* Show image/stat first on mobile */
    }
}
/* ===========================
   EVENT LIST ITEMS
   =========================== */
.event-list-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
}
.event-list-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 64px;
    border-radius: 12px;
    flex-shrink: 0;
    line-height: 1.1;
    padding: 4px 8px;
}
.event-info {
    flex: 1;
    min-width: 0;
}

/* ===========================
   GALLERY GRID
   =========================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 12px;
}
.gallery-wide {
    grid-column: span 2;
    grid-row: span 2;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}
.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27,77,62,0.75) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 14px;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.gallery-overlay span {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Sarabun', sans-serif;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
    }
    .gallery-wide {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* ===========================
   DONATION CARD
   =========================== */
.donation-card {
    background: #fff;
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 20px 60px -15px rgba(27,77,62,0.15);
    border: 1px solid rgba(197,160,89,0.2);
}
.donation-qr-frame {
    width: 200px;
    height: 200px;
    border-radius: 20px;
    border: 3px solid var(--gold);
    padding: 10px;
    background: #fff;
    box-shadow: 0 8px 30px -8px rgba(197,160,89,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.qr-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f0f6f2;
}
.donation-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f9fbf9;
    border-radius: 12px;
    flex-wrap: wrap;
}
@media (max-width: 640px) {
    .donation-card {
        padding: 24px;
    }
    .donation-qr-frame {
        width: 160px;
        height: 160px;
    }
}

/* ===========================
   DARK MODE OVERRIDES
   =========================== */

/* ---- Global text & background ---- */
[data-theme="dark"] body {
    background-color: #1d232a;
    color: #a6adbb;
}

/* ---- Fix hardcoded text-primary (dark green → gold in dark mode) ---- */
[data-theme="dark"] .text-primary {
    color: var(--gold-light) !important;
}

/* ---- Fix hardcoded bg-white cards & sections ---- */
[data-theme="dark"] .bg-white {
    background-color: #191e24 !important;
}
[data-theme="dark"] .bg-white p,
[data-theme="dark"] .bg-white h3,
[data-theme="dark"] .bg-white h4,
[data-theme="dark"] .bg-white span {
    color: #a6adbb;
}

/* ---- Fix contact section white background ---- */
[data-theme="dark"] #contact {
    background-color: #1d232a !important;
}

/* ---- Fix about/events section base-100 inner card ---- */
[data-theme="dark"] .bg-base-100 {
    background-color: #191e24 !important;
}

/* ---- Fix bg-primary solid sidebar panels ---- */
[data-theme="dark"] .bg-primary {
    background-color: var(--primary-dark) !important;
}
[data-theme="dark"] .bg-primary\/5,
[data-theme="dark"] .bg-primary\/10 {
    background-color: rgba(197, 160, 89, 0.12) !important;
}

/* ---- Fix border colors ---- */
[data-theme="dark"] .border-base-200 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}
[data-theme="dark"] .border-primary\/10 {
    border-color: rgba(197, 160, 89, 0.2) !important;
}

/* ---- Fix bg-base-200/50 section backgrounds ---- */
[data-theme="dark"] .bg-base-200\/50 {
    background-color: #15191e !important;
}

/* ---- Fix timeline dots ---- */
[data-theme="dark"] .bg-white.border-4.border-gold {
    background-color: #1d232a !important;
}

/* ---- Fix text-primary opacity variants ---- */
[data-theme="dark"] .text-primary\/70 {
    color: rgba(197, 160, 89, 0.75) !important;
}
[data-theme="dark"] .text-primary\/80 {
    color: rgba(197, 160, 89, 0.85) !important;
}
[data-theme="dark"] .text-primary\/30 {
    color: rgba(197, 160, 89, 0.35) !important;
}

/* ---- Fix icon sidebar in contact/about cards ---- */
[data-theme="dark"] .group:hover .group-hover\:bg-gold {
    background-color: var(--gold-dark) !important;
}

/* ---- nav menu links ---- */
[data-theme="dark"] .menu a {
    color: #a6adbb;
}
[data-theme="dark"] .menu a:hover {
    color: var(--gold-light);
}

[data-theme="dark"] header {
    background: rgba(29, 35, 42, 0.97) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}

[data-theme="dark"] .event-list-item {
    background: #191e24;
    border-color: rgba(255,255,255,0.06);
    color: #a6adbb;
}

[data-theme="dark"] .event-list-item p {
    color: #7c8ca0;
}

[data-theme="dark"] .temple-directory-card {
    background: #191e24;
    border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .temple-directory-card:hover {
    border-color: var(--gold-dark);
}

[data-theme="dark"] .portrait-frame {
    background: #191e24;
}

[data-theme="dark"] .monk-name {
    color: #d0d8e4;
}

[data-theme="dark"] .monk-title {
    color: var(--gold-light);
}

[data-theme="dark"] .donation-card {
    background: #191e24;
    border-color: rgba(197,160,89,0.25);
}

[data-theme="dark"] .donation-info-row {
    background: #15191e;
    color: #a6adbb;
}

[data-theme="dark"] .donation-qr-frame {
    background: #fff;
}

[data-theme="dark"] .qr-placeholder {
    background: #2a3038;
}

[data-theme="dark"] .temple-modal-container {
    background: #191e24;
    color: #a6adbb;
}

[data-theme="dark"] .close-modal {
    color: #7c8ca0;
}

[data-theme="dark"] .close-modal:hover {
    color: var(--gold-light);
}

[data-theme="dark"] footer {
    background: #0d1117;
}

[data-theme="dark"] .gallery-item {
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
    /* ซ่อนทุกอย่างยกเว้น modal content */
    body.printing-news > *:not(#newsModal) {
        display: none !important;
    }
    body.printing-news #newsModal {
        position: static !important;
        background: none !important;
        display: block !important;
        padding: 0 !important;
    }
    body.printing-news .temple-modal-container {
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
    /* ซ่อนปุ่มปิดและปุ่มพิมพ์ */
    body.printing-news .no-print,
    body.printing-news button {
        display: none !important;
    }
    /* Header ชื่อวัดก่อนเนื้อหา */
    body.printing-news #modalBody::before {
        content: '';
        display: block;
        text-align: center;
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
        border-bottom: 2px solid #c5a059;
    }
    /* ปรับสีข้อความให้พิมพ์ออกมาชัด */
    body.printing-news * {
        color: #000 !important;
        background: #fff !important;
    }
    body.printing-news h2 {
        font-size: 1.6rem !important;
        margin-bottom: 1rem !important;
    }
    /* Print header แสดงชื่อวัดและวันที่ */
    body.printing-news #print-header {
        display: flex !important;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #1b4d3e;
    }
    body.printing-news #print-header img {
        width: 60px;
        height: 60px;
        object-fit: contain;
    }
}
