/*
Theme Name: สหกรณ์ออมทรัพย์
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: Custom theme for Chachoengsao Public Health Saving and Credit Cooperative Limited
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sahakorn
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* SAHAKORN COLOR TOKENS */
:root {
    --sk-primary: #35ccff;
    --sk-primary-strong: #00adff;
    --sk-secondary: #35f0a8;
    --sk-secondary-strong: #11cc87;
    --sk-surface-soft: #f7feff;
    --sk-surface-mint: #f3fff9;
    --sk-text-strong: #0761b8;
    --sk-text-link: #008bdb;
    --sk-header-grad: linear-gradient(135deg, #57d4ff 0%, #8be9ff 45%, #54f3bc 100%);
    --sk-hero-grad: linear-gradient(135deg, #f3fdff 0%, #fbfffe 50%, #f0fff8 100%);
    --sk-accent-grad: linear-gradient(135deg, #35ccff 0%, #35f0a8 100%);
    --sk-footer-grad: linear-gradient(180deg, #13b8ff 0%, #12d796 100%);
}

body {
    font-family: 'Prompt', 'Sarabun', sans-serif;
    line-height: 1.6;
    color: #004d40; /* Dark green text */
    background-color: var(--sk-surface-soft);
}

a {
    color: var(--sk-text-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--sk-primary-strong);
}

/* Header Styles */
.site-header {
    background: var(--sk-header-grad);
    padding: 15px 0;
    box-shadow: 0 8px 24px rgba(36,184,255,0.28);
    background-color: var(--sk-primary);
    color: white; /* White text */
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: white;
/* Archive card base styles */
    padding: 5px;
}

.site-title {
    color: var(--sk-text-strong);
    font-size: 1.3rem;
    font-weight: 700;
}

.site-subtitle {
    color: #ffffff;
    font-size: 0.85rem;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    color: white;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item.contact {
    background: linear-gradient(135deg, #8be8ff 0%, #54d5ff 100%);
    color: #083d77;
}

.nav-item.member {
    background: linear-gradient(135deg, #4bf0ad 0%, #1fdc92 100%);
    color: white;
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.nav-text {
    font-size: 0.85rem;
}

.announcement-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.announcement-card {
    background: #fff;
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(41,137,216,0.08);
    transition: all 0.25s ease;
    overflow: hidden;
}
.announcement-date {
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    background: #2ecc40;
    color: #fff;
}
.announcement-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}
.card-media { margin-bottom: 12px; }
.card-image { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; display: block; }
.card-media--placeholder .card-placeholder { height: 220px; background:#f5f5f7; display:flex; align-items:center; justify-content:center; border-radius:8px; color:rgba(0,0,0,0.06); font-size:2.5rem; }
.read-more { display:inline-block; color:var(--sk-text-link); font-weight:600; margin-top:6px; }

/* Services section styles */
.services-section { padding: 60px 20px; background: linear-gradient(180deg, #e8f4f8 0%, #d0e8f0 100%); }
.services-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.service-card { background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%); padding: 25px 20px; border-radius: 15px; color: white; position: relative; min-height: 180px; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card .service-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 15px; }
.service-card .service-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); width: 80px; height: 80px; background: rgba(255,255,255,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.service-card .service-icon i { font-size: 2rem; opacity: 0.8; }
.service-card .service-desc { font-size: 0.9rem; opacity: 0.95; line-height: 1.5; max-width: 60%; }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.08); }

/* Responsive: 3 cols on laptop, 2 on tablet, 1 on mobile */
@media (max-width: 1100px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card .service-icon { right: 18px; top: 20px; transform: none; }
    .service-card .service-desc { max-width: 100%; margin-top: 36px; }
}
@media (max-width: 480px) {
    .services-grid { grid-template-columns: 1fr; }
    .service-card { padding: 18px; min-height: 140px; }
    .service-card .service-icon { position: static; width: 56px; height: 56px; margin-top: 12px; border-radius: 12px; background: rgba(255,255,255,0.08); }
    .service-card .service-title { font-size: 1rem; }
    .service-card .service-desc { margin-top: 12px; font-size: 0.9rem; }
}

/* Downloads page common styles (kept minimal; page template also includes inline styles) */
.downloads-grid { margin-top: 8px; }

/* Single post layout styles moved from inline */
.single-main { background:#f5f5f5; padding:60px 20px; }
.single-wrapper { max-width:820px; margin:0 auto; }
.single-card { background:#fff; border-radius:14px; overflow:hidden; box-shadow:0 6px 26px rgba(0,0,0,0.08); }
.single-card-inner { padding:40px 44px; }
.single-meta { font-size:0.95rem; color:#888; margin-bottom:14px; display:flex; align-items:center; }
.single-title { font-size:2.4rem; color:#1a1a1a; margin:0 0 28px; line-height:1.2; letter-spacing:1px; }
.single-content { color:#444; line-height:1.8; font-size:1.05rem; }

/* Responsive rules for single posts */
@media (max-width: 900px) {
    .single-main { padding:36px 14px; }
    .single-wrapper { max-width:700px; }
    .single-card-inner { padding:28px 22px; }
    .single-title { font-size:1.6rem; }
    .card-image, .announcement-card img { height:160px; }
}

@media (max-width: 600px) {
    .single-main { padding:20px 10px; }
    .single-wrapper { margin:0 8px; }
    .single-card-inner { padding:18px; }
    .single-title { font-size:1.4rem; }
    .card-image, .announcement-card img { height:120px; }
    .single-card { box-shadow:none; }
}

/* Prevent overflowing long words / continuous text from breaking layout */
.single-content, .single-content p, .announcement-description, .announcement-card, .news-content, .announcement-card p {
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}
/* Hero Section */
.hero-section {
    background: var(--sk-hero-grad);
    padding: 40px 20px;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* Announcement Card */
.announcement-card {
    background: white;
    border-radius: 30px;
    padding: 40px 50px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    flex: 1;
    max-width: 750px;
    position: relative;
}

.announcement-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: var(--sk-accent-grad);
    border-radius: 35px;
    z-index: -1;
    opacity: 0.3;
}

.org-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.org-badge img {
    width: 80px;
    height: 80px;
}

.org-name {
    color: var(--sk-primary-strong);
    font-size: 1.3rem;
    font-weight: 700;
}

.announcement-title {
    text-align: center;
    margin: 20px 0;
}

.announcement-title h1 {
    color: var(--sk-primary-strong);
    font-size: 4rem;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.arrows {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 10px 0;
}

.arrow {
    color: var(--sk-text-strong);
    font-size: 1.5rem;
}

.announcement-content {
    text-align: center;
}

.announcement-content p {
    font-size: 1.4rem;
    color: #333;
    margin: 15px 0;
}

.highlight-red {
    color: var(--sk-secondary-strong);
    font-weight: 700;
    font-size: 2rem;
}

.highlight-blue {
    color: var(--sk-primary-strong);
    font-weight: 700;
    font-size: 1.5rem;
}

.amount {
    font-size: 1.8rem;
    color: #333;
    font-weight: 600;
}

.required-text {
    color: var(--sk-secondary-strong);
    font-size: 2rem;
    font-weight: 800;
    margin-top: 20px;
}

.credit-bureau {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.credit-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.credit-icon img {
    width: 60px;
}

.qr-code {
    width: 100px;
    height: 100px;
    background: #333;
    border-radius: 10px;
}

/* Chairman Section */
.chairman-section {
    flex-shrink: 0;
    text-align: center;
    background-color: #b2dfdb; /* Light green background */
    color: #004d40; /* Dark green text */
}

.chairman-photo {
    width: 280px;
    height: 350px;
    border-radius: 0 0 50% 50%;
    overflow: hidden;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
}

.chairman-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chairman-info {
    margin-top: 20px;
    background: var(--sk-accent-grad);
    padding: 15px 30px;
    border-radius: 20px;
    color: white;
}

.chairman-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #c8f7ff;
}

.chairman-title {
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Vision Section */
.vision-section {
    background: white;
    padding: 20px;
    margin-top: 20px;
    border-radius: 15px;
    text-align: center;
    max-width: 280px;
}

.vision-section p {
    color: var(--sk-primary-strong);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    font-size: 0.9rem;
}

.cookie-text a {
    color: #bcefff;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.btn-cookie {
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-reject {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.btn-accept {
    background: var(--sk-primary);
    color: white;
}

/* Decorative Elements */
.sparkle {
    position: absolute;
    font-size: 1.5rem;
    color: #a5e8ff;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Image Slider */
.slider-section {
    width: 100%;
    background: linear-gradient(180deg, var(--sk-surface-soft) 0%, var(--sk-surface-mint) 100%);
}

.slider-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .announcement-card { padding: 30px 28px; max-width: 100%; }
    .hero-container { flex-direction: column; gap: 20px; }
    .chairman-photo { width: 220px; height: 280px; }
}

@media (max-width: 900px) {
    .single-hero[style*="linear-gradient"] { height: 260px !important; }
    .single-hero img { height: auto !important; }
    .single-card { border-radius: 12px; }
    .single-card .single-content { font-size: 1rem; }
    .single-card h1 { font-size: 1.6rem; }
    .announcement-cards { grid-template-columns: 1fr !important; }
    .services-section div[style*="grid-template-columns"] { grid-template-columns: repeat(2,1fr) !important; }
}

@media (max-width: 600px) {
    body { font-size: 15px; }
    .header-container { padding: 12px; }
    .site-title { font-size: 1.1rem; }
    .single-hero[style*="linear-gradient"] { height: 200px !important; }
    .single-hero img { height: auto !important; }
    .single-card { margin: 0 12px; }
    .single-card { box-shadow: none; }
    .single-card { border-radius: 10px; }
    .single-card div[style*="padding:40px 44px"] { padding: 20px 18px !important; }
    .single-card h1 { font-size: 1.4rem; }
    .announcement-title h1 { font-size: 2rem; }
    .services-section div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* Utility: make images responsive inside content */
.single-content img, .announcement-content img, .news-content img { width: 100%; height: auto; }

/* Announcement / News archive responsive tweaks */
@media (max-width: 900px) {
    .announcement-cards { grid-template-columns: 1fr !important; gap: 18px !important; }
    .announcement-card { padding: 18px !important; border-radius: 12px !important; }
    .announcement-card .announcement-title { font-size: 1.05rem !important; }
    .announcement-card .announcement-date { font-size: 0.85rem !important; }
    .announcement-card img { width: 100%; height: 160px !important; object-fit: cover; border-radius: 8px; }
    .announcement-description { -webkit-line-clamp: 3; }
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 220px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Homepage slider: force natural-size centered images and disable global cover scaling */
body.home .slider-section .slider-container {
    overflow: visible !important;
}

body.home .slider-section .slider-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 460px !important;
    overflow: hidden !important;
}

body.home .slider-section .slide,
body.home .slider-section .slide-item {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

body.home .slider-section .slide img,
body.home .slider-section .slide-item img,
body.home .slider-section .slider-wrapper img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin: auto !important;
    display: block !important;
    transform: none !important;
}

.slide-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 60%, #333 60%, #222 100%);
    display: flex;
    position: relative;
    overflow: hidden;
}

.slide-placeholder.slide-bg-2 {
    background: var(--sk-accent-grad);
}

.slide-placeholder.slide-bg-3 {
    background: linear-gradient(135deg, var(--sk-secondary) 0%, var(--sk-secondary-strong) 100%);
}

.slide-placeholder.slide-bg-4 {
    background: var(--sk-accent-grad);
}

.slide-placeholder.slide-bg-5 {
    background: linear-gradient(135deg, #9b59b6 0%, #7d3c98 100%);
}

.slide-placeholder .slide-content {
    flex: 1;
    padding: 40px 60px;
    color: #333;
    z-index: 2;
}

.slide-placeholder.slide-bg-2 .slide-content,
.slide-placeholder.slide-bg-3 .slide-content,
.slide-placeholder.slide-bg-4 .slide-content,
.slide-placeholder.slide-bg-5 .slide-content {
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.slide-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.slide-title-box {
    text-align: right;
}

.slide-title-box h2 {
    color: var(--sk-primary-strong);
    font-size: 2rem;
    font-weight: 700;
}

.slide-title-box h3 {
    color: var(--sk-primary-strong);
    font-size: 2.5rem;
    font-weight: 800;
}

.slide-title-box p {
    color: #666;
    font-size: 0.9rem;
}

.slide-dates {
    margin: 20px 0;
}

.date-item {
    margin-bottom: 20px;
}

.date-main {
    display: block;
    color: var(--sk-primary-strong);
    font-size: 1.8rem;
    font-weight: 700;
}

.date-sub {
    display: block;
    color: var(--sk-primary-strong);
    font-size: 1rem;
}

.slide-notes {
    margin: 20px 0;
}

.slide-notes p {
    color: #666;
    font-size: 0.9rem;
    margin: 5px 0;
}

.slide-warning {
    background: var(--sk-secondary-strong);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    display: inline-block;
    margin-top: 10px;
}

.slide-building {
    position: absolute;
    right: 0;
    top: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.1) 50%, #333 50%, #222 100%);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}

/* Slider Navigation */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background: var(--sk-primary);
    color: white;
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

/* Slider Pagination */
.slider-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.pagination-dot {
    width: 35px;
    height: 35px;
    background: #9ce7ff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-dot:hover,
.pagination-dot.active {
    background: var(--sk-secondary);
    color: white;
    transform: scale(1.1);
}

/* Footer */
.site-footer {
    background: var(--sk-footer-grad);
    color: white;
    padding: 40px 20px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.footer-section h3 {
    color: var(--sk-text-strong);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section p,
.footer-section a {
    color: #e8e8e8;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.app-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.app-buttons img {
    height: 40px;
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-container {
        flex-direction: column;
    }
    
    .chairman-section {
        order: -1;
    }
    
    .announcement-card {
        max-width: 100%;
    }
    
    .slider-wrapper {
        height: 400px;
    }
    
    .slide-title-box h2 {
        font-size: 1.5rem;
    }
    
    .slide-title-box h3 {
        font-size: 1.8rem;
    }
    
    .date-main {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 10px 0;
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 10px;
        justify-content: center;
    }
    
    .logo-section img {
        width: 50px;
        height: 50px;
    }
    
    .site-title {
        font-size: 1rem;
        text-align: center;
    }
    
    .site-subtitle {
        font-size: 0.7rem;
        text-align: center;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 5px;
    }
    
    .nav-item {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .nav-icon {
        font-size: 0.9rem;
        margin-bottom: 3px;
    }
    
    .announcement-title h1 {
        font-size: 2.5rem;
    }
    
    .highlight-red {
        font-size: 1.5rem;
    }
    
    .chairman-photo {
        width: 200px;
        height: 250px;
    }
    
    .footer-container {
        flex-direction: column;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .app-buttons {
        justify-content: center;
    }
    
    .slider-wrapper {
        height: 350px;
    }
    
    .slide-placeholder .slide-content {
        padding: 20px 30px;
    }
    
    .slide-title-box h2 {
        font-size: 1.2rem;
    }
    
    .slide-title-box h3 {
        font-size: 1.4rem;
    }
    
    .date-main {
        font-size: 1.1rem;
    }
    
    .date-sub {
        font-size: 0.8rem;
    }
    
    .slide-warning {
        font-size: 0.85rem;
        padding: 10px 20px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    .pagination-dot {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .slide-building {
        display: none;
    }
    
    /* Services Section Responsive */
    .services-section > div > div:last-child {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* New Service Cards Hover Effect */
.service-card-new:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(26, 82, 118, 0.3);
}

/* Services Section Responsive */
@media (max-width: 1200px) {
    .services-section > div > div:last-child {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .services-section > div > div:last-child {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .services-section > div > div:last-child {
        grid-template-columns: 1fr !important;
    }
    
    .service-card-new {
        min-height: 150px !important;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .site-header {
        padding: 8px 0;
    }
    
    .header-container {
        flex-direction: column;
        gap: 10px;
        padding: 0 10px;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 8px;
    }
    
    .logo-section img {
        width: 40px;
        height: 40px;
    }
    
    .site-title {
        font-size: 0.85rem;
    }
    
    .site-subtitle {
        font-size: 0.6rem;
    }
    
    .main-nav {
        gap: 3px;
    }
    
    .nav-item {
        padding: 5px 6px;
        font-size: 0.65rem;
    }
    
    .nav-icon {
        font-size: 0.8rem;
        width: 35px;
        height: 35px;
        margin-bottom: 2px;
    }
    
    .nav-text {
        font-size: 0.6rem;
    }
    
    .announcement-title h1 {
        font-size: 1.8rem;
    }
    
    .announcement-card {
        padding: 20px 30px;
        border-radius: 20px;
    }
    
    .highlight-red {
        font-size: 1.2rem;
    }
    
    .highlight-blue {
        font-size: 1rem;
    }
    
    .amount {
        font-size: 1.3rem;
    }
    
    .chairman-photo {
        width: 150px;
        height: 200px;
    }
    
    .slider-wrapper {
        height: 250px;
    }
    
    .slide-title-box h2 {
        font-size: 0.9rem;
    }
    
    .slide-title-box h3 {
        font-size: 1rem;
    }
    
    .date-main {
        font-size: 0.85rem;
    }
    
    .date-sub {
        font-size: 0.7rem;
    }
    
    .slide-warning {
        font-size: 0.75rem;
        padding: 8px 15px;
    }
    
    .footer-section {
        margin-bottom: 20px;
    }
    
    .footer-section h3 {
        font-size: 1rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.8rem;
    }
    
    .app-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .app-buttons img {
        height: 35px;
        width: auto;
    }
}

/* Announcement / News responsive helpers (appended) */
.announcement-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.announcement-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.announcement-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 14px;
}

.announcement-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.announcement-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.announcement-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.announcement-card a {
    color: var(--sk-text-link);
    font-weight: 600;
}

.announcement-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.09);
}

@media (max-width: 900px) {
    .announcement-cards {
        grid-template-columns: 1fr;
    }
    .announcement-card {
        padding: 16px;
    }
    .announcement-card img {
        height: 180px;
    }
    .announcement-title {
        font-size: 1.05rem;
    }
}

@media (max-width: 600px) {
    .announcement-card img {
        height: 140px;
    }
    .announcement-title {
        font-size: 1rem;
    }
    .announcement-description {
        -webkit-line-clamp: 4;
    }
}

/* Date color for news cards (home, news archive, single news, news post type) */
body.home .announcement-date,
body.post-type-archive-news .announcement-date,
body.single-news .announcement-date,
body.post-type-news .announcement-date {
    color: var(--sk-primary-strong) !important;
}

/* ==========================================================
   SAHAKORN THEME LAYER (SYSTEMATIC BLUE-GREEN)
   - Section-based overrides using top-level tokens
   ========================================================== */
/* Global */
body {
    background-color: var(--sk-surface-soft);
}

a,
.read-more,
.announcement-card a {
    color: var(--sk-text-link);
}

/* Header + Navigation */
.site-header {
    background: var(--sk-header-grad);
    background-color: var(--sk-primary);
}

.site-title,
.footer-section h3,
.arrow,
.pagination-dot {
    color: var(--sk-text-strong);
}

.site-subtitle {
    color: #ffffff;
}

.nav-item.contact {
    background: linear-gradient(135deg, #8be8ff 0%, #54d5ff 100%);
    color: #083d77;
}

.nav-item.member {
    background: linear-gradient(135deg, #4bf0ad 0%, #1fdc92 100%);
    color: #ffffff;
}

/* Hero + Announcement */
.hero-section {
    background: var(--sk-hero-grad);
}

.announcement-card::before {
    background: var(--sk-accent-grad);
    opacity: 0.5;
}

.announcement-title h1,
.highlight-blue,
body.home .announcement-date,
body.post-type-archive-news .announcement-date,
body.single-news .announcement-date,
body.post-type-news .announcement-date {
    color: var(--sk-primary-strong) !important;
}

.required-text,
.highlight-red {
    color: var(--sk-secondary-strong);
}

.chairman-info {
    background: var(--sk-accent-grad);
}

.chairman-name {
    color: #c8f7ff;
}

/* Slider + Pagination */
.slide-placeholder.slide-bg-4,
.slide-placeholder.slide-bg-5 {
    background: var(--sk-accent-grad);
}

.slide-title-box h2,
.slide-title-box h3,
.date-main,
.date-sub {
    color: var(--sk-primary-strong);
}

.slide-warning {
    background: var(--sk-secondary-strong);
}

.pagination-dot {
    background: #b6efff;
}

.pagination-dot:hover,
.pagination-dot.active {
    background: var(--sk-secondary);
    color: #ffffff;
}

/* Footer */
.site-footer {
    background: var(--sk-footer-grad);
}
