/*
Theme Name: OBEC School (โรงเรียนตัวอย่าง)
Theme URI: https://php56.wai.dragonhispeed.com/
Description: ธีมลูกของ Twenty Seventeen รูปแบบเว็บโรงเรียน/หน่วยงานราชการตามแนว สพฐ. (OBEC) สำหรับ lab demo
Author: waii lab
Version: 1.0.0
Template: twentyseventeen
Text Domain: obec-school
*/

/* ============================
   1. Base / Typography (Thai-friendly)
   ============================ */
@import url('https://fonts.googleapis.com/css?family=Sarabun:400,500,600,700&display=swap&subset=thai,latin');

body,
button,
input,
select,
textarea,
.entry-title,
.entry-content,
.site-title,
.widget-title {
    font-family: 'Sarabun', 'Tahoma', 'Segoe UI', sans-serif !important;
}

body {
    background: #f3f6fb;
    color: #1f2d3d;
    line-height: 1.7;
}

a {
    color: #0a3a82;
}

a:hover, a:focus {
    color: #d4a017;
}

/* ============================
   2. Top Utility Bar
   ============================ */
.obec-topbar {
    background: #062b66;
    color: #fff;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 2px solid #d4a017;
}
.obec-topbar .obec-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.obec-topbar a {
    color: #fff;
    margin-left: 14px;
    text-decoration: none;
}
.obec-topbar a:hover { color: #ffd95e; }
.obec-topbar .obec-tb-left span { margin-right: 16px; }

/* ============================
   3. Main Header (Logo + School Name)
   ============================ */
.obec-header {
    background: #fff;
    padding: 22px 0;
    border-bottom: 4px solid #0a3a82;
}
.obec-header .obec-container {
    display: flex;
    align-items: center;
    gap: 22px;
}
.obec-header .obec-logo {
    width: 90px;
    height: 90px;
    background: radial-gradient(circle at 50% 45%, #ffd95e 0%, #d4a017 70%, #8a6a0a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: #062b66;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(6,43,102,0.25);
    flex-shrink: 0;
    border: 3px solid #0a3a82;
}
.obec-header .obec-title-block { flex: 1; }
.obec-header .obec-school-name {
    font-size: 28px;
    font-weight: 700;
    color: #062b66;
    margin: 0;
    line-height: 1.2;
}
.obec-header .obec-school-en {
    font-size: 14px;
    color: #5b6b7f;
    margin: 4px 0 0 0;
    letter-spacing: 0.5px;
}
.obec-header .obec-tagline {
    font-size: 14px;
    color: #d4a017;
    margin-top: 2px;
    font-weight: 500;
}

/* ============================
   4. Main Navigation
   ============================ */
.obec-nav {
    background: linear-gradient(90deg, #0a3a82 0%, #062b66 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.obec-nav .obec-container { padding: 0; }
.obec-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.obec-nav li {
    position: relative;
}
.obec-nav li a {
    color: #fff;
    text-decoration: none;
    padding: 14px 20px;
    display: block;
    font-weight: 500;
    transition: background 0.18s ease;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.obec-nav li a:hover,
.obec-nav li.current-menu-item > a {
    background: #d4a017;
    color: #062b66;
}
.obec-nav li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0a3a82;
    min-width: 200px;
    z-index: 999;
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}
.obec-nav li:hover > ul { display: block; }
.obec-nav li ul li a { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }

/* ============================
   5. Hero Slider
   ============================ */
.obec-slider {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    background: #062b66;
}
.obec-slider .obec-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    background-size: cover;
    background-position: center;
}
.obec-slider .obec-slide.active { opacity: 1; }
.obec-slider .obec-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6,43,102,0.78) 0%, rgba(10,58,130,0.55) 100%);
}
.obec-slider .obec-slide-caption {
    position: relative;
    max-width: 800px;
    padding: 0 30px;
    z-index: 2;
}
.obec-slider .obec-slide h2 {
    font-size: 38px;
    color: #fff;
    margin: 0 0 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.obec-slider .obec-slide p {
    font-size: 18px;
    color: #ffd95e;
    margin: 0;
}
.obec-slider .obec-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}
.obec-slider .obec-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    border: 2px solid #fff;
}
.obec-slider .obec-dot.active { background: #d4a017; }

/* slide background placeholders (gradients) */
.obec-slide-1 { background: linear-gradient(135deg, #062b66, #0a3a82); }
.obec-slide-2 { background: linear-gradient(135deg, #0a3a82, #1a5cb0); }
.obec-slide-3 { background: linear-gradient(135deg, #062b66, #d4a017); }

/* ============================
   6. Container & Layout
   ============================ */
.obec-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}
.obec-section {
    padding: 50px 0;
}
.obec-section-title {
    text-align: center;
    margin-bottom: 36px;
}
.obec-section-title h2 {
    font-size: 28px;
    color: #062b66;
    display: inline-block;
    padding: 0 24px 10px;
    border-bottom: 3px solid #d4a017;
    margin: 0;
}
.obec-section-title .obec-sub {
    color: #5b6b7f;
    margin-top: 8px;
    font-size: 14px;
}

/* ============================
   7. Override Twenty Seventeen content
   ============================ */
.site-content-contain {
    background: #f3f6fb;
}
.site-content {
    padding-top: 0 !important;
}
.custom-header { display: none; }
.site-branding { display: none; }
.navigation-top { display: none; }
#page .site-header { background: transparent; }

/* hide twenty seventeen footer that might leak through */
.site-info { display: none; }

/* ============================
   8. Custom Footer
   ============================ */
.obec-footer {
    background: #062b66;
    color: #c9d4e8;
    padding: 40px 0 0;
    margin-top: 50px;
}
.obec-footer h4 {
    color: #ffd95e;
    font-size: 17px;
    margin-bottom: 14px;
    border-bottom: 2px solid rgba(255,217,94,0.25);
    padding-bottom: 8px;
}
.obec-footer .obec-foot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.obec-footer a { color: #c9d4e8; text-decoration: none; }
.obec-footer a:hover { color: #ffd95e; }
.obec-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.obec-footer ul li {
    padding: 4px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.07);
}
.obec-footer ul li::before {
    content: "▸ ";
    color: #d4a017;
}
.obec-footer .obec-copy {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 30px;
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    background: rgba(0,0,0,0.15);
}

/* ============================
   9. Responsive
   ============================ */
@media (max-width: 768px) {
    .obec-header .obec-container { flex-direction: column; text-align: center; }
    .obec-nav ul { flex-direction: column; }
    .obec-nav li a { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .obec-slider { height: 280px; }
    .obec-slider .obec-slide h2 { font-size: 24px; }
    .obec-footer .obec-foot-grid { grid-template-columns: 1fr; }
}

/* ============================
   10. Misc — post listings on archive
   ============================ */
.obec-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.obec-news-card {
    background: #fff;
    border: 1px solid #e3e9f3;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.obec-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(6,43,102,0.13);
}
.obec-news-card .obec-news-thumb {
    height: 160px;
    background: linear-gradient(135deg, #0a3a82, #d4a017);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 38px;
}
.obec-news-card .obec-news-body { padding: 16px; }
.obec-news-card .obec-news-date {
    color: #d4a017;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}
.obec-news-card h3 {
    font-size: 17px;
    margin: 0 0 8px;
    line-height: 1.4;
}
.obec-news-card h3 a { color: #062b66; text-decoration: none; }
.obec-news-card h3 a:hover { color: #d4a017; }
.obec-news-card p {
    margin: 0;
    color: #5b6b7f;
    font-size: 14px;
}
@media (max-width: 768px) {
    .obec-news-grid { grid-template-columns: 1fr; }
}

/* ============================
   11. Quick links
   ============================ */
.obec-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.obec-quick-card {
    background: #fff;
    text-align: center;
    padding: 24px 14px;
    border-radius: 6px;
    border-top: 4px solid #d4a017;
    text-decoration: none;
    color: #062b66;
    transition: all 0.18s;
    display: block;
}
.obec-quick-card:hover {
    background: #062b66;
    color: #ffd95e;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(6,43,102,0.18);
}
.obec-quick-card .obec-q-icon {
    font-size: 38px;
    margin-bottom: 8px;
}
.obec-quick-card .obec-q-label {
    font-weight: 600;
    font-size: 15px;
}
@media (max-width: 768px) {
    .obec-quick-grid { grid-template-columns: repeat(2, 1fr); }
}
