/* ═══════════════════════════════════════════════════════
   ศูนย์วิทยาศาสตร์ข้าว— 
═══════════════════════════════════════════════════════ */

/* ── 0. Imports (MUST BE AT THE VERY TOP) ── */
@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@100..700&family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Trirong:wght@400;500;600;700&display=swap');

/* ── 1. Design Tokens ── */
:root {
    --rsc-blue: hsl(237, 86%, 40%);
    --rsc-blue-dark: hsl(237, 86%, 26%);
    --rsc-blue-mid: hsl(237, 86%, 58%);
    --rsc-blue-pale: hsl(237, 86%, 96%);
    --rsc-gold: hsl(43, 74%, 46%);
    --rsc-gold-dark: hsl(43, 74%, 32%);
    --rsc-gold-pale: hsl(43, 74%, 95%);
    --rsc-white: #ffffff;
    --rsc-bg: #f0f2fb;
    --rsc-paper: #fbfaf5;
    --rsc-border: #e2e6f3;
    --rsc-text: #1e293b;
    --rsc-text-dark: #0f172a;
    --rsc-muted: #64748b;
    --rsc-radius: 16px;
    --rsc-shadow-sm: 0 4px 12px rgba(10, 30, 180, 0.04);
    --rsc-shadow-md: 0 10px 30px rgba(10, 30, 180, 0.08);
    --rsc-shadow-lg: 0 20px 40px rgba(10, 30, 180, 0.12);
    --rsc-ease: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --rsc-serif: 'Google Sans', serif;
}

/* ── 2. Base Typography ── */
* {
    box-sizing: border-box;
}

body, p, a, div, span, li,
h1, h2, h3, h4, h5, h6,
.summer-post-title h1,
.timeline-content,
.timeline-year {
    font-family: "Google Sans", sans-serif;
    font-optical-sizing: auto;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--rsc-text);
}

table {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}

@media only screen and (min-width: 40.063em) {
    .post-template .summer-post-content>div:not(.summer-post-title) p:first-child {
        font-size: 1.1rem !important;
    }
}

/* ── 3. RSC Full-Width Mosaic Gallery Styles ── */
.rsc-mosaic-section {
    width: 100%;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: #ffffff;
    padding: 0 4vw 60px 4vw;
}

.rsc-mosaic-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.rsc-mosaic-right-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
}

.rsc-mosaic-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    min-height: 380px;
}

.rsc-mosaic-card--big { min-height: 780px; }

.rsc-mosaic-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.rsc-mosaic-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--rsc-blue, #0f2499);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rsc-mosaic-card:hover .rsc-mosaic-bg { transform: scale(1.06); }

.rsc-mosaic-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,10,30,0.88) 0%, rgba(5,10,30,0.3) 55%, transparent 100%);
    pointer-events: none;
}

/* Card แบบสีพื้นหลังทึบ (เขียวมรกตพรีเมียม) */
.rsc-mosaic-card--color,
.rsc-mosaic-card--color .rsc-mosaic-content {
    background: #113829;
}

.rsc-mosaic-content {
    position: relative;
    z-index: 2;
    padding: 36px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    justify-content: flex-end;
}

.rsc-mosaic-tag {
    background: var(--rsc-blue, #1a35cc);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.rsc-mosaic-title {
    font-family: var(--rsc-serif);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px 0;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.rsc-mosaic-card--small .rsc-mosaic-title { font-size: 1.25rem; }

.rsc-mosaic-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin: 0 0 20px 0;
    max-width: 500px;
}

.rsc-mosaic-btn {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.3);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.rsc-mosaic-card--color .rsc-mosaic-btn {
    background: #113829;
    border-color: rgba(255,255,255,0.2);
}

.rsc-mosaic-card:hover .rsc-mosaic-btn {
    background: var(--rsc-blue, #1a35cc);
    border-color: var(--rsc-blue, #1a35cc);
}

.rsc-mosaic-card--color:hover .rsc-mosaic-btn {
    background: #1a5c43;
    border-color: #1a5c43;
}

@media (max-width: 1024px) {
    .rsc-mosaic-container      { grid-template-columns: 1fr; }
    .rsc-mosaic-card--big      { min-height: 480px; }
    .rsc-mosaic-right-grid     { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .rsc-mosaic-right-grid     { grid-template-columns: 1fr; }
    .rsc-mosaic-card           { min-height: 320px; }
    .rsc-mosaic-content        { padding: 24px; }
}


/* ════════════════════════════════════════════
   4. IMPACT SECTION
   ════════════════════════════════════════════ */
.rsc-impact-section {
    position: relative;
    padding: 40px 40px 60px;
    font-family: var(--rsc-serif);
}

/* ── STATS BANNER ── */
.rsc-stats-banner {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a35cc 0%, #0f2499 100%);
    border-radius: 20px;
    padding: 48px 56px;
    margin-bottom: 40px;
    gap: 0;
    position: relative;
}

.rsc-stat-bar-item {
    flex: 1;
    padding: 0 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}
.rsc-stat-bar-item:first-child { padding-left: 0; }
.rsc-stat-bar-item:last-child  { padding-right: 0; border-right: none; }

.rsc-stat-bar-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.rsc-stat-bar-num {
    font-size: 3.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -2px;
    flex-shrink: 0;
}

.rsc-stat-bar-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.45;
}

/* Progress bar */
.rsc-progress-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
}

.rsc-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(to right, #34d399, #059669);
    transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── INFO CARDS GRID ── */
.rsc-impact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* ── AG-TECH CARD ── */
.rsc-info-card {
    background: var(--rsc-white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--rsc-shadow-sm);
    border: 1px solid var(--rsc-border);
    display: flex;
    gap: 20px;
}

.rsc-info-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--rsc-blue-pale);
    color: var(--rsc-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.rsc-info-content { flex-grow: 1; }

.rsc-impact-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rsc-blue-dark);
    margin: 0 0 20px 0;
    border-bottom: 2px solid var(--rsc-gold);
    padding-bottom: 10px;
    display: inline-block;
}

.rsc-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rsc-check-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: var(--rsc-text);
    line-height: 1.5;
}

.rsc-check-list li::before {
    content: '\f00c';
    font-family: 'FontAwesome';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--rsc-gold);
    font-size: 1rem;
}

.rsc-check-list li strong { color: var(--rsc-blue-dark); }

/* ── EDUCATION CARD ── */
.rsc-impact-box {
    background: var(--rsc-white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--rsc-shadow-sm);
    border: 1px solid var(--rsc-border);
}

.rsc-impact-box--alt { background: var(--rsc-bg); }

.rsc-edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.rsc-edu-title {
    font-size: 1rem;
    color: var(--rsc-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.rsc-edu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rsc-edu-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--rsc-border);
    font-size: 1.05rem;
}

.rsc-edu-list li:last-child { border-bottom: none; }
.rsc-edu-list li span      { color: var(--rsc-text); }
.rsc-edu-list li strong    { color: var(--rsc-blue); font-size: 1.2rem; }

/* ── RESPONSIVE IMPACT ── */
@media (max-width: 1024px) {
    .rsc-stats-banner { flex-wrap: wrap; padding: 40px; gap: 28px; }
    .rsc-stat-bar-item { flex: 0 0 calc(50% - 14px); padding: 0 0 24px 0; border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
    .rsc-stat-bar-item:nth-child(3), .rsc-stat-bar-item:last-child { border-bottom: none; }
}
@media (max-width: 992px) { .rsc-impact-grid { grid-template-columns: 1fr; gap: 30px; } }
@media (max-width: 640px) {
    .rsc-impact-section   { padding: 30px 20px 40px; }
    .rsc-stats-banner     { padding: 32px 24px; }
    .rsc-stat-bar-item    { flex: 0 0 100%; border-bottom: 1px solid rgba(255,255,255,0.15); }
    .rsc-stat-bar-item:last-child { border-bottom: none; }
    .rsc-stat-bar-num     { font-size: 3rem; }
    .rsc-edu-grid         { grid-template-columns: 1fr; }
    .rsc-info-card        { flex-direction: column; }
    .rsc-info-icon        { margin-bottom: -10px; }
}


/* ── 5. Timeline / Org Chart Structure ── */
.timeline-wrapper, .custom-content-box {
    margin: 0 auto 2em auto;
    max-width: 56.25rem;
    font-size: 1.125rem;
    padding: 0 1.5rem;
}

.custom-timeline {
    position: relative;
    margin: 0 auto 2em auto;
    padding-left: 35px;
    max-width: 900px;
}

.custom-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 11px;
    height: 100%;
    width: 4px;
    background: #bfbfbf;
    border-radius: 2px;
}

.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-dot { position: absolute; left: -32px; top: 0px; width: 18px; height: 18px; border-radius: 50%; background: #bfbfbf; }
.timeline-year { font-weight: bold; font-size: 1.2rem; color: var(--rsc-blue); margin-bottom: 5px; }
.timeline-content { background: #ffffff; padding: 15px 20px; border-bottom: 2px solid #d6d6d6; color: #000000; }
.custom-content-box { line-height: 1.8; color: #333; }
.custom-content-box p { margin-bottom: 1.5rem; text-align: justify; }

/* Org Chart Box Layouts */
.page-wrapper { max-width: 1100px; margin: 0 auto; padding: 20px 15px 40px; }
.connector-down, .connector-down2 { width: 2px; background: #555; height: 28px; margin: 0 auto; }
.connector-h { border-top: 2px solid #555; margin: 0 auto; }
.connector-branch, .text-center { display: flex; justify-content: center; position: relative; }
.connector-branch::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 100%; background: #555; }
.box { border: 2px solid #333; background: #fff; padding: 10px 16px; text-align: center; font-weight: 600; font-size: 15px; border-radius: 8px; }
.box.top-level { font-size: 16px; font-weight: 700; background: #fff; }
.box.committee, .box.operations, .box.dept-box { text-align: left; font-weight: 400; font-size: 13.5px; }
.box.operations { font-size: 13px; }
.box.dept-box { font-size: 13px; height: 100%; }
.box.committee .box-title, .box.operations .box-title, .box.dept-box .box-title { font-weight: 700; text-align: center; margin-bottom: 8px; border-bottom: 1px solid #ccc; padding-bottom: 6px; }
.box.committee ul { margin: 0; padding-left: 18px; list-style: disc; }
.box.committee ul li, .box.dept-box ul li { margin-bottom: 2px; line-height: 1.5; }
.box.operations .ops-grid { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.box.operations .ops-person { min-width: 180px; line-height: 1.5; }
.box.small-box { font-size: 14px; font-weight: 600; min-width: 120px; padding: 10px 14px; }
.box.dept-box ul { margin: 0; padding-left: 2px; list-style: none; }
.box.dept-box ul li::before { content: '- '; }
.box.dept-box .sub-section { font-weight: 600; margin-top: 6px; margin-bottom: 2px; }
.center-col { display: flex; flex-direction: column; align-items: center; }
.three-cols { display: flex; gap: 0; align-items: flex-start; }
.three-cols .col-main { flex: 1; }
.three-cols .col-side { width: 160px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.branch-line-row { display: flex; align-items: flex-start; justify-content: center; position: relative; }
.branch-line-row .vertical-line { width: 2px; background: #555; position: absolute; left: 50%; transform: translateX(-50%); top: 0; }
.h-line { border-top: 2px solid #555; }
.h-branch { display: flex; align-items: flex-start; justify-content: center; position: relative; }
.h-branch .h-connector { position: absolute; top: 0; height: 2px; background: #555; }
.branch-item { display: flex; flex-direction: column; align-items: center; }
.branch-item .down-stub { width: 2px; background: #555; height: 28px; }
.four-branch { display: flex; align-items: flex-start; justify-content: space-between; position: relative; margin-top: 0; }
.four-branch::before { content: ''; position: absolute; top: 0; left: 12.5%; right: 12.5%; height: 2px; background: #555; }
.four-branch .fb-item { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 6px; }
.four-branch .fb-item .down-stub { width: 2px; background: #555; height: 28px; }

@media (max-width: 767px) {
    .three-cols { flex-direction: column; align-items: center; }
    .three-cols .col-side { width: 100%; max-width: 320px; margin-top: 10px; }
    .four-branch { flex-direction: column; align-items: center; }
    .four-branch::before { display: none; }
    .four-branch .fb-item { width: 100%; max-width: 320px; margin-bottom: 10px; }
    .four-branch .fb-item .down-stub { height: 10px; }
    .box.operations .ops-grid { flex-direction: column; }
    .h-branch { flex-direction: column; align-items: center; }
    .h-branch .h-connector { display: none; }
    .branch-item { width: 100% !important; max-width: 320px; margin-bottom: 10px; }
}
@media (max-width: 991px) and (min-width: 768px) {
    .box.operations .ops-grid { flex-wrap: wrap; }
    .box.operations .ops-person { min-width: 140px; }
}


/* ── 6. Navigation Bar & Header ── */
.post-template .summer-blog-menu .summer-mobile-menu a,
.post-template .summer-blog-menu .summer-mobile-menu a:hover {
    color: var(--rsc-blue) !important;
}
.summer-page-container .summer-page-menu-header,
.summer-site-head-menu,
.summer-post-menu-header {
    background: var(--rsc-white) !important;
}
.summer-site-head-menu { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
.summer-blog-menu { margin-right: 4rem !important; }
.summer-menu>li>a {
    color: var(--rsc-text-dark) !important;
    font-family: var(--rsc-serif) !important;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--rsc-ease);
    ;
}
.summer-blog-menu ul li{z-index: 99999;}
.summer-blog-menu, .summer-blog-menu ul, .summer-site-head-menu {z-index: 99999;}
.summer-menu>li>a:hover { color: var(--rsc-blue) !important; }

/* ── Hero Section (Header) ── */
.summer-site-head-content { background: #fff !important; padding: 0px 20px !important; }
.summer-site-head-bg { display: none; }
.summer-blog-title .summer-site-head-title-bg,
h1.summer-blog-title span {
    background: none !important;
    color: #2b343c !important;
    font-family: var(--rsc-serif) !important;
    font-size: 2.4rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
h2.summer-blog-description {
    color: rgb(70 70 70) !important;
    font-family: var(--rsc-serif) !important;
    font-size: 1.15rem !important;
    font-weight: 400 !important;
    margin-top: 12px;
}


/* ── 7. Dropdown Menu (Submenu) ── */
li.rsc-has-sub { position: relative; }
.rsc-arrow { font-size: 0.72rem !important; margin-left: 6px; transition: transform var(--rsc-ease); display: inline-block; }
li.rsc-has-sub:hover .rsc-arrow { transform: rotate(180deg); }
ul.rsc-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--rsc-blue-dark);
    border-radius: 0 0 12px 12px;
    box-shadow: var(--rsc-shadow-md);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    z-index: 1000;
    border-top: 3px solid var(--rsc-gold);
}
li.rsc-has-sub:hover>ul.rsc-submenu { display: block; animation: rscFadeIn 0.2s ease forwards; }
ul.rsc-submenu li a {
    display: block !important;
    padding: 12px 20px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.9rem !important;
    font-family: var(--rsc-serif);
    white-space: nowrap;
    text-decoration: none !important;
    border-left: 3px solid transparent;
    transition: all var(--rsc-ease);
}
ul.rsc-submenu li a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-left-color: var(--rsc-gold);
    padding-left: 24px !important;
}

@keyframes rscFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media only screen and (min-width: 40.063em) {
    .summer-blog-menu, .summer-blog-menu ul, .summer-site-head-menu { overflow: visible !important; }
    .summer-blog-menu { height: auto !important; }
}

@media (max-width: 640px) {
    .summer-blog-menu ul { background: #17087cd6 !important; }
    .summer-menu>li>a { color: var(--rsc-white) !important; }
    .summer-menu>li>a:hover { color: #fff !important; }
    
    ul.rsc-submenu {
        display: none;
        position: static;
        background: #1e293b;
        border-radius: 0;
        box-shadow: none;
        border-top: none;
        padding: 0;
    }
    li.rsc-has-sub.open > ul.rsc-submenu { display: block; }
    li.rsc-has-sub > a .rsc-arrow { pointer-events: none; }
    ul.rsc-submenu li a { padding: 10px 24px !important; font-size: 0.9rem !important; }
    ul.rsc-submenu li a:hover { padding-left: 24px !important; border-left-color: transparent; }
}


/* ── 8. RSC MAGAZINE v2 — Editorial river layout ── */
main.summer-content {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    background: var(--rsc-white);
}

.rsc-magazine {
    max-width: 1120px;
    margin: 0 auto;
    padding: 50px 24px 80px;
    z-index: 99999;
    position: relative;
}

.rsc-magazine-full {
    max-width: 1599px;
    margin: 0 auto;
    padding: 50px 24px 80px;
    z-index: auto;
    position: relative;
}

/* Shared Tags */
.rsc-tag {
    font-family: var(--rsc-serif);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rsc-blue);
    background: var(--rsc-blue-pale);
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: background var(--rsc-ease), color var(--rsc-ease);
    display: inline-block;
}
.rsc-tag:hover { background: var(--rsc-blue); color: var(--rsc-white); }
.rsc-tag--gold { color: var(--rsc-gold-dark); background: var(--rsc-gold-pale); }
.rsc-tag--gold:hover { background: var(--rsc-gold); color: var(--rsc-white); }

/* Section headers */
.rsc-section-head { display: flex; align-items: center; gap: 20px; padding: 200px 0 30px; margin: 0 auto; }
.rsc-section-head h2 { font-family: var(--rsc-serif); font-size: 1.75rem; font-weight: 700; color: var(--rsc-text-dark); margin: 0; white-space: nowrap; letter-spacing: -0.02em; }
.rsc-divider { flex: 1; height: 1px; background: linear-gradient(to right, var(--rsc-border), transparent); }
.rsc-divider--gold { background: linear-gradient(to right, var(--rsc-gold-pale), transparent); }

/* Modern News Grid */
.rsc-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; margin-bottom: 20px; }
.rsc-news-card { display: flex; flex-direction: column; background: var(--rsc-white); border-radius: var(--rsc-radius); padding: 24px; box-shadow: var(--rsc-shadow-sm); border: 1px solid var(--rsc-border); text-decoration: none; transition: transform var(--rsc-ease), box-shadow var(--rsc-ease), border-color var(--rsc-ease); }
.rsc-news-card:hover { transform: translateY(-5px); box-shadow: var(--rsc-shadow-md); border-color: var(--rsc-blue-pale); }
.rsc-news-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.rsc-news-date { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--rsc-blue); color: var(--rsc-white); border-radius: 12px; width: 60px; height: 60px; flex-shrink: 0; }
.rsc-news-day { font-size: 1.4rem; font-weight: 700; line-height: 1; font-family: var(--rsc-serif); }
.rsc-news-my { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; margin-top: 2px; font-family: var(--rsc-serif); letter-spacing: 0.05em; }
.rsc-news-title { font-family: var(--rsc-serif); font-size: 1.15rem; font-weight: 700; color: var(--rsc-text-dark); line-height: 1.4; margin: 0 0 12px 0; transition: color var(--rsc-ease); }
.rsc-news-card:hover .rsc-news-title { color: var(--rsc-blue); }
.rsc-news-excerpt { font-family: var(--rsc-serif); font-size: 0.92rem; color: var(--rsc-muted); line-height: 1.6; margin: 0 0 20px 0; flex-grow: 1; }
.rsc-news-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* Magazine Hero */
.rsc-hero { display: block; position: relative; border-radius: var(--rsc-radius); overflow: hidden; text-decoration: none; box-shadow: var(--rsc-shadow-md); margin-bottom: 24px; transition: box-shadow var(--rsc-ease); }
.rsc-hero:hover { box-shadow: var(--rsc-shadow-lg); }
.rsc-hero-media { position: relative; width: 100%; height: 500px; background: var(--rsc-text-dark); }
.rsc-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.rsc-hero:hover .rsc-hero-media img { transform: scale(1.05); }
.rsc-hero-media--empty { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--rsc-blue) 0%, var(--rsc-blue-dark) 100%); }
.rsc-hero-logo { width: 160px !important; height: auto !important; object-fit: contain !important; opacity: 0.8; }
.rsc-hero-gradient { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 100%); pointer-events: none; }
.rsc-hero-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px; color: #fff; z-index: 2; }
.rsc-eyebrow { display: inline-block; font-family: var(--rsc-serif); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rsc-white); background: var(--rsc-blue); padding: 6px 14px; border-radius: 20px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.rsc-hero-title { font-family: var(--rsc-serif); font-size: 2.2rem; font-weight: 700; line-height: 1.3; margin: 0 0 12px; max-width: 800px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.rsc-hero-date { font-family: var(--rsc-serif); font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); font-weight: 500; display: flex; align-items: center; gap: 8px; }

/* Sub-grid: 3 รอง */
.rsc-subgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 20px; }
.rsc-subcard { display: flex; flex-direction: column; text-decoration: none; background: var(--rsc-white); border-radius: var(--rsc-radius); overflow: hidden; box-shadow: var(--rsc-shadow-sm); border: 1px solid var(--rsc-border); transition: transform var(--rsc-ease), box-shadow var(--rsc-ease); }
.rsc-subcard:hover { transform: translateY(-5px); box-shadow: var(--rsc-shadow-md); }
.rsc-subcard-media { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--rsc-blue); position: relative; }
.rsc-subcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.rsc-subcard:hover .rsc-subcard-media img { transform: scale(1.08); }
.rsc-subcard-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.rsc-subcard-date { display: block; font-family: var(--rsc-serif); font-size: 0.8rem; font-weight: 600; color: var(--rsc-blue-mid); margin: 7px; }
.rsc-subcard-title { font-family: var(--rsc-serif); font-size: 1.05rem; font-weight: 700; color: var(--rsc-text-dark); line-height: 1.45; margin: 10px; transition: color var(--rsc-ease); }
.rsc-subcard:hover .rsc-subcard-title { color: var(--rsc-blue); }

/* River rows */
.rsc-river { display: flex; flex-direction: column; gap: 32px; }
.rsc-river-row { display: flex; gap: 32px; align-items: center; padding: 24px; background: #fffffff7; border-radius: var(--rsc-radius); box-shadow: var(--rsc-shadow-sm); border: 1px solid var(--rsc-border); transition: transform var(--rsc-ease), box-shadow var(--rsc-ease); text-decoration: none; }
.rsc-river-row:hover { transform: translateY(-4px); box-shadow: var(--rsc-shadow-md); }
.rsc-river-row--reverse { flex-direction: row-reverse; }
.post-template .summer-post-content { padding-bottom: 50px !important; }
.rsc-river-media { flex: 0 0 170px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; display: block; background: var(--rsc-bg); position: relative; }
.rsc-river-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.rsc-river-row:hover .rsc-river-media img { transform: scale(1.06); }
.rsc-river-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.rsc-river-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.rsc-river-meta time { font-family: var(--rsc-serif); font-size: 0.85rem; font-weight: 600; color: var(--rsc-muted); }
.rsc-river-title { font-family: var(--rsc-serif); font-size: 1.35rem; font-weight: 700; color: var(--rsc-text-dark); line-height: 1.4; margin: 0 0 12px; transition: color var(--rsc-ease); }
.rsc-river-row:hover .rsc-river-title { color: var(--rsc-blue); }
.rsc-river--about .rsc-river-row:hover .rsc-river-title { color: var(--rsc-gold-dark); }
.rsc-river-excerpt { font-family: var(--rsc-serif); color: var(--rsc-muted); font-size: 0.95rem; line-height: 1.7; margin: 0; }
.rsc-empty { color: var(--rsc-muted); font-family: var(--rsc-serif); padding: 30px 0; text-align: center; font-size: 1.1rem; background: var(--rsc-white); border-radius: var(--rsc-radius); border: 1px dashed var(--rsc-border); }

/* Thumbnail Specifics */
.rsc-thumb-wrap { flex-shrink: 0; margin-top: -22px; margin-left: -24px; margin-right: -24px; margin-bottom: 20px; width: calc(100% + 48px); height: 180px; border-radius: 12px 12px 0 0; overflow: hidden; }
.rsc-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.rsc-thumb-wrap:hover .rsc-thumb { transform: scale(1.05); }
.rsc-thumb-empty { background: linear-gradient(135deg, var(--rsc-blue-pale) 0%, #e2e8f0 100%); display: flex; align-items: center; justify-content: center; }
.rsc-thumb-icon { font-size: 3rem; color: var(--rsc-blue-mid); opacity: 0.5; user-select: none; }


/* ── 9. Media Queries (Magazine & Sliders) ── */
@media (min-width: 1024px) {
  .rsc-hero-slider { max-width: 100% !important; margin-left: auto; margin-right: auto; }
}
@media (max-width: 1024px) {
    .rsc-river-media { flex-basis: 280px; }
}
@media (max-width: 1023px) {
  .rsc-hero-slider { width: 100% !important; max-width: 100% !important; }
}
@media (max-width: 900px) {
    .rsc-hero-media { height: 400px; }
    .rsc-hero-title { font-size: 1.8rem; }
    .rsc-subgrid { grid-template-columns: repeat(2, 1fr); }
    .rsc-subgrid .rsc-subcard:last-child { display: none; } /* ซ่อนใบที่ 3 */
    .rsc-river-row { padding: 20px; gap: 24px; }
}
@media (max-width: 768px) {
    .rsc-news-grid { grid-template-columns: repeat(2, 1fr); }
    .rsc-river-row, .rsc-river-row--reverse { flex-direction: column; align-items: stretch; }
    .rsc-river-media { flex-basis: auto; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 16px; }
    .hide-on-mobile, #hide-on-mobile { display: none !important; }
}
@media (max-width: 640px) {
    .rsc-hero-slider { border-radius: 0px !important; width: 100% !important; }
    .rsc-magazine { padding: 30px 16px 60px; }
    .rsc-news-grid { grid-template-columns: 1fr; }
    .rsc-hero-media { height: 320px; }
    .rsc-hero-content { padding: 24px; }
    .rsc-hero-title { font-size: 1.5rem; }
    .rsc-subgrid { grid-template-columns: 1fr; }
    .rsc-subgrid .rsc-subcard:last-child { display: flex; } /* แสดงกลับมาในมือถือ */
    .rsc-section-head { margin: 40px 0 20px; }
    .rsc-section-head h2 { font-size: 1.4rem; }
}


/* ── 10. Search Page Fix (Simplesearch/TNTSearch) ── */
.simplesearch { max-width: 1120px; margin: 0 auto; padding: 50px 24px; min-height: 60vh; }
.search-header { font-family: var(--rsc-serif); color: var(--rsc-text-dark); margin-bottom: 30px; text-align: center; }
.search-wrapper { display: flex; justify-content: center; margin-bottom: 40px; width: 100%; }
.search-input { padding: 12px 20px; border-radius: var(--rsc-radius); border: 1px solid var(--rsc-border); width: 100%; max-width: 500px; font-family: 'Noto Sans Thai', sans-serif; }
.search-submit { background: var(--rsc-blue); color: white; padding: 10px 20px; border-radius: var(--rsc-radius); margin-left: 10px; cursor: pointer; transition: background var(--rsc-ease); }
.search-submit:hover { background: var(--rsc-blue-dark); }
.search-row { display: flex; gap: 24px; background: var(--rsc-white); padding: 24px; border-radius: var(--rsc-radius); margin-bottom: 24px; border: 1px solid var(--rsc-border); box-shadow: var(--rsc-shadow-sm); transition: transform var(--rsc-ease); }
.search-row:hover { transform: translateY(-4px); box-shadow: var(--rsc-shadow-md); }
.search-image { flex: 0 0 200px; aspect-ratio: 16/10; overflow: hidden; border-radius: 12px; }
.search-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-item { flex: 1; }
.search-title h3 { font-family: 'Noto Sans Thai', sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--rsc-text-dark); margin: 0 0 10px; }
.search-details { color: var(--rsc-muted); font-size: 0.9rem; margin-bottom: 10px; font-family: 'Noto Sans Thai', sans-serif; }
.search-item p { font-family: 'Noto Sans Thai', sans-serif; color: var(--rsc-text); line-height: 1.6; margin-bottom: 10px; }
.search-item hr { display: none; }
@media (max-width: 768px) {
    .search-row { flex-direction: column; }
    .search-image { flex: 0 0 auto; width: 100%; aspect-ratio: 16/9; }
}

/* ── 11. บทความยอดนิยม (Popular List) ── */
.rsc-popular-list { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 4rem; }
.popular-list-item { display: flex; gap: 1.5rem; align-items: center; padding-bottom: 1.5rem; border-bottom: 1px solid #eaeaea; transition: all 0.3s ease; }
.popular-list-item:hover { background-color: #fcfcfc; border-radius: 8px; }
.popular-item-thumb { flex: 0 0 150px; overflow: hidden; border-radius: 8px; }
.popular-item-thumb img { width: 100%; height: 100px; object-fit: cover; display: block; transition: transform 0.3s ease; }
.popular-list-item:hover .popular-item-thumb img { transform: scale(1.05); }
.popular-item-content { flex: 1 1 auto; min-width: 0; }
.popular-item-meta { font-size: 0.85rem; color: #777; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.popular-item-meta span { display: flex; align-items: center; gap: 0.4rem; }
.popular-item-title { margin: 0 0 0.5rem 0; font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
.popular-item-title a { color: #222; text-decoration: none; transition: color 0.2s ease; }
.popular-item-title a:hover { color: #0056b3; }
.popular-item-desc { font-size: 0.95rem; color: #555; margin: 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popular-item-action { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
.popular-item-views { background: #f1f3f5; color: #495057; padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; transition: background 0.2s ease; }
.popular-item-views:hover { background: #e9ecef; text-decoration: none; }
.popular-item-readmore { font-size: 0.85rem; color: #fff; background: #0d6efd; padding: 0.4rem 1rem; border-radius: 4px; text-decoration: none; transition: background 0.2s; }
.popular-item-readmore:hover { background: #0b5ed7; color: #fff; }
@media (max-width: 768px) {
    .popular-list-item { flex-direction: column; align-items: stretch; gap: 1rem; }
    .popular-item-thumb { flex: auto; }
    .popular-item-thumb img { height: 180px; }
    .popular-item-action { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ── 12. Premium Product Grid ── */
.rsc-products-section { padding: 4rem 0; background-color: #ffffff; }
.rsc-products-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.rsc-products-header { text-align: center; margin-bottom: 3.5rem; }
.rsc-products-header h2 { font-size: 2rem; font-weight: 700; color: #1a1a1a; margin-bottom: 0.5rem; }
.rsc-products-header p { color: #666; font-size: 1rem; max-width: 600px; margin: 0 auto; }
.rsc-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2.5rem; margin-top: 3rem; }
.rsc-product-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08); transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); border: 1px solid #f8f9fa; display: flex; flex-direction: column; text-decoration: none; position: relative; }
.rsc-product-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15); border-color: transparent; }
.rsc-product-image-wrapper { position: relative; padding-top: 66.66%; overflow: hidden; background-color: #f0f4f8; }
.rsc-product-image-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.rsc-product-card:hover .rsc-product-image-wrapper img { transform: scale(1.08); }
.rsc-product-badge { position: absolute; top: 1.2rem; right: 1.2rem; background: rgba(255, 255, 255, 0.95); color: #0d6efd; padding: 0.4rem 1rem; border-radius: 30px; font-size: 0.75rem; font-weight: 700; backdrop-filter: blur(4px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 2; }
.rsc-product-content { padding: 1.8rem; display: flex; flex-direction: column; flex-grow: 1; }
.rsc-product-date { font-size: 0.8rem; color: #888; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.4rem; }
.rsc-product-title { font-size: 1.25rem; font-weight: 700; color: #1a1a1a; margin-bottom: 1rem; line-height: 1.4; transition: color 0.3s ease; }
.rsc-product-card:hover .rsc-product-title { color: #0d6efd; }
.rsc-product-desc { font-size: 0.95rem; color: #666; line-height: 1.6; margin-bottom: 1.5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rsc-product-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 1.2rem; border-top: 1px solid #f0f0f0; }
.rsc-product-price { font-weight: 700; color: #0d6efd; font-size: 1.15rem; }
.rsc-product-action { color: #1a1a1a; font-size: 0.9rem; font-weight: 600; transition: all 0.3s ease; display: flex; align-items: center; gap: 0.5rem; }
.rsc-product-card:hover .rsc-product-action { color: #0d6efd; gap: 0.8rem; }


/* ── 13. RSC News Swiper Strip ── */
.rsc-hnews-track { display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 4px 2px 14px; cursor: grab; user-select: none; -webkit-overflow-scrolling: touch; }
.rsc-hnews-track::-webkit-scrollbar { display: none; }
.rsc-hnews-card { flex: 0 0 340px; min-width: 260px; display: flex; align-items: flex-start; gap: 14px; padding: 18px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; text-decoration: none; color: inherit; box-sizing: border-box; transition: box-shadow 0.25s ease, transform 0.25s ease; pointer-events: auto; }
.rsc-hnews-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.09); transform: translateY(-3px); }
.rsc-hnews-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rsc-hnews-meta { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: #6b7280; overflow: hidden; }
.rsc-hnews-avatar { font-size: 1rem; flex-shrink: 0; line-height: 1; }
.rsc-hnews-source { font-weight: 700; color: #374151; white-space: nowrap; flex-shrink: 0; }
.rsc-hnews-dot    { color: #d1d5db; flex-shrink: 0; }
.rsc-hnews-cat    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsc-hnews-title { font-family: var(--rsc-serif); font-size: 0.97rem; font-weight: 700; color: var(--rsc-text-dark); line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color var(--rsc-ease); }
.rsc-hnews-card:hover .rsc-hnews-title { color: var(--rsc-blue); }
.rsc-hnews-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.rsc-hnews-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.rsc-hnews-date { font-size: 0.73rem; color: var(--rsc-white); background: var(--rsc-blue); width: 68px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.rsc-hnews-thumb { flex: 0 0 80px; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; background: var(--rsc-blue-pale); flex-shrink: 0; }
.rsc-hnews-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.rsc-hnews-thumb--empty { display: flex; align-items: center; justify-content: center; font-size: 2rem; opacity: 0.35; }
@media (max-width: 1024px) { .rsc-hnews-card { flex: 0 0 300px; } }
@media (max-width: 640px)  { .rsc-hnews-card { flex: 0 0 min(82vw, 300px); } }

/* ── 14. Pagination ── */
nav.pagination { display: flex !important; justify-content: center; align-items: center; gap: 16px; padding: 20px 0 40px; font-family: var(--rsc-serif); }
nav.pagination a, nav.pagination a.older-posts, nav.pagination a.newer-posts { background: var(--rsc-blue) !important; color: #ffffff !important; padding: 10px 24px !important; border-radius: 8px !important; text-decoration: none !important; font-size: 1rem; border: none !important; transition: background var(--rsc-ease), transform var(--rsc-ease); box-shadow: var(--rsc-shadow-sm); }
nav.pagination a:hover { background: var(--rsc-blue-dark) !important; transform: translateY(-2px); box-shadow: var(--rsc-shadow-md); }
.page-number { color: var(--rsc-muted); font-size: 0.9rem; font-weight: 500; }

/* ── 15. Footer ── */
.footer-logo { width: 100px; }
.footer-column, .footer-brand { margin: auto; }
.footer-nav { max-width: 1200px; margin: 0 auto 3rem; padding: 0 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 40px; }
.footer-column h4 { font-size: 16px; margin-bottom: 15px; color: #fff; font-weight: 600; }
.footer-column ul { margin: 0; padding: 0; list-style: none; }
.footer-column li { margin-bottom: 10px; }
.footer-column a { color: #cfcfcf; text-decoration: none; transition: .2s; }
.footer-column a:hover { color: #fff; }
.footer-divider { border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 30px auto; max-width: 1200px; }

footer.summer-site-footer { background: linear-gradient(45deg, #151431, #001853) !important; color: rgba(255, 255, 255, 0.7) !important; padding: 40px 24px !important; font-family: var(--rsc-serif); text-align: center; margin-top: 50px; }
footer.summer-site-footer .copyright a { color: rgba(255, 255, 255, 0.9) !important; transition: color var(--rsc-ease); font-weight: 500; }
footer.summer-site-footer .copyright a:hover { color: var(--rsc-blue-mid) !important; }
footer.summer-site-footer .social-icons .fa-circle { color: rgba(255, 255, 255, 0.1) !important; transition: color var(--rsc-ease); }
footer.summer-site-footer .social-icons a { color: rgba(255, 255, 255, 0.8) !important; transition: color var(--rsc-ease), transform var(--rsc-ease); display: inline-block; }
footer.summer-site-footer .social-icons a:hover { color: #ffffff !important; transform: translateY(-2px); }
footer.summer-site-footer .social-icons a:hover .fa-circle { color: var(--rsc-blue) !important; }

@media(max-width: 768px) {
    .footer-nav { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media(max-width: 500px) {
    .footer-nav { grid-template-columns: 1fr; }
}


