:root {
    --primary-green: #1F7023; 
    --accent-green: #A6BF98;  
    --bg-main: #E5F6EC;       
    --bg-card: #C2DBD4;      
    --secondary-teal: #699D99; 
    
    --text-title: #1F7023;
    --text-body: #2c3e50;     
}

body {
    font-family: 'Sarabun', sans-serif;
    color: var(--text-dark);
    scroll-behavior: smooth;
}


body.dark {
   
    --bg-main: #121212;        
    --bg-card: #1e1e1e;
    

    --text-title: #E2EAAA;     
    --text-body: #F6F5EC;      
    --accent-color: #D1E2E8;   
}

body.dark .bg-light, body.dark section { background-color: #1a1a1a !important; color: white; }
body.dark .card, body.dark .accordion-item { background-color: #242424; color: white; }
body.dark .navbar { background-color: rgba(18, 18, 18, 0.95); }


.navbar {
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 5px;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-green) !important;
}


.hero-section {
    height: 80vh;
    background: url('../img/hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    position: relative;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.7), rgb(255, 255, 255));
}


.system-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 20px;
}
.system-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.icon-box {
    width: 70px;
    height: 70px;
    background: var(--soft-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}


.donate-section {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
}

.btn-primary {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}
.btn-primary:hover {
    background-color: #236946;
}


.animate-up { opacity: 0; transform: translateY(30px); transition: 0.8s ease-out; }
.animate-left { opacity: 0; transform: translateX(-30px); transition: 0.8s ease-out; }
.animate-right { opacity: 0; transform: translateX(30px); transition: 0.8s ease-out; }

.show { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }


:root {
   
    --primary-green: #1F7023;  
    --accent-green: #A6BF98;   
    --bg-main: #E5F6EC;        
    --bg-card: #C2DBD4;        
    --secondary-teal: #699D99; 
    
    --text-title: #1F7023;
    --text-body: #2c3e50;      
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    font-family: 'Sarabun', sans-serif;
    line-height: 1.6;
    transition: all 0.4s ease;
}


.hero-slider {
    position: relative;
    height: 85vh;
    overflow: hidden;
    background-color: #ffffff;
}

.hero-slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fadeSlider 20s infinite; 
}


.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 4s; }
.slide:nth-child(3) { animation-delay: 8s; }
.slide:nth-child(4) { animation-delay: 12s; }
.slide:nth-child(5) { animation-delay: 16s; }
.slide:nth-child(6) { animation-delay: 20s; }
@keyframes fadeSlider {
    0%, 20% { opacity: 0; }
    25%, 45% { opacity: 1; }
    50%, 100% { opacity: 0; }
}


.hero-slider::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-content { z-index: 2; }


body.dark {
    background-color: #1a1c1e;
    --text-main: #e2e2e2;
}
:root {
    
    --primary-green: #1F7023;  
    --accent-green: #A6BF98;   
    --bg-main: #E5F6EC;        
    --bg-card: #C2DBD4;        
    --secondary-teal: #699D99; 
    
    --text-title: #1F7023;
    --text-body: #2c3e50;     
}

body.dark {
   
    --bg-main: #121212;       
    --bg-card: #1e1e1e;
    
   
    --text-title: #E2EAAA;     
    --text-body: #F6F5EC;     
    --accent-color: #D1E2E8;   
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    font-family: 'Sarabun', sans-serif;
    line-height: 1.6;
    transition: all 0.4s ease;
}

h1, h2, h3, h4, .fw-bold {
    color: var(--text-title);
}


.navbar {
    background: rgba(229, 246, 236, 0.95) !important; /* ใช้สี E5F6EC */
    border-bottom: 2px solid var(--accent-green);
}

body.dark .navbar {
    background: rgba(18, 18, 18, 0.95) !important;
    border-bottom: 2px solid var(--text-title);
}


.btn-primary {
    background-color: var(--secondary-teal);
    border: none;
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-green);
}


.text-muted {
    transition: color 0.4s ease;
}


body:not(.dark) .text-muted {
    color: #546e7a !important;
}


body.dark .text-muted {
    color: var(--accent-color) !important; 
    opacity: 0.8;
}

.donate-section {
 
    background: linear-gradient(135deg, #1F7023 0%, #0d3d10 100%);
    color: #F6F5EC !important; 
    border-radius: 50px;
    margin: 4rem 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}


.donate-section::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.bank-card {
    background: #ffffff;
    color: #1F7023;
    border-left: 8px solid var(--secondary-teal); 
    transition: transform 0.3s ease;
}

body.dark .bank-card {
    background: #E2EAAA; 
    color: #1F7023;
}

.donate-appeal-text {
    font-size: 1.2rem;
    line-height: 1.8;
    font-style: italic;
    opacity: 0.9;
}

.system-logo-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.system-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    
}


.system-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.system-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2) !important;
}

.system-card:hover .system-logo-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: #ffffff; 
}


.btn-system-link {
    background-color: var(--secondary-teal); 
    color: #ffffff !important;
    border: none;
    transition: all 0.3s ease;
}

.btn-system-link:hover {
    background-color: var(--primary-green); 
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(31, 112, 35, 0.3);
}


body.dark .system-logo-wrapper {
    background: #2c2c2c;
}

body.dark .system-card {
    background: #1e1e1e !important;
}

body.dark .btn-system-link {
    background-color: var(--primary-green);
    color: var(--text-body) !important;
}

.card-bg-blur {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    filter: blur(15px) opacity(0.5); 
    z-index: 1;
    transition: all 0.5s ease;
}

.system-card {
    background: white !important; 
    transition: all 0.4s ease;
}


.system-card:hover .card-bg-blur {
    filter: blur(0px) opacity(0.25);
    transform: scale(1.1);
}

.system-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15) !important;
}


.system-logo-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    z-index: 2;
}


body.dark .system-card {
    background: #1e1e1e !important;
}

body.dark .card-bg-blur {
    filter: blur(25px) opacity(0.1); 
}

body.dark .system-logo-wrapper {
    background: rgb(255, 255, 255);
}

#activities {
    background: var(--bg-card); 
}


.news-highlight-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-main) !important;
}

.news-main-img {
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hover-zoom:hover .news-main-img {
    transform: scale(1.05);
}


.news-side-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-main) !important;
}

.news-side-img {
    height: 120px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hover-zoom-small:hover .news-side-img {
    transform: scale(1.1);
}


.hover-lift {
    transition: transform 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
}



body.dark #activities {
    background: #1a1a1a;
}

body.dark .news-highlight-card,
body.dark .news-side-card {
    background: #242424 !important;
}

body.dark .news-highlight-card .card-title,
body.dark .news-side-card .card-title {
    color: var(--text-title) !important; /* ใช้ E2EAAA */
}

body.mourning-mode {
    filter: grayscale(65%) contrast(0.9) brightness(0.9);
    -webkit-filter: grayscale(65%) contrast(0.9) brightness(0.9);
    
}


body.dark.mourning-mode {
    filter: grayscale(65%) brightness(0.8); 
}

#announcementModal .modal-content {
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    animation: modalBounce 0.5s ease-out;
}

@keyframes modalBounce {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}


body.dark #announcementModal .modal-content {
    background-color: var(--bg-card) !important;
}

body.dark #announcementModal h4 {
    color: var(--text-title) !important;
}

#announcementModal .modal-content {
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    animation: modalBounce 0.5s ease-out;
}

@keyframes modalBounce {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ปรับให้ใน Dark Mode ตัว Popup ไม่ขาวจ้าจนเกินไป */
body.dark #announcementModal .modal-content {
    background-color: var(--bg-card) !important;
}

body.dark #announcementModal h4 {
    color: var(--text-title) !important;
}
.btn-close {
    filter: none !important;
}
/* หากเป็น Mourning Mode (ไว้อาลัย) ภาพใน Popup จะซีดตามไปด้วยอัตโนมัติ */