/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Sarabun', sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fff;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Top Bar ===== */
.top-bar {
    background: #0d1b3e;
    color: #fff;
    font-size: 0.8rem;
    padding: 5px 0;
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-links a { color: #94a3b8; transition: color 0.3s; }
.top-links a:hover { color: #fff; }
.top-links span { margin: 0 6px; color: #475569; }
.lang-switch { display: flex; gap: 3px; }
.lang-btn {
    background: transparent; border: 1px solid #475569; color: #94a3b8;
    padding: 2px 10px; cursor: pointer; border-radius: 3px;
    font-size: 0.75rem; font-family: 'Sarabun', sans-serif; transition: all 0.3s;
}
.lang-btn.active, .lang-btn:hover { background: #1e40af; border-color: #1e40af; color: #fff; }

/* ===== Header ===== */
.main-header {
    background: #fff;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
    position: sticky; top: 0; z-index: 1000;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; }
.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-img { width: 55px; height: 55px; object-fit: contain; }
.logo-text h1 { font-size: 1.1rem; color: #0d1b3e; line-height: 1.3; }
.logo-text p { font-size: 0.78rem; color: #64748b; }
.nav-list { display: flex; gap: 2px; }
.nav-link {
    padding: 8px 12px; border-radius: 4px; font-size: 0.88rem;
    font-weight: 600; color: #334155; transition: all 0.3s; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: #0d1b3e; color: #fff; }
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 5px;
}
.hamburger span { width: 24px; height: 2.5px; background: #0d1b3e; border-radius: 2px; transition: 0.3s; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; background: #0d1b3e; }
.hero-slide {
    opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-img {
    width: 100%;
    height: auto;
    display: block;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(13,27,62,0.7) 0%, rgba(13,27,62,0.5) 50%, rgba(13,27,62,0.7) 100%);
    display: flex; align-items: center; justify-content: center;
}
.hero-content { display: flex; justify-content: center; align-items: center; padding: 0 40px; }
.hero-text-center { text-align: center; }
.hero-text { flex: 1; }
.hero-motto {
    color: #fbbf24; font-size: 1rem; font-weight: 600;
    margin-bottom: 10px; letter-spacing: 1px;
}
.hero-text h2 { color: #fff; font-size: 3.5rem; font-weight: 800; line-height: 1.1; }
.hero-text h3 { color: #e2e8f0; font-size: 1.8rem; font-weight: 400; margin-top: 5px; }

.hero-prev, .hero-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    font-size: 1rem; transition: background 0.3s; z-index: 10;
}
.hero-prev { left: 15px; }
.hero-next { right: 15px; }
.hero-prev:hover, .hero-next:hover { background: rgba(255,255,255,0.3); }
.hero-dots {
    position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 10;
}
.hero-dot {
    width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.4);
    border: none; cursor: pointer; transition: all 0.3s;
}
.hero-dot.active { background: #fbbf24; transform: scale(1.2); }

/* ===== Emergency Bar ===== */
.emergency-bar { background: #f8fafc; padding: 20px 0; position: relative; z-index: 10; }
.emergency-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.emergency-item {
    display: flex; align-items: center; gap: 14px; padding: 20px;
    border-radius: 12px; color: #fff; transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.emergency-item:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.emergency-item i { font-size: 1.8rem; }
.emergency-item strong { font-size: 1.3rem; display: block; }
.emergency-item span { font-size: 0.8rem; opacity: 0.9; }
.emergency-red { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.emergency-blue { background: linear-gradient(135deg, #1e40af, #1e3a8a); }
.emergency-gold { background: linear-gradient(135deg, #d97706, #b45309); }
.emergency-fb { background: linear-gradient(135deg, #1877f2, #1565c0); }

/* ===== Loyalty Section ===== */
.loyalty-layout-single { max-width: 700px; margin: 0 auto; }
.loyalty-layout-single .loyalty-img img { height: 350px; }
.loyalty-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 1px solid #f1f5f9;
    transition: transform 0.3s, box-shadow 0.3s; display: block; text-decoration: none; color: inherit;
}
.loyalty-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.loyalty-img img { width: 100%; height: 250px; object-fit: cover; }
.loyalty-body { padding: 20px; }
.loyalty-body h3 { color: #0d1b3e; font-size: 1.05rem; margin-bottom: 10px; }
.loyalty-body p { color: #475569; font-size: 0.9rem; line-height: 1.7; margin-bottom: 12px; }

/* ===== Sections ===== */
.section { padding: 50px 0; }
.section-alt { background: #f8fafc; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.section-title {
    font-size: 1.5rem; color: #0d1b3e; position: relative; padding-bottom: 10px;
}
.section-title::after {
    content: ''; display: block; width: 50px; height: 3px;
    background: #dc2626; margin-top: 8px; border-radius: 2px;
}
.section-header .section-title { margin-bottom: 0; }
.section-header .section-title::after { margin-top: 6px; }
.view-all {
    color: #1e40af; font-weight: 600; font-size: 0.9rem;
    display: flex; align-items: center; gap: 5px; transition: color 0.3s;
}
.view-all:hover { color: #dc2626; }

/* ===== Cards ===== */
.arrest-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 1px solid #f1f5f9;
    transition: transform 0.3s, box-shadow 0.3s; display: block;
}
.arrest-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.arrest-img { overflow: hidden; }
.arrest-img img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.4s; }
.arrest-img .img-placeholder-card { height: 180px; }
.arrest-card:hover .arrest-img img { transform: scale(1.05); }
.arrest-body { padding: 16px; }
.arrest-body h3 { font-size: 0.95rem; color: #1e293b; margin: 8px 0; line-height: 1.5; }
.arrest-body p { font-size: 0.85rem; color: #64748b; margin-bottom: 14px; line-height: 1.6; }
.arrest-link {
    font-size: 0.85rem; color: #1e40af; font-weight: 600;
    display: inline-flex; align-items: center; gap: 5px;
}
.arrest-card:hover .arrest-link { color: #dc2626; }

.card-grid { display: grid; gap: 20px; }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f1f5f9; display: block; text-decoration: none; color: inherit;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.card-img { overflow: hidden; }
.card-img img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 16px; }
.card-tag {
    display: inline-block; padding: 2px 10px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 600; margin-bottom: 6px;
}
.tag-announce { background: #dbeafe; color: #1e40af; }
.tag-pr { background: #dcfce7; color: #166534; }
.tag-warn { background: #fef3c7; color: #92400e; }
.tag-news { background: #e0e7ff; color: #3730a3; }
.tag-volunteer { background: #fef9c3; color: #854d0e; }
.card-date { color: #94a3b8; font-size: 0.8rem; }
.card-body h3 { font-size: 0.95rem; color: #1e293b; margin: 6px 0; line-height: 1.4; }
.card-body p { font-size: 0.85rem; color: #64748b; line-height: 1.5; }
.card-horizontal { display: flex; flex-direction: row; }
.card-horizontal .card-img { width: 140px; flex-shrink: 0; }
.card-horizontal .card-img img { height: 100%; min-height: 120px; }
.card-horizontal .card-body { display: flex; flex-direction: column; justify-content: center; }
.card-large .card-img img { height: 300px; }

/* ===== News - Layout with Facebook sidebar ===== */
.news-layout { display: grid; grid-template-columns: 1fr 380px; gap: 25px; align-items: start; }
.news-cards { display: flex; flex-direction: column; gap: 20px; }
.news-cards .card-img img { width: 100%; height: 200px; object-fit: cover; }
.card-img img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-img img { transform: scale(1.05); }
.fb-feed-wrapper {
    background: #fff; border-radius: 12px; padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 1px solid #f1f5f9;
    position: sticky; top: 80px;
}
.fb-feed-wrapper h3 { color: #0d1b3e; font-size: 1rem; margin-bottom: 15px; }
.fb-follow-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #1877f2; color: #fff; padding: 10px 24px; border-radius: 8px;
    margin-top: 15px; font-weight: 600; font-size: 0.9rem; transition: background 0.3s;
}
.fb-follow-btn:hover { background: #1565c0; }

/* ===== Report Section ===== */
.report-layout { display: grid; grid-template-columns: 300px 1fr; gap: 30px; }
.report-channels { display: flex; flex-direction: column; gap: 15px; }
.channel-card {
    background: #f8fafc; border-radius: 12px; padding: 20px; text-align: center;
    border: 1px solid #e2e8f0; transition: box-shadow 0.3s;
}
.channel-card:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.channel-icon {
    width: 50px; height: 50px; border-radius: 50%; background: #0d1b3e;
    color: #fff; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px; font-size: 1.2rem;
}
.channel-card h3 { color: #0d1b3e; font-size: 1rem; margin-bottom: 5px; }
.channel-number { font-size: 1.4rem; font-weight: 800; color: #dc2626; }
.channel-link { color: #1e40af; font-weight: 600; }
.channel-link:hover { text-decoration: underline; }
.report-form-wrapper {
    background: #fff; padding: 30px; border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 1px solid #f1f5f9;
}
.report-form h3 { color: #0d1b3e; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 600; color: #334155; font-size: 0.85rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font-family: 'Sarabun', sans-serif; font-size: 0.95rem; transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #1e40af; box-shadow: 0 0 0 3px rgba(30,64,175,0.1);
}
.btn-submit {
    width: 100%; padding: 12px; background: #0d1b3e; color: #fff; border: none;
    border-radius: 8px; font-size: 1rem; font-weight: 700;
    font-family: 'Sarabun', sans-serif; cursor: pointer; transition: background 0.3s;
}
.btn-submit:hover { background: #1e3a8a; }

/* ===== About ===== */
.about-layout { display: grid; grid-template-columns: 1fr 350px; gap: 40px; align-items: start; }
.about-text h3 { color: #0d1b3e; font-size: 1.3rem; margin-bottom: 15px; }
.about-text h4 { color: #0d1b3e; font-size: 1.05rem; margin: 20px 0 10px; }
.about-text p { color: #475569; margin-bottom: 12px; line-height: 1.7; }
.about-list { list-style: none; padding: 0; margin-bottom: 10px; }
.about-list li {
    display: flex; align-items: flex-start; gap: 10px; padding: 8px 0;
    color: #334155; font-size: 0.9rem; line-height: 1.5;
}
.about-list li i { color: #1e40af; margin-top: 3px; width: 18px; text-align: center; flex-shrink: 0; }
.about-cases { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.case-tag {
    background: #fef2f2; color: #991b1b; padding: 4px 12px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 600; border: 1px solid #fecaca;
}
.about-sidebar { display: flex; flex-direction: column; gap: 20px; }
.org-chart {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 1px solid #f1f5f9; text-align: center;
}
.org-chart img { width: 100%; }
.org-chart p { padding: 10px; color: #0d1b3e; font-weight: 600; font-size: 0.9rem; }
.about-contact-box {
    background: #0d1b3e; color: #fff; border-radius: 12px; padding: 20px;
}
.about-contact-box p { margin-bottom: 8px; font-size: 0.9rem; color: #e2e8f0; }
.about-contact-box i { margin-right: 8px; color: #fbbf24; }
.org-card {
    background: #fff; border-radius: 12px; padding: 25px; text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); border: 1px solid #f1f5f9; flex: 1;
}
.org-card img {
    width: 130px; height: 160px; border-radius: 10px; object-fit: cover;
    margin: 0 auto 12px; border: 3px solid #e2e8f0;
}
.org-card h4 { color: #0d1b3e; margin-bottom: 4px; }
.org-card p { color: #64748b; font-size: 0.85rem; }

/* ===== Contact ===== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 15px; }
.contact-item i { font-size: 1.2rem; color: #1e40af; margin-top: 4px; width: 22px; text-align: center; }
.contact-item h4 { color: #0d1b3e; margin-bottom: 3px; font-size: 0.95rem; }
.contact-item p, .contact-item a { color: #475569; font-size: 0.9rem; }
.contact-item a:hover { color: #1e40af; }
.map-link { color: #1e40af !important; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; }
.contact-map { border-radius: 12px; overflow: hidden; min-height: 350px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }

/* ===== Footer ===== */
.main-footer { background: #0d1b3e; color: #94a3b8; padding: 40px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid #1e3a5f; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-logo { width: 50px; flex-shrink: 0; }
.footer-brand h3 { color: #fff; font-size: 1rem; margin-bottom: 4px; }
.footer-brand p { font-size: 0.8rem; }
.footer-nav h4, .footer-related h4, .footer-social-col h4 { color: #fff; margin-bottom: 12px; font-size: 0.95rem; }
.footer-nav li, .footer-related li { margin-bottom: 6px; }
.footer-nav a, .footer-related a { color: #94a3b8; font-size: 0.85rem; transition: color 0.3s; }
.footer-nav a:hover, .footer-related a:hover { color: #fff; }
.footer-social { display: flex; gap: 8px; margin-bottom: 15px; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 50%; background: #1e3a5f;
    display: flex; align-items: center; justify-content: center; color: #fff; transition: background 0.3s;
}
.footer-social a:hover { background: #1877f2; }
.footer-social-col p { font-size: 0.85rem; margin-bottom: 5px; }
.footer-social-col i { margin-right: 6px; }
.footer-bottom { text-align: center; padding: 18px 0; font-size: 0.8rem; }

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed; bottom: 25px; right: 25px; width: 42px; height: 42px;
    border-radius: 50%; background: #0d1b3e; color: #fff; border: none;
    cursor: pointer; font-size: 1rem; opacity: 0; visibility: hidden;
    transition: all 0.3s; z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: #1e40af; transform: translateY(-3px); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .news-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 25px; }
}

@media (max-width: 768px) {
    .top-links { display: none; }
    .hamburger { display: flex; }
    .nav-list {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; flex-direction: column; padding: 10px 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .nav-list.open { display: flex; }
    .hero-text h2 { font-size: 2.2rem; }
    .hero-text h3 { font-size: 1.2rem; }
    .emergency-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid-4, .card-grid-3 { grid-template-columns: 1fr; }
    .card-horizontal { flex-direction: column; }
    .card-horizontal .card-img { width: 100%; }
    .card-horizontal .card-img img { height: 160px; min-height: auto; }
    .report-layout { grid-template-columns: 1fr; }
    .about-layout { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 35px 0; }
    .section-title { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .emergency-grid { grid-template-columns: 1fr; }
    .hero-text h2 { font-size: 1.6rem; }
    .form-row { grid-template-columns: 1fr; }
    .logo-text h1 { font-size: 0.95rem; }
}

/* ===== Image Placeholders ===== */
.img-placeholder {
    background: #cbd5e1;
    border: 2px dashed #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.4;
    font-family: 'Sarabun', monospace;
    position: relative;
}
.img-placeholder::before {
    content: '📷';
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 1rem;
}
.img-placeholder-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 0.55rem;
    flex-shrink: 0;
}
.img-placeholder-hero {
    width: 100%;
    height: 520px;
    font-size: 1.2rem;
}

.img-placeholder-card {
    width: 100%;
    height: 180px;
}
.img-placeholder-card-h {
    width: 140px;
    height: 100%;
    min-height: 120px;
    flex-shrink: 0;
    font-size: 0.7rem;
}
.img-placeholder-large {
    width: 100%;
    height: 300px;
    font-size: 1rem;
}
.img-placeholder-org {
    width: 130px;
    height: 160px;
    border-radius: 10px;
    margin: 0 auto 12px;
    font-size: 0.7rem;
}
.img-placeholder-footer-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 0.45rem;
    background: #1e3a5f;
    border-color: #475569;
    color: #94a3b8;
}
