/* ==========================================================================
   srkhospitalfoundation.or.th — หน้าบ้านใหม่ (1 พ.ย. 2569)
   โจทย์ : คล้ายโครงเดิม แต่ทันสมัยขึ้น เป็นทางการ (ชุดเดียวกับเว็บไซต์ปิ่นเกล้า เปลี่ยนสี)
   - โหลดต่อจาก css/bootstrap.min.css + css/style.css (เทมเพลตเดิม Bootstrap 5) เพื่อทับของเดิม · ไม่แก้ไฟล์เทมเพลต
   - ฟอนต์ : Sarabun (เนื้อหา · ฟอนต์สารบรรณราชการ) + Noto Serif Thai (หัวเรื่อง) แทน Thasadith / Playfair
   - สี : น้ำเงินราชินีของเว็บเดิม (#271F65) + ทอง (#FB9F38 → เข้มขึ้นให้ตัวหนังสืออ่านชัด) + พื้นขาวนวล
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    --sk-blue:    #271F65;
    --sk-blue-2:  #3A2F8C;
    --sk-blue-3:  #1A1447;
    --sk-gold:    #B7701A;   /* ตัวหนังสือ / ปุ่ม */
    --sk-gold-b:  #E0A040;   /* เส้น / ไอคอน */
    --sk-gold-l:  #F4DDB6;
    --sk-gold-50: #FDF6EA;
    --sk-ivory:   #F8F7FB;
    --sk-ink:     #1E2033;
    --sk-ink-2:   #3A3D55;
    --sk-muted:   #626680;
    --sk-line:    #E4E2EE;
    --sk-radius:  14px;
    --sk-radius-s: 8px;
    --sk-sh-1: 0 1px 2px rgba(39,31,101,.06), 0 2px 8px rgba(39,31,101,.05);
    --sk-sh-2: 0 4px 14px rgba(39,31,101,.10), 0 12px 32px rgba(39,31,101,.08);
    --sk-sans:  "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
    --sk-serif: "Noto Serif Thai", "Sarabun", Georgia, serif;
    --primary: #271F65;
}

/* ---------- 2. พื้นฐาน ---------- */
body.sk-site { font-family: var(--sk-sans); font-size: 16.5px; line-height: 1.75; color: var(--sk-ink); -webkit-font-smoothing: antialiased; }
.sk-site h1, .sk-site h2, .sk-site h3, .sk-site h4, .sk-site h5, .sk-site h6,
.sk-site .h1, .sk-site .h2, .sk-site .h3, .sk-site .h4, .sk-site .h5, .sk-site .h6 { font-family: var(--sk-serif); font-weight: 600; line-height: 1.45; color: var(--sk-blue); }
.sk-site .font-hero { font-family: var(--sk-serif) !important; font-style: normal !important; }
.sk-site .font-heading { font-family: var(--sk-sans) !important; font-style: normal !important; }
.sk-site a { color: var(--sk-blue-2); transition: color .2s ease; text-decoration: none; }
.sk-site a:hover { color: var(--sk-gold); }
.sk-site .text-primary { color: var(--sk-blue) !important; }
.sk-site .text-secondary { color: var(--sk-gold-l) !important; }
.sk-site .bg-light-indigo { background: #EFEDF7; }
.sk-site ::selection { background: var(--sk-gold-l); color: var(--sk-blue-3); }
.sk-site .two-line, .sk-site .three-line { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; }
.sk-site .two-line { -webkit-line-clamp: 2; }
.sk-site .three-line { -webkit-line-clamp: 3; }
.sk-site section { padding-top: 5rem !important; padding-bottom: 5rem !important; }

/* ปุ่ม */
.sk-site .btn { font-family: var(--sk-sans); font-weight: 600; }
.sk-site .btn-primary { background: var(--sk-blue); border-color: var(--sk-blue); color: #fff; box-shadow: 0 6px 16px rgba(39,31,101,.22); }
.sk-site .btn-primary:hover, .sk-site .btn-primary:focus { background: var(--sk-blue-2); border-color: var(--sk-blue-2); color: #fff; }
.sk-btn-donate { background: var(--sk-gold); border: 1px solid var(--sk-gold); color: #fff !important; border-radius: 999px; padding: 8px 20px; box-shadow: 0 6px 16px rgba(183,112,26,.25); white-space: nowrap; }
.sk-btn-donate:hover { background: #985C12; border-color: #985C12; color: #fff !important; }
.sk-btn-donate i { margin-right: 6px; }

/* หัวข้อส่วน : เส้นทองแทนจุดกลม */
.sk-site .section-title { margin-bottom: 2.6rem; padding-bottom: 1.4rem; }
.sk-site .section-title::before { width: 64px; height: 3px; background: var(--sk-gold-b); border-radius: 2px; }
.sk-site .section-title.text-center::before { left: calc(50% - 32px); }
.sk-site .section-title::after { display: none; }
.sk-site .section-title > p { font-family: var(--sk-sans) !important; font-style: normal !important; font-size: 14px !important; font-weight: 600 !important; letter-spacing: .08em; text-transform: uppercase; color: var(--sk-gold) !important; margin-bottom: .4rem; }
.sk-site .section-title h2 { font-size: 32px; }
.sk-site .section-title h3 { font-size: 27px; }
/* กล่องหัวข้อเดิมกว้าง 500px → ชื่อมูลนิธิยาวถูกตัดกลางคำ (สิริกิ|ติ์) */
.sk-site .section-title[style*="max-width"] { max-width: 820px !important; }
.sk-site .testimonial .section-title > p { color: var(--sk-gold-l) !important; }
.sk-site .testimonial .section-title::before { background: var(--sk-gold-b); opacity: 1; }

/* ---------- 3. แถบบน + เมนู ---------- */
.sk-header { z-index: 1030; }
.sk-topbar { background: var(--sk-blue-3); color: #CFCBEA; font-size: 14px; }
.sk-topbar .container { min-height: 38px; gap: 22px; }
.sk-topbar-item { color: #CFCBEA !important; white-space: nowrap; }
.sk-topbar-item i { color: var(--sk-gold-b); margin-right: 6px; }
.sk-topbar a.sk-topbar-item:hover { color: #fff !important; }
.sk-site .nav-container { border-bottom: 1px solid var(--sk-line); box-shadow: 0 6px 20px rgba(39,31,101,.06); }
/* โลโก้แสดงตลอด (เดิมซ่อนจนเลื่อนหน้า) */
.sk-site .navbar .navbar-brand,
.sk-site .nav-container.at-scrolled .navbar .navbar-brand { display: flex !important; align-items: center; position: static; width: auto; height: auto; padding: 8px 0; margin-right: 1.5rem; }
.sk-site .navbar .navbar-brand img { height: 58px; width: auto; }
.sk-site .nav-container .navbar .navbar-nav,
.sk-site .nav-container.at-scrolled .navbar .navbar-nav { margin-left: auto !important; margin-right: 0 !important; }
.sk-site .navbar .navbar-nav .nav-link {
    font-family: var(--sk-sans) !important; font-size: 16px; font-weight: 600; text-transform: none;
    color: var(--sk-ink-2); margin-right: 0; padding: 26px 13px; position: relative;
}
.sk-site .navbar .navbar-nav .nav-link::before {
    content: ""; position: absolute; left: 13px; right: 13px; bottom: 18px; height: 2px;
    background: var(--sk-gold-b); transform: scaleX(0); transition: transform .25s ease;
}
.sk-site .navbar .navbar-nav .nav-link:hover, .sk-site .navbar .navbar-nav .nav-link.active { color: var(--sk-blue); }
.sk-site .navbar .navbar-nav .nav-link:hover::before, .sk-site .navbar .navbar-nav .nav-link.active::before { transform: scaleX(1); }
.sk-site .navbar .dropdown-menu { border: 1px solid var(--sk-line) !important; border-top: 3px solid var(--sk-gold-b) !important; border-radius: 0 0 10px 10px !important; padding: 8px 0; box-shadow: var(--sk-sh-2); background: #fff !important; }
.sk-site .navbar .dropdown-item { font-size: 15px; padding: 8px 20px; color: var(--sk-ink-2); }
.sk-site .navbar .dropdown-item:hover { background: var(--sk-gold-50); color: var(--sk-blue); }
@media (min-width: 992px) and (max-width: 1199px) {
    .sk-site .navbar .navbar-nav .nav-link { padding: 26px 8px; font-size: 15px; }
    .sk-site .navbar .navbar-nav .nav-link::before { left: 8px; right: 8px; }
    .sk-site .navbar .navbar-brand img { height: 50px; }
}
@media (max-width: 991px) {
    .sk-site .navbar .navbar-nav .nav-link { padding: 10px 4px; }
    .sk-site .navbar .navbar-nav .nav-link::before { display: none; }
    .sk-site .navbar .navbar-nav .nav-link.active { color: var(--sk-gold); }
    .sk-site .navbar-collapse { border-top: 1px solid var(--sk-line); padding: 6px 0 14px; }
    .sk-site .sk-btn-donate { display: block; text-align: center; margin-top: 8px; }
    .sk-site .navbar .navbar-brand img { height: 46px; }
}

/* ---------- 4. หน้าแรก ---------- */
/* แบนเนอร์ : ภาพโรงพยาบาล + ฟิล์มน้ำเงินของเดิม (ชื่อมูลนิธิอยู่บนภาพตามโครงเดิม) */
.sk-site .carousel-caption { background: linear-gradient(180deg, rgba(26,20,71,.72) 0%, rgba(39,31,101,.62) 60%, rgba(26,20,71,.82) 100%); }
.sk-site #header-carousel { position: relative; }
.sk-site #header-carousel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 2; background: linear-gradient(90deg, transparent, var(--sk-gold-b), transparent); }
.sk-site .carousel-caption h1 { font-weight: 700; text-shadow: 0 2px 18px rgba(0,0,0,.3); letter-spacing: 0; }
.sk-site .carousel-caption h2 { font-weight: 500; color: var(--sk-gold-l) !important; font-size: 1.1rem; }
@media (min-width: 1200px) {
    .sk-site .carousel-caption h1 { font-size: 3rem; }
    .sk-site .carousel-caption h2 { font-size: 1.9rem; }
}

/* เกี่ยวกับ */
.sk-site section img.img-fluid { border-radius: var(--sk-radius-s); }

/* โครงการที่เปิดรับบริจาค */
.sk-site .project { background: linear-gradient(180deg, #F3F1FA 0%, #FBFAFD 100%); }
.sk-site .project-item { display: block; border-radius: var(--sk-radius) !important; overflow: hidden; background: #fff; border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-1); transition: transform .25s ease, box-shadow .25s ease; margin: 6px; }
.sk-site .project-item:hover { transform: translateY(-4px); box-shadow: var(--sk-sh-2); }
.sk-site .project-item > img { height: 15.5rem; width: 100%; object-fit: cover; }
.sk-site .project-item > div { margin: -2.2rem 1rem 1rem !important; border-radius: 12px; border-top: 3px solid var(--sk-gold-b); padding: 1.2rem !important; box-shadow: var(--sk-sh-1) !important; }
.sk-site .project-item h5 { font-size: 17px; line-height: 1.55; color: var(--sk-blue) !important; }
.sk-site .project-item .text-body { font-size: 15px; color: var(--sk-muted) !important; }
.sk-site .owl-nav .owl-prev, .sk-site .owl-nav .owl-next { border-radius: 50% !important; }

/* ช่องทางการบริจาค */
.sk-site .img-bank { border-radius: 12px; background: #fff; padding: 3px; box-shadow: var(--sk-sh-1); }

/* ข่าว (แถบน้ำเงิน) */
.sk-site .testimonial { background: linear-gradient(rgba(26,20,71,.88), rgba(39,31,101,.86)), url(../img/cover.jpg) center center / cover no-repeat; }
.sk-site .testimonial-card > div { border-radius: var(--sk-radius); overflow: hidden; background: #fff !important; box-shadow: 0 16px 36px rgba(0,0,0,.25) !important; }
.sk-site .testimonial-card img { height: 240px; }
.sk-site .testimonial-card p { color: var(--sk-ink); font-weight: 500; }
.sk-site .testimonial-card .text-primary { color: var(--sk-gold) !important; font-weight: 600; }
.sk-site .testimonial-carousel .owl-dot.active { background: var(--sk-gold-b); }

/* ติดต่อ */
.sk-site .contact .btn-square { width: 88px; height: 88px; border: 14px solid #EFEDF7; background: var(--sk-blue); border-radius: 50%; }
.sk-site .contact p a { font-weight: 600; color: var(--sk-blue); }

/* ---------- 5. หน้าภายใน + เนื้อหาจาก HTML editor ---------- */
.sk-site .fr-view, .sk-site .panel-content-htmleditor { font-family: var(--sk-sans) !important; font-size: 16.5px; line-height: 1.85; color: var(--sk-ink); }
.sk-site .fr-view h1, .sk-site .fr-view h2, .sk-site .fr-view h3, .sk-site .fr-view h4 { font-family: var(--sk-serif) !important; color: var(--sk-blue) !important; }
.sk-site .fr-view img { border-radius: var(--sk-radius-s); }
/* เนื้อหาจาก editor บนพื้นกรมท่า (วัตถุประสงค์ของมูลนิธิ หน้าเกี่ยวกับมูลนิธิ) — กฎ .fr-view ข้างบนทำตัวอักษรเป็นสีเข้ม */
.sk-site .testimonial .fr-view, .sk-site .testimonial .fr-view * { color: #F1F2FA !important; background: transparent !important; }
.sk-site .testimonial .fr-view li::marker { color: var(--sk-gold-l); }
.sk-site .Kanit { font-family: var(--sk-sans) !important; }
.sk-site .table { color: var(--sk-ink); }
.sk-site .table th, .sk-site .table thead th { background: var(--sk-blue); color: #fff; border-color: var(--sk-blue); font-weight: 600; }
.sk-site .table td { border-color: var(--sk-line); vertical-align: middle; }
.sk-site .form-control, .sk-site .form-select { border-radius: 10px; border: 1px solid #D5D2E3; min-height: 46px; font-size: 16px; }
.sk-site .form-control:focus, .sk-site .form-select:focus { border-color: var(--sk-blue-2); box-shadow: 0 0 0 3px rgba(58,47,140,.15); }
/* รายการข่าว / แถบข้าง (newsLoadData · newsRightSide) */
.sk-site .blog-entry { background: #fff; border-radius: var(--sk-radius); overflow: hidden; border: 1px solid var(--sk-line); box-shadow: var(--sk-sh-1); transition: transform .25s ease, box-shadow .25s ease; margin-bottom: 20px; }
.sk-site .blog-entry:hover { transform: translateY(-3px); box-shadow: var(--sk-sh-2); }
.sk-site .blog-entry img { width: 100%; height: 210px; object-fit: cover; }
.sk-site .blog-entry .text { padding: 18px 20px 20px; background: #fff; }
.sk-site .panel-cat-list a, .sk-site .panel-month-list a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--sk-ink-2); }
.sk-site .panel-cat-list a:hover, .sk-site .panel-month-list a:hover,
.sk-site .panel-cat-list a.active, .sk-site .panel-month-list a.active { background: var(--sk-gold-50); color: var(--sk-blue); font-weight: 600; }
.sk-site .pagination { gap: 6px; flex-wrap: wrap; }
.sk-site .page-link { border-radius: 8px !important; border: 1px solid var(--sk-line); color: var(--sk-blue); font-weight: 600; min-width: 40px; text-align: center; }
.sk-site .page-item.active .page-link { background: var(--sk-blue); border-color: var(--sk-blue); color: #fff; }

/* ---------- 6. ท้ายเว็บ ---------- */
.sk-site .footer { background: linear-gradient(160deg, var(--sk-blue-2) 0%, var(--sk-blue) 55%, var(--sk-blue-3) 100%) !important; color: #CFCBEA; position: relative; }
.sk-site .footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, transparent, var(--sk-gold-b), transparent); }
.sk-site .footer a { color: #DDD9F2; }
.sk-site .footer a:hover { color: #fff; }
.sk-site .footer h4 { color: #fff !important; font-size: 19px; }
.sk-site .footer .footer-icon { background: #fff; padding: 3px; }
.sk-site .footer i { color: var(--sk-gold-b) !important; width: 18px; text-align: center; }
.sk-site .footer .sk-footer-news b { color: var(--sk-gold-l) !important; font-size: 14px; }
.sk-site .footer .sk-footer-news p { margin-bottom: 1rem; }
.sk-site .copyright { background: var(--sk-blue-3); color: #A9A4CF; font-size: 14px; }
.sk-site .copyright a { color: #DDD9F2; }
.sk-site .copyright a:hover { color: #fff; }
.sk-site .sk-policy a { margin-left: 14px; }
.sk-site .sk-policy a:first-child { margin-left: 0; }
.sk-site .back-to-top { background: var(--sk-gold) !important; border-color: var(--sk-gold) !important; }

@media (max-width: 767px) {
    .sk-site section { padding-top: 3.2rem !important; padding-bottom: 3.2rem !important; }
    .sk-site .section-title h2, .sk-site .section-title h3 { font-size: 25px; }
    .sk-topbar { font-size: 13px; }
    .sk-site .sk-policy a { margin: 0 7px; }
}
@media (prefers-reduced-motion: reduce) {
    .sk-site .project-item, .sk-site .blog-entry { transition: none !important; }
}

/* ---------- เอกสารนโยบาย (นโยบายความเป็นส่วนตัว / คุกกี้ / ข้อกำหนด · เนื้อหาจาก HTML editor) · 1 พ.ย. 2569 ---------- */
.sk-site { --legal-accent: var(--sk-blue); }
.sk-site .legal-doc { max-width: 900px; margin: 0 auto; font-size: 16px; line-height: 1.85; color: #222831; text-align: left; }
.sk-site .legal-doc .legal-meta { display: inline-block; font-size: 14px; color: #5b6170; background: #f3f4f7; border-radius: 999px; padding: 4px 14px; margin-bottom: 18px; }
.sk-site .legal-doc h2 { font-size: 21px; font-weight: 700; margin: 34px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--legal-accent, #2f3a56); color: inherit; line-height: 1.45; }
.sk-site .legal-doc h3 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; color: inherit; }
.sk-site .legal-doc p { margin: 0 0 12px; }
.sk-site .legal-doc ul { margin: 0 0 14px; padding-left: 1.4em; }
.sk-site .legal-doc li { margin-bottom: 6px; }
.sk-site .legal-doc a { color: var(--legal-accent, #2f3a56); text-decoration: underline; text-underline-offset: 2px; }
.sk-site .legal-doc .legal-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 6px 0 18px; border: 1px solid #e3e5ea; border-radius: 10px; }
.sk-site .legal-doc table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.sk-site .legal-doc th { background: var(--legal-accent, #2f3a56); color: #fff; font-weight: 600; text-align: left; padding: 10px 12px; white-space: nowrap; }
.sk-site .legal-doc td { padding: 10px 12px; border-top: 1px solid #e3e5ea; vertical-align: top; }
.sk-site .legal-doc tbody tr:nth-child(even) td { background: #fafbfc; }
.sk-site .legal-doc .legal-contact { background: #f6f7f9; border-left: 4px solid var(--legal-accent, #2f3a56); border-radius: 0 10px 10px 0; padding: 14px 18px; }
.sk-site .legal-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 26px; }
.sk-site .legal-nav a { padding: 6px 16px; border: 1px solid #d8dbe2; border-radius: 999px; font-size: 15px; color: #3a4252; text-decoration: none; }
.sk-site .legal-nav a.active, .sk-site .legal-nav a:hover { background: var(--legal-accent, #2f3a56); border-color: var(--legal-accent, #2f3a56); color: #fff; }
@media (max-width: 575px) { .sk-site .legal-doc { font-size: 15.5px; } .legal-doc h2 { font-size: 19px; } }
