/* ============================================================ */
/*  โรงเรียนสอนหุ่นยนต์ - Main Stylesheet                        */
/*  Path: assets/css/style.css                                   */
/*  หมายเหตุ: รูปทั้งหมดอ้างอิงจาก /uploads/ ผ่าน ../uploads/    */
/* ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; overflow-x: hidden; }
body {
    font-family: 'Noto Sans Thai', sans-serif;
    background-color: #f0f7ff;
    color: #1e2a3a;
    line-height: 1.6;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ============================================================ */
/* HERO SLIDER                                                   */
/*  - Desktop: object-fit: cover (เต็มหน้าจอ)                    */
/*  - < desktop: object-fit: contain (เต็มภาพ)                   */
/* ============================================================ */
.hero-slider {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: #1a3a6b;
}
.slides-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.slide-item {
    min-width: 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}
.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}
.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 5;
}
.dot-slide {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.dot-slide.active {
    background: white;
    transform: scale(1.25);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}
.dot-slide:hover { background: rgba(255, 255, 255, 0.8); }

/* ---- NAVBAR ---- */
.navbar-wrapper {
    background: white;
    border-top: 2px solid #c5d9f0;
    padding: 0 20px;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    width: 100%;
}
.navbar-wrapper.sticky {
    position: fixed;
    top: 0; left: 0; right: 0;
    border-top: none;
    border-bottom: 2px solid #c5d9f0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    animation: slideDownSticky 0.4s ease forwards;
    z-index: 999;
}
@keyframes slideDownSticky {
    0% { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
body.has-sticky-nav { padding-top: 80px; }

.navbar {
    max-width: 1400px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; flex-wrap: wrap;
}
.logo {
    font-size: 1.8rem; font-weight: 600; color: #0a2647;
    display: flex; align-items: center; gap: 8px;
}
.logo i { color: #1a73e8; }

.nav-links {
    display: flex; list-style: none; gap: 28px;
    font-weight: 500; align-items: center;
}
.nav-links a {
    text-decoration: none; color: #1a3a6b; transition: color 0.2s;
    font-size: 1rem; display: inline-flex; align-items: center; gap: 6px;
}
.nav-links a i { color: #1a73e8; font-size: 0.9rem; }
.nav-links a:hover { color: #1a73e8; }

/* ---- DROPDOWN ---- */
.dropdown { position: relative; }
.dropdown > a { cursor: pointer; }
.dropdown > a i.fa-chevron-down {
    font-size: 0.7rem; color: #7a9bcb; transition: transform 0.3s;
}
.dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: white; min-width: 200px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-radius: 5px; padding: 8px 0;
    list-style: none; border: 1px solid #e0ebf5; z-index: 20;
}
.dropdown-menu li a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; color: #1a3a6b; text-decoration: none;
    font-size: 0.95rem; transition: background 0.2s;
}
.dropdown-menu li a:hover { background: #f0f7ff; color: #1a73e8; }
.dropdown-menu li a i { color: #1a73e8; width: 18px; text-align: center; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown.open > a i.fa-chevron-down { transform: rotate(180deg); }

/* ---- Toggle button (mobile/tablet) ---- */
.menu-toggle {
    display: none; flex-direction: column; gap: 5px;
    cursor: pointer; padding: 6px 4px;
    background: transparent; border: none;
}
.menu-toggle span {
    display: block; width: 28px; height: 3px;
    background: #1a3a6b; border-radius: 4px; transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ---- SECTION HEADER ---- */
.section-header-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; flex-wrap: wrap; gap: 15px;
}
.section-header-row h2 { font-size: 2rem; color: #0a2647; font-weight: 700; }
.section-header-row h2 span { color: #1a73e8; }
.section-header-row .view-all {
    color: #1a73e8; text-decoration: none; font-weight: 600;
    font-size: 1.1rem; display: inline-flex; align-items: center;
    gap: 8px; transition: color 0.3s;
}
.section-header-row .view-all:hover { color: #0d5bbd; }

/* ---- Tours ---- */
.tours-section { max-width: 1400px; margin: 40px auto; padding: 0 20px; }
.tours-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.tour-card {
    background: white; border-radius: 5px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s; border: 1px solid #e9f0fa;
    display: flex; flex-direction: row; align-items: stretch;
    min-height: 180px; position: relative;
}
.tour-card:hover { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); }
.tour-card .card-img { width: 40%; flex-shrink: 0; overflow: hidden; position: relative; }
.tour-card .card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tour-card .badge {
    position: absolute; top: 12px; left: 12px; padding: 4px 12px;
    border-radius: 20px; font-size: 0.7rem; font-weight: 600;
    color: #ffffff; letter-spacing: 0.3px; z-index: 3;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: inline-flex; align-items: center; gap: 5px; text-transform: uppercase;
}
.badge i { font-size: 0.65rem; }
.badge-pr { background: #e67e22; }
.badge-job { background: #27ae60; }
.badge-procure { background: #2980b9; }
.badge-event { background: #8e44ad; }
.tour-card .card-body {
    padding: 18px 20px; flex: 1; display: flex;
    flex-direction: column; justify-content: center;
}
.tour-card .card-body h3 {
    font-size: 1.05rem; font-weight: 600; color: #0a2647;
    margin-bottom: 8px; line-height: 1.4;
}
.tour-card .card-body p {
    color: #4a6a8a; font-size: 0.9rem; margin-bottom: 12px;
    line-height: 1.5; flex: 1;
}
.tour-card .card-body .read-more {
    color: #1a73e8; text-decoration: none; font-weight: 600;
    font-size: 0.9rem; display: inline-flex; align-items: center;
    gap: 6px; transition: color 0.3s; align-self: flex-start;
}
.tour-card .card-body .read-more:hover { color: #0d5bbd; }
.tour-card .card-body .read-more i { font-size: 0.75rem; }

/* ============================================================ */
/*  คนเก่งของเรา (Destinations)                                  */
/*  โครงสร้าง: รูปบน + ชื่อ/รายละเอียดล่าง                        */
/*  คลิกรูป → เปิด Modal                                          */
/* ============================================================ */

.destinations-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.destinations-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    grid-auto-rows: 1fr;
}

/* --- การ์ดใบใหญ่ (คนแรก) --- */
.dest-main {
    grid-row: 1 / 3;
    background: #ffffff;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #e9f0fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.dest-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(10, 38, 71, 0.12);
}

/* --- การ์ดใบเล็ก --- */
.dest-small {
    background: #ffffff;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #e9f0fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.dest-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(10, 38, 71, 0.12);
}

/* --- รูป (ปุ่มเปิด modal) --- */
.dest-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: #e9f0fa;
    cursor: zoom-in;
    overflow: hidden;
    position: relative;
    flex: 1;
    min-height: 0;
    font: inherit;
    color: inherit;
    text-align: left;
}

.dest-main .dest-thumb {
    min-height: 260px;
}

.dest-small .dest-thumb {
    min-height: 140px;
}

.dest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dest-thumb:hover img {
    transform: scale(1.06);
}

/* ✅ Icon แว่นขยายตอน hover */
.dest-thumb::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', sans-serif;
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(10, 38, 71, 0.78);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dest-thumb:hover::after,
.dest-thumb:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.dest-thumb:focus-visible {
    outline: 3px solid #1a73e8;
    outline-offset: -3px;
}

/* --- ข้อมูลใต้ภาพ --- */
.dest-body {
    padding: 16px 18px 18px;
    background: #ffffff;
    flex-shrink: 0;
    border-top: 1px solid #f0f6fd;
}

.dest-main .dest-body {
    padding: 20px 22px 22px;
}

.dest-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0a2647;
    line-height: 1.4;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.dest-main .dest-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
    -webkit-line-clamp: 3;
}

.dest-desc {
    font-size: 0.9rem;
    color: #4a6a8a;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.dest-main .dest-desc {
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
}

/* ---- Featured / ครูคนเก่ง ---- */
.featured-section { max-width: 1400px; margin: 40px auto; padding: 0 20px; }
.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }

/* ---- E-Service ---- */
.eservice-section { max-width: 1400px; margin: 40px auto; padding: 0 20px; }
.eservice-section .section-header { text-align: center; margin-bottom: 35px; }
.eservice-section .section-header h2 { font-size: 2rem; color: #0a2647; font-weight: 700; }
.eservice-section .section-header h2 span { color: #1a73e8; }
.eservice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.eservice-card {
    background: white; border-radius: 5px; padding: 25px 20px;
    text-align: center; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s; border: 1px solid #e9f0fa; cursor: pointer;
}
.eservice-card:hover { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); }
.eservice-card i { font-size: 2.5rem; color: #1a73e8; margin-bottom: 12px; display: block; }
.eservice-card h3 { font-size: 1rem; font-weight: 600; color: #0a2647; line-height: 1.4; }

/* ---- Document ---- */
.doc-section {
    padding: 50px 0; max-width: 1400px; margin: 0 auto;
    padding-left: 20px; padding-right: 20px;
}
.doc-section .content-card {
    background: white; border-radius: 5px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); border: 1px solid #e9f0fa;
    height: 100%; transition: box-shadow 0.3s;
}
.doc-section .content-card:hover { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); }
.doc-section .content-header { padding: 14px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.doc-section .content-header h3 {
    font-size: 1.1rem; font-weight: 600; margin: 0;
    display: flex; align-items: center; gap: 10px;
}
.doc-section .content-header h3 i { font-size: 1.2rem; }
.doc-section .content-body { padding: 15px 20px; min-height: 80px; }
.doc-section .content-body ul { list-style: none; padding: 0; margin: 0; }
.doc-section .content-body ul li {
    padding: 6px 0; border-bottom: 1px solid #f0f0f0;
    display: flex; justify-content: space-between;
    align-items: center; font-size: 0.9rem;
}
.doc-section .content-body ul li:last-child { border-bottom: none; }
.doc-section .content-body ul li a { color: #1a3a6b; text-decoration: none; transition: color 0.2s; }
.doc-section .content-body ul li a:hover { color: #1a73e8; }
.doc-section .content-body ul li .content-date { color: #7a9bcb; font-size: 0.8rem; white-space: nowrap; }
.doc-section .content-footer { padding: 12px 20px 18px; }
.doc-section .content-footer .btn {
    display: inline-block; font-weight: 500; padding: 6px 18px;
    border-radius: 5px; text-decoration: none; font-size: 0.85rem;
    transition: all 0.3s; border: 1px solid;
}
.doc-section .content-footer .btn-outline-primary { color: #1a73e8; border-color: #1a73e8; background: transparent; }
.doc-section .content-footer .btn-outline-primary:hover { background: #1a73e8; color: white; }
.doc-section .content-footer .btn-outline-success { color: #28a745; border-color: #28a745; background: transparent; }
.doc-section .content-footer .btn-outline-success:hover { background: #28a745; color: white; }
.doc-section .content-footer .btn-outline-secondary { color: #6c757d; border-color: #6c757d; background: transparent; }
.doc-section .content-footer .btn-outline-secondary:hover { background: #6c757d; color: white; }
.doc-section .content-footer .btn-outline-warning { color: #e67e22; border-color: #e67e22; background: transparent; }
.doc-section .content-footer .btn-outline-warning:hover { background: #e67e22; color: white; }
.doc-section .bg-dark { background: #1a3a6b !important; }
.doc-section .bg-success { background: #27ae60 !important; }
.doc-section .bg-secondary { background: #6c757d !important; }
.doc-section .bg-warning { background: #f39c12 !important; }
.doc-section .bg-warning h3 { color: #1a2a3a !important; }
.doc-section .text-white { color: white !important; }
.doc-section .text-dark { color: #1a2a3a !important; }
.doc-section .row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 25px;
}

/* ---- CTA SECTIONS ---- */
.cta-section {
    width: 100%; background: #d9ebff; margin: 40px 0; padding: 50px 0;
}
.cta-section .cta-wrapper {
    max-width: 1400px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.cta-content { flex: 1; color: #0a2647; }
.cta-content h2 {
    font-size: 2rem; font-weight: 700; margin-bottom: 10px;
    display: flex; align-items: center; gap: 12px; color: #0a2647;
}
.cta-content h2 i { font-size: 1.8rem; color: #1a73e8; }
.cta-content p {
    font-size: 1.05rem; line-height: 1.7; color: #1e3a5f;
    max-width: 600px; margin-bottom: 25px;
}
.cta-content .btn-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: #ffffff; color: #0a2647; padding: 12px 30px; border-radius: 6px;
    border: 2px solid #0a2647; text-decoration: none; font-weight: 600; font-size: 1rem;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    box-shadow: 0 2px 8px rgba(10, 38, 71, 0.08);
}
.cta-content .btn-cta:hover { background: #0a2647; color: #ffffff; border-color: #0a2647; }
.cta-content .btn-cta i { color: inherit; font-size: 0.9rem; transition: transform 0.3s; }
.cta-content .btn-cta:hover i { transform: translateX(4px); }
.cta-image {
    flex-shrink: 0; width: 280px; height: 170px; border-radius: 8px;
    overflow: hidden; box-shadow: 0 6px 24px rgba(10, 38, 71, 0.12);
}
.cta-image img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cta-section .cta-wrapper:hover .cta-image img { transform: scale(1.05); }

.cta-yellow-section {
    width: 100%; background: #fde74c; margin: 40px 0; padding: 50px 0;
}
.cta-yellow-section .cta-yellow-wrapper {
    max-width: 1400px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.cta-yellow-content { max-width: 800px; color: #1a2a3a; }
.cta-yellow-content h2 {
    font-size: 2rem; font-weight: 700; margin-bottom: 10px; color: #1a2a3a;
    display: flex; align-items: center; justify-content: center; gap: 12px;
}
.cta-yellow-content h2 i { font-size: 1.8rem; color: #b07d00; }
.cta-yellow-content p {
    font-size: 1.05rem; line-height: 1.7; color: #2a3a4a; margin-bottom: 25px;
}
.cta-yellow-content .btn-yellow-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: #1a2a3a; color: #fde74c; padding: 12px 32px; border-radius: 6px;
    border: 2px solid #1a2a3a; text-decoration: none; font-weight: 600; font-size: 1rem;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.cta-yellow-content .btn-yellow-cta:hover {
    background: #ffffff; color: #1a2a3a; border-color: #1a2a3a;
}
.cta-yellow-content .btn-yellow-cta i { font-size: 0.9rem; transition: transform 0.3s; }
.cta-yellow-content .btn-yellow-cta:hover i { transform: translateX(4px); }

/* ---- Map ---- */
.map-section { width: 100%; margin: 40px 0 0 0; padding: 0; }
.map-section iframe {
    width: 100%; height: 450px; border: 0; display: block;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

/* ---- Footer ---- */
.footer { background: #0a1e3a; color: #ffffff; padding: 60px 0 0 0; margin-top: 0; }
.footer-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px;
    padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-col h4 {
    font-size: 1.1rem; font-weight: 600; margin-bottom: 20px;
    color: #ffffff; position: relative; padding-bottom: 12px;
}
.footer-col h4::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 40px; height: 3px; background: #1a73e8; border-radius: 2px;
}
.footer-col p {
    color: rgba(255, 255, 255, 0.7); font-size: 0.9rem;
    line-height: 1.8; margin-bottom: 15px;
}
.footer-col .footer-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.6rem; font-weight: 700; color: #ffffff; margin-bottom: 15px;
}
.footer-col .footer-logo i { color: #1a73e8; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7); text-decoration: none;
    font-size: 0.9rem; transition: color 0.3s;
    display: inline-flex; align-items: center; gap: 8px;
}
.footer-col ul li a:hover { color: #1a73e8; }
.footer-col ul li a i { font-size: 0.7rem; color: #1a73e8; }
.footer-social { display: flex; gap: 12px; margin-top: 15px; }
.footer-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.08); color: #ffffff;
    text-decoration: none; transition: background 0.3s, box-shadow 0.3s;
    font-size: 1rem;
}
.footer-social a:hover { background: #1a73e8; box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4); }
.footer-contact li {
    display: flex; align-items: flex-start; gap: 12px;
    color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; margin-bottom: 14px;
}
.footer-contact li i {
    color: #1a73e8; font-size: 1rem; margin-top: 4px;
    width: 18px; text-align: center; flex-shrink: 0;
}
.footer-bottom {
    padding: 20px 0; display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 15px;
}
.footer-bottom p { color: rgba(255, 255, 255, 0.5); font-size: 0.85rem; margin: 0; }
.footer-bottom p a { color: #1a73e8; text-decoration: none; transition: color 0.3s; }
.footer-bottom p a:hover { color: #4a9eff; }
.footer-bottom-links { display: flex; gap: 25px; list-style: none; padding: 0; margin: 0; }
.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.5); text-decoration: none;
    font-size: 0.85rem; transition: color 0.3s;
}
.footer-bottom-links a:hover { color: #1a73e8; }

/* ============================================================ */
/*  MODAL (Popup + Award Image)                                  */
/* ============================================================ */
.modal {
    position: fixed; top: 0; left: 0; z-index: 9999; display: none;
    width: 100%; height: 100%; overflow: hidden; outline: 0;
    background-color: rgba(0, 0, 0, 0.75); align-items: center;
    justify-content: center; padding: 20px; opacity: 0; transition: opacity 0.3s ease;
}
.modal.show { display: flex; opacity: 1; }
.modal-dialog {
    position: relative; width: auto; max-width: 90vw; margin: 0 auto;
    pointer-events: none; display: flex; align-items: center; justify-content: center;
    transform: scale(0.92) translateY(20px); opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.modal.show .modal-dialog { transform: scale(1) translateY(0); opacity: 1; }
.modal-content {
    position: relative; display: flex; flex-direction: column; width: 100%;
    pointer-events: auto; background-color: transparent; background-clip: padding-box;
    border: none; border-radius: 0; outline: 0; box-shadow: none;
    align-items: center; justify-content: center;
}
.modal-content img {
    max-width: 50vw; max-height: 70vh; width: auto; height: auto;
    object-fit: contain; display: block; border: none; outline: none;
    border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal .btn-close {
    position: absolute; top: -50px; right: -10px; background: transparent;
    border: none; color: #ffffff; font-size: 2.5rem; cursor: pointer;
    line-height: 1; padding: 0 8px; z-index: 10; opacity: 0.8;
    transition: color 0.2s, opacity 0.2s;
}
.modal .btn-close:hover { color: #1a73e8; opacity: 1; }

/* ============================================================ */
/*   RESPONSIVE                                                  */
/* ============================================================ */

/* ---------- TABLET ≤ 1024px ---------- */
@media (max-width: 1024px) {
    .hero-slider {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .slide-item {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .slide-item img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center center;
    }
    .slider-controls { bottom: 25px; gap: 14px; }
    .dot-slide { width: 13px; height: 13px; }

    .menu-toggle { display: flex; }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px 0 10px 0;
        border-top: 1px solid #e0ebf5;
        margin-top: 10px;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }
    .nav-links.open {
        display: flex;
        animation: slideDown 0.3s ease-in-out forwards;
    }
    @keyframes slideDown {
        0% { opacity: 0; transform: translateY(-10px); }
        100% { opacity: 1; transform: translateY(0); }
    }
    .nav-links li { width: 100%; }
    .nav-links a { padding: 8px 0; width: 100%; font-size: 1rem; }
    .dropdown { width: 100%; }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: transparent;
        border-radius: 0;
        min-width: auto;
        display: none;
    }
    .dropdown.open .dropdown-menu { display: block; }
    .dropdown-menu li a { padding: 6px 0 6px 20px; }

    .navbar { padding: 12px 0; }
    .logo { font-size: 1.6rem; }

    .tours-grid { grid-template-columns: 1fr; gap: 20px; }
    .tour-card .card-img { width: 40%; }

    /* ---- คนเก่งของเรา (1 คอลัมน์) ---- */
    .destinations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .dest-main {
        grid-row: auto;
        grid-column: auto;
        min-height: 340px;
    }
    .dest-small {
        min-height: 340px;
    }
    .dest-main .dest-thumb { min-height: 260px; }
    .dest-small .dest-thumb { min-height: 260px; }
    .dest-main .dest-title { font-size: 1.25rem; }
    .dest-small .dest-title { font-size: 1.25rem; }
    .dest-main .dest-desc { font-size: 0.95rem; }
    .dest-small .dest-desc { font-size: 0.95rem; }

    /* ---- ครูคนเก่ง (1 คอลัมน์) ---- */
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .featured-card { height: 280px; }

    .eservice-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

    .doc-section .row { grid-template-columns: 1fr; gap: 20px; }

    .cta-section .cta-wrapper {
        flex-direction: column; text-align: center; gap: 30px;
    }
    .cta-content h2 { justify-content: center; font-size: 1.8rem; }
    .cta-content p { max-width: 100%; }
    .cta-image { width: 100%; max-width: 400px; height: 180px; }

    .cta-yellow-section .cta-yellow-wrapper { flex-direction: column; }
    .cta-yellow-content h2 { font-size: 1.8rem; }

    .map-section iframe { height: 350px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    body.has-sticky-nav { padding-top: 70px; }

    /* ---- Modal (Tablet) ---- */
    .modal-content img {
        max-width: 80vw;
        max-height: 75vh;
    }
}

/* ---------- MOBILE ≤ 820px ---------- */
@media (max-width: 820px) {
    .hero-slider {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .slide-item {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .slide-item img {
        width: 100%; height: 100%;
        object-fit: contain;
        object-position: center center;
    }
    .slider-controls { bottom: 20px; gap: 12px; }
    .dot-slide { width: 12px; height: 12px; }

    .navbar { padding: 10px 0; }
    .logo { font-size: 1.5rem; }

    .tours-grid { grid-template-columns: 1fr; gap: 18px; }
    .section-header-row h2 { font-size: 1.5rem; }
    .tour-card .card-img { width: 40%; }
    .tour-card .card-body h3 { font-size: 0.95rem; }
    .tour-card .card-body p { font-size: 0.85rem; }

    /* ---- คนเก่งของเรา (1 คอลัมน์) ---- */
    .destinations-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .dest-main { min-height: 320px; }
    .dest-small { min-height: 320px; }
    .dest-main .dest-thumb { min-height: 240px; }
    .dest-small .dest-thumb { min-height: 240px; }
    .dest-title { font-size: 1.1rem; }
    .dest-main .dest-title { font-size: 1.15rem; }
    .dest-desc { font-size: 0.9rem; }

    /* ---- ครูคนเก่ง (1 คอลัมน์) ---- */
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .featured-card { height: 260px; }

    body.has-sticky-nav { padding-top: 65px; }

    .eservice-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .eservice-section .section-header h2 { font-size: 1.5rem; }

    .doc-section .row { grid-template-columns: 1fr; gap: 18px; }
    .doc-section { padding: 30px 20px; }

    .cta-section { padding: 35px 0; }
    .cta-section .cta-wrapper { padding: 0 20px; gap: 25px; }
    .cta-content h2 { font-size: 1.5rem; }
    .cta-content p { font-size: 0.95rem; }
    .cta-image { height: 160px; }

    .cta-yellow-section { padding: 35px 0; }
    .cta-yellow-section .cta-yellow-wrapper { padding: 0 20px; }
    .cta-yellow-content h2 { font-size: 1.5rem; }
    .cta-yellow-content p { font-size: 0.95rem; }

    .map-section iframe { height: 300px; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-bottom-links { justify-content: center; flex-wrap: wrap; gap: 15px; }

    /* ---- Modal (Mobile) ---- */
    .modal { padding: 12px; }
    .modal-content img {
        max-width: 92vw;
        max-height: 78vh;
    }
    .modal .btn-close {
        top: -46px;
        right: 0;
        font-size: 2.2rem;
    }
}

/* ---------- SMALL ≤ 600px ---------- */
@media (max-width: 600px) {
    /* ---- คนเก่งของเรา (1 คอลัมน์) ---- */
    .destinations-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .dest-main { min-height: 300px; }
    .dest-small { min-height: 300px; }
    .dest-main .dest-thumb { min-height: 220px; }
    .dest-small .dest-thumb { min-height: 220px; }
    .dest-body { padding: 16px 18px; }
    .dest-main .dest-body { padding: 18px 20px; }
    .dest-title {
        font-size: 1rem;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
    }
    .dest-main .dest-title {
        font-size: 1.15rem;
        -webkit-line-clamp: 3;
    }
    .dest-desc {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    .dest-main .dest-desc { -webkit-line-clamp: 3; }
    .dest-thumb::after {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    /* ---- ครูคนเก่ง (1 คอลัมน์) ---- */
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .featured-card { height: 240px; }

    .eservice-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

    .footer-grid { grid-template-columns: 1fr; gap: 25px; }

    /* ---- Modal (Small) ---- */
    .modal { padding: 8px; }
    .modal-content img {
        max-width: 96vw;
        max-height: 82vh;
    }
    .modal .btn-close {
        top: -42px;
        right: 0;
        font-size: 2rem;
    }
}

/* ---------- EXTRA SMALL ≤ 480px ---------- */
@media (max-width: 480px) {
    .hero-slider {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .slide-item img { object-fit: contain; }

    .slider-controls { bottom: 15px; gap: 10px; }
    .dot-slide { width: 10px; height: 10px; }
    .logo { font-size: 1.3rem; }
    .logo i { font-size: 1.3rem; }
    .nav-links a { font-size: 0.9rem; padding: 6px 0; }
    .navbar { padding: 8px 0; }
    .menu-toggle span { width: 24px; height: 2.5px; }

    .tours-grid { grid-template-columns: 1fr; gap: 15px; }
    .section-header-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .section-header-row h2 { font-size: 1.3rem; }
    .tour-card { flex-direction: column; min-height: auto; border-radius: 5px; }
    .tour-card .card-img { width: 100%; height: 160px; border-radius: 5px 5px 0 0; }
    .tour-card .card-body { padding: 15px 16px; }
    .tour-card .card-body h3 { font-size: 1rem; }

    /* ---- คนเก่งของเรา (1 คอลัมน์) ---- */
    .destinations-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .dest-main { min-height: 280px; }
    .dest-small { min-height: 280px; }
    .dest-main .dest-thumb { min-height: 200px; }
    .dest-small .dest-thumb { min-height: 200px; }
    .dest-body { padding: 14px 16px; }
    .dest-main .dest-body { padding: 16px 18px; }
    .dest-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
    }
    .dest-main .dest-title {
        font-size: 1.05rem;
        -webkit-line-clamp: 3;
    }
    .dest-desc {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
    .dest-main .dest-desc { -webkit-line-clamp: 3; }

    /* ---- ครูคนเก่ง (1 คอลัมน์) ---- */
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .featured-card { height: 220px; }

    .eservice-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .eservice-section .section-header h2 { font-size: 1.3rem; }
    .eservice-card { padding: 15px 12px; }
    .eservice-card i { font-size: 1.8rem; }
    .eservice-card h3 { font-size: 0.8rem; }

    body.has-sticky-nav { padding-top: 60px; }

    .doc-section .row { grid-template-columns: 1fr; gap: 15px; }
    .doc-section { padding: 20px 15px; }
    .doc-section .content-header h3 { font-size: 1rem; }
    .doc-section .content-body ul li { font-size: 0.8rem; flex-wrap: wrap; }
    .doc-section .content-body ul li .content-date { font-size: 0.7rem; }

    .cta-section { padding: 30px 0; }
    .cta-section .cta-wrapper { padding: 0 20px; gap: 20px; }
    .cta-content h2 { font-size: 1.3rem; gap: 8px; }
    .cta-content h2 i { font-size: 1.4rem; }
    .cta-content p { font-size: 0.9rem; margin-bottom: 18px; }
    .cta-content .btn-cta { padding: 10px 22px; font-size: 0.9rem; }
    .cta-image { height: 140px; }

    .cta-yellow-section { padding: 30px 0; }
    .cta-yellow-section .cta-yellow-wrapper { padding: 0 20px; gap: 20px; }
    .cta-yellow-content h2 { font-size: 1.3rem; gap: 8px; }
    .cta-yellow-content h2 i { font-size: 1.4rem; }
    .cta-yellow-content p { font-size: 0.9rem; margin-bottom: 18px; }
    .cta-yellow-content .btn-yellow-cta { padding: 10px 22px; font-size: 0.9rem; }

    .map-section iframe { height: 250px; }
    .footer { padding: 40px 0 0 0; }
    .footer-col .footer-logo { font-size: 1.3rem; }

    /* ---- Modal (Extra Small) ---- */
    .modal-content img {
        max-width: 98vw;
        max-height: 85vh;
    }
    .modal .btn-close {
        top: -40px;
        font-size: 1.9rem;
    }
}
/* ============================================================ */
/*  ครูคนเก่ง (Featured Teachers) — คลิกรูปเปิด Modal             */
/* ============================================================ */

.featured-section { max-width: 1400px; margin: 40px auto; padding: 0 20px; }

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* --- การ์ด --- */
.featured-card-item {
    background: #ffffff;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #e9f0fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.featured-card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(10, 38, 71, 0.12);
}

/* --- รูป (ปุ่มเปิด modal) --- */
.featured-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: #e9f0fa;
    cursor: zoom-in;
    overflow: hidden;
    position: relative;
    flex: 1;
    min-height: 200px;
    font: inherit;
    color: inherit;
    text-align: left;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.featured-thumb:hover img {
    transform: scale(1.06);
}

/* ✅ Icon แว่นขยายตอน hover */
.featured-thumb::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', sans-serif;
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(10, 38, 71, 0.78);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.featured-thumb:hover::after,
.featured-thumb:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.featured-thumb:focus-visible {
    outline: 3px solid #1a73e8;
    outline-offset: -3px;
}

/* --- ข้อมูลใต้ภาพ --- */
.featured-body {
    padding: 14px 16px 16px;
    background: #ffffff;
    flex-shrink: 0;
    border-top: 1px solid #f0f6fd;
}

.featured-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0a2647;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ---- Responsive: ครูคนเก่ง (1 คอลัมน์เมื่อไม่ใช่ desktop) ---- */
@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .featured-card-item {
        min-height: 340px;
    }
    .featured-thumb {
        min-height: 260px;
    }
    .featured-title {
        font-size: 1.15rem;
        -webkit-line-clamp: 3;
    }
    .featured-body {
        padding: 16px 18px 18px;
    }
}

@media (max-width: 820px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .featured-card-item { min-height: 320px; }
    .featured-thumb { min-height: 240px; }
    .featured-title { font-size: 1.1rem; }
}

@media (max-width: 600px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .featured-card-item { min-height: 300px; }
    .featured-thumb { min-height: 220px; }
    .featured-body { padding: 14px 16px; }
    .featured-title { font-size: 1rem; }
    .featured-thumb::after {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .featured-card-item { min-height: 280px; }
    .featured-thumb { min-height: 200px; }
    .featured-body { padding: 12px 14px; }
    .featured-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
    }
}
/* ============================================================ */
/*  Page Hero (สำหรับหน้าข่าว / หน้าอื่น)                         */
/* ============================================================ */
.page-hero {
    width: 100%;
    min-height: 280px;
    padding: 80px 20px 60px;
    background: linear-gradient(135deg, #0a2647 0%, #1a73e8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06), transparent 40%);
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.page-hero-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.page-hero-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

@media (max-width: 600px) {
    .page-hero {
        min-height: 200px;
        padding: 60px 20px 40px;
    }
    .page-hero-content h1 { font-size: 1.5rem; }
    .page-hero-content p  { font-size: 0.9rem; }
}
/* ============================================================ */
/*  News Navigation Buttons (ย้อนกลับ / กลับหน้าข่าวทั้งหมด)     */
/* ============================================================ */
.btn-news-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 5px;
    border: 1.5px solid #c5d9f0;
    background: #ffffff;
    color: #0a2647;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    line-height: 1.2;
    white-space: nowrap;
}

.btn-news-nav i {
    font-size: 0.85rem;
    transition: transform 0.25s;
}

.btn-news-nav:hover {
    background: #f0f7ff;
    border-color: #1a73e8;
    color: #1a73e8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
}

.btn-news-nav:hover i.fa-arrow-left {
    transform: translateX(-3px);
}

/* Primary variant */
.btn-news-nav-primary {
    background: linear-gradient(135deg, #1a73e8 0%, #0d5bbd 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(26, 115, 232, 0.25);
}

.btn-news-nav-primary:hover {
    background: linear-gradient(135deg, #0d5bbd 0%, #0a2647 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(26, 115, 232, 0.35);
}

.btn-news-nav-primary:hover i {
    transform: translateX(3px);
}

/* Responsive: จอเล็ก — ยืดเต็มทั้ง 2 ปุ่ม */
@media (max-width: 600px) {
    .btn-news-nav {
        padding: 9px 14px;
        font-size: 0.85rem;
        flex: 1;
        justify-content: center;
    }
}
/* ============================================================ */
/*  Badge Inline — สำหรับใช้ในเนื้อหา (ไม่ทับบนรูป)              */
/* ============================================================ */
.badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    line-height: 1.4;
    white-space: nowrap;
}

.badge-inline i {
    font-size: 0.72rem;
}

/* สีตามหมวด */
.badge-inline.badge-pr      { background: #e67e22; }
.badge-inline.badge-job     { background: #27ae60; }
.badge-inline.badge-procure { background: #2980b9; }
.badge-inline.badge-event   { background: #8e44ad; }