/**
 * Elegant Government Website Style
 * โทนสีเรียบหรู มีระดับ สำหรับหน่วยงานราชการ
 */

/* ===================================
   Color Palette - Elegant & Luxury
   =================================== */
:root {
    /* Primary Colors - Navy & Indigo (กระทรวงศึกษาธิการ) */
    --primary-navy: #1a237e;
    --primary-charcoal: #283593;
    --primary-slate: #3949ab;

    /* Accent Colors - Gold & Amber */
    --accent-gold: #ffc107;
    --accent-bronze: #ff8f00;
    --accent-champagne: #fff8e1;

    /* Neutral Colors - Cool Grays */
    --neutral-dark: #263238;
    --neutral-medium: #546e7a;
    --neutral-light: #90a4ae;
    --neutral-lighter: #cfd8dc;
    --neutral-lightest: #f5f7fa;

    /* Background */
    --bg-primary: #ffffff;
    --bg-secondary: #e8eaf6;
    --bg-tertiary: #c5cae9;
    
    /* Text Colors */
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #95a5a6;
    
    /* Border */
    --border-color: #e4e7eb;
    --border-accent: var(--accent-gold);
    
    /* Shadows - Subtle & Elegant */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-deep: 0 16px 48px rgba(0, 0, 0, 0.1);
}

/* ===================================
   Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', 'Sukhumvit Set', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    font-weight: 400;
    letter-spacing: 0.01em;
}

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

/* ===================================
   Top Bar - Elegant Dark
   =================================== */
.top-bar {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-charcoal) 100%);
    color: var(--neutral-lighter);
    padding: 10px 0;
    font-size: 13px;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.top-bar a {
    color: var(--neutral-lighter);
    text-decoration: none;
    opacity: 0.85;
    transition: all 0.3s ease;
    font-weight: 500;
}

.top-bar a:hover {
    opacity: 1;
    color: var(--accent-champagne);
}

.top-bar i {
    margin-right: 6px;
    opacity: 0.7;
}

/* ===================================
   Header - Premium Look
   =================================== */
.site-header {
    background: var(--bg-primary);
    padding: 30px 0;
    box-shadow: var(--shadow-soft);
    border-bottom: 2px solid var(--accent-gold);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 25px;
}

.site-logo {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-size: 36px;
    overflow: hidden;
    flex-shrink: 0;
}

.site-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-title-wrapper h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.site-title-en {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.site-tagline {
    color: var(--accent-bronze);
    font-size: 15px;
    font-weight: 600;
    margin-top: 6px;
    letter-spacing: 0.3px;
}

/* Search Box - Elegant */
.search-form {
    position: relative;
}

.search-input {
    width: 320px;
    padding: 12px 45px 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 14px;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    font-weight: 400;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.search-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-bronze) 100%);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.search-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* ===================================
   Navigation - Sophisticated
   =================================== */
.main-nav {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-charcoal) 100%);
    box-shadow: var(--shadow-medium);
    position: relative;
}

.main-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-gold) 50%, 
        transparent 100%);
}

.nav-menu {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    color: var(--neutral-lighter);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-menu li a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-champagne);
}

.nav-menu li a:hover::after {
    transform: scaleX(1);
}

.nav-menu li a i {
    font-size: 13px;
    opacity: 0.8;
}

/* ===================================
   Featured Section - Premium
   =================================== */
.featured-news {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-slate) 100%);
    color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
    margin: 35px 0;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    min-height: 340px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.featured-content {
    padding: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-bronze) 100%);
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    width: fit-content;
    box-shadow: var(--shadow-soft);
}

.featured-news h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

.featured-news p {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.92;
    color: var(--neutral-lightest);
}

.featured-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-bronze) 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 25px;
    width: fit-content;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    letter-spacing: 0.3px;
    font-size: 14px;
}

.featured-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.featured-image {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(205, 127, 50, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(212, 175, 55, 0.3);
    font-size: 64px;
    border-left: 1px solid rgba(212, 175, 55, 0.2);
}

/* ===================================
   Main Content
   =================================== */
.main-content {
    padding: 0 0 35px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
}

/* ===================================
   Section Title - Elegant
   =================================== */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), transparent);
}

.section-title h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-navy);
    letter-spacing: -0.3px;
}

.section-title h2 i {
    font-size: 18px;
    color: var(--accent-gold);
}

/* ===================================
   News Cards - Premium Design
   =================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
    margin-bottom: 35px;
}

.news-card {
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--accent-gold);
}

.news-card-image {
    height: 190px;
    background: linear-gradient(135deg, var(--neutral-lighter) 0%, var(--neutral-lightest) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-medium);
    font-size: 48px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.news-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-bronze) 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: var(--shadow-soft);
}

.news-card-content {
    padding: 24px;
}

.news-category {
    color: var(--accent-bronze);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.news-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.5;
    letter-spacing: -0.2px;
}

.news-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--accent-bronze);
}

.news-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-weight: 500;
}

.news-meta i {
    color: var(--accent-gold);
    margin-right: 5px;
}

/* ===================================
   Sidebar - Refined
   =================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.widget {
    background: var(--bg-primary);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.widget-title {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-charcoal) 100%);
    color: white;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.2px;
    border-bottom: 2px solid var(--accent-gold);
}

.widget-title i {
    color: var(--accent-gold);
    font-size: 14px;
}

.widget-content {
    padding: 18px;
}

.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-link-item {
    background: var(--bg-secondary);
    padding: 14px 10px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
}

.quick-link-item:hover {
    background: var(--primary-navy);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-gold);
}

.quick-link-item i {
    font-size: 22px;
    color: var(--accent-gold);
    transition: all 0.3s ease;
}

.quick-link-item:hover i {
    color: var(--accent-champagne);
    transform: scale(1.1);
}

.quick-link-item span {
    font-size: 12px;
    font-weight: 600;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: start;
    gap: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.widget-list a:hover {
    color: var(--accent-bronze);
    padding-left: 8px;
}

.widget-list i {
    color: var(--accent-gold);
    margin-top: 3px;
    font-size: 12px;
}

/* ===================================
   Category Grid - Elegant
   =================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin-bottom: 35px;
}

.category-box {
    background: var(--bg-primary);
    padding: 26px 18px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--accent-gold);
    text-decoration: none;
    color: var(--text-primary);
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevated);
    background: var(--bg-secondary);
}

.category-box i {
    font-size: 34px;
    color: var(--accent-gold);
    margin-bottom: 14px;
    display: block;
    transition: all 0.3s ease;
}

.category-box:hover i {
    transform: scale(1.1);
    color: var(--accent-bronze);
}

.category-box h4 {
    font-size: 15px;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: -0.1px;
}

.category-box span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===================================
   Footer - Premium Dark
   =================================== */
.site-footer {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
    color: var(--neutral-lighter);
    padding: 50px 0 25px;
    margin-top: 60px;
    border-top: 3px solid var(--accent-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    margin-bottom: 25px;
}

.footer-widget h3 {
    font-size: 17px;
    margin-bottom: 18px;
    color: var(--accent-gold);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.footer-widget p, .footer-widget li {
    font-size: 13px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 10px;
    font-weight: 400;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-widget a:hover {
    color: var(--accent-champagne);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.social-links a {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-gold);
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .featured-news {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-content {
        padding: 30px 25px;
    }
}

/* ===================================
   Executives Widget - ผู้บริหารสถานศึกษา
   =================================== */
.executives-widget .widget-content {
    padding: 0;
}

.executives-list {
    display: flex;
    flex-direction: column;
}

.executive-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.executive-item:last-child {
    border-bottom: none;
}

.executive-item:hover {
    background: var(--bg-secondary);
}

.executive-photo {
    width: 160px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--shadow-elevated);
    border: 3px solid var(--accent-gold);
}

.executive-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.executive-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-charcoal) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.executive-placeholder i {
    font-size: 48px;
    color: var(--accent-gold);
    opacity: 0.8;
}

.executive-info {
    width: 100%;
}

.executive-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 5px;
    line-height: 1.4;
}

.executive-position {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.no-executives {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 14px;
}
