@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@300;400;500;600;700&family=Sarabun:wght@300;400;700&display=swap');

:root {
    --primary: #5A0000;
    --gold: #FFD700;
    --text-dark: #333;
    --text-light: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Bai Jamjuree", sans-serif; }

body { 
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('../image/5532862.jpg');
    background-position: center; 
    background-attachment: fixed;
    background-repeat: no-repeat; 
    background-size: cover;
    color: var(--text-dark); 
}

a { text-decoration: none !important; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

header {
    position: fixed; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 5%; z-index: 9999; transition: 0.4s ease;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}
header.sticky {
    background: var(--primary); padding: 5px 5%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); border-bottom: 2px solid var(--gold);
}
header .Logo {
    color: var(--text-light); font-size: 1.3rem; font-weight: 700; 
    text-transform: uppercase; letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); display: flex; align-items: center; gap: 10px;
}
header .Logo img { height: 50px; width: auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); }

header ul.main-nav { display: flex; align-items: center; gap: 20px; }
header ul.main-nav > li > a { 
    color: var(--text-light) !important; font-weight: 500; font-size: 1rem; opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}
header ul.main-nav > li > a:hover { color: var(--gold) !important; opacity: 1; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }

.services { position: relative; }
/* ค้นหา .drop-down แล้วแก้ตามนี้ครับ */

.drop-down {
    position: absolute; 
    top: 100%; 
    
    /* ⭐ แก้ตรงนี้ครับ: เปลี่ยนจาก left: 0 เป็น left: auto และเพิ่ม right: 0 */
    left: auto; 
    right: 0; /* สั่งให้กล่องเมนูชิดขวา (อิงกับขอบขวาของคำว่า Police ITA) */
    
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.95); 
    min-width: 200px; 
    border-radius: 5px; 
    border-top: 4px solid var(--primary);
    visibility: hidden; opacity: 0; 
    transform: translateY(10px); 
    transition: 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* เพิ่มลูกเล่น: ให้รายการข้างในชิดขวาด้วยไหม? (ถ้าชอบแบบเดิมชิดซ้าย ก็ไม่ต้องใส่อันล่างนี้ครับ) */
/* .drop-down li a { text-align: right; } */
.services::after { content: ''; position: absolute; width: 100%; height: 20px; top: 100%; left: 0; }
.services:hover .drop-down { visibility: visible; opacity: 1; transform: translateY(0); }
.drop-down li a { color: var(--text-dark) !important; display: block; padding: 12px 20px; border-bottom: 1px solid #eee; }
.drop-down li a:hover { background: var(--primary); color: var(--gold) !important; padding-left: 25px; }

footer {
    background-color: #1a1a1a !important; 
    color: #ccc !important; 
    font-family: 'Sarabun', sans-serif; 
    border-top: 5px solid var(--primary); margin-top: 50px;
}
.footer-container {
    max-width: 1200px; margin: 0 auto; padding: 50px 20px;
    display: grid; grid-template-columns: 1fr 2fr; gap: 40px;
}
.footer-logo { text-align: center; border-right: 1px solid #333; padding-right: 30px; }
.footer-logo img { width: 140px; margin-bottom: 15px; filter: drop-shadow(0 0 5px rgba(255,255,255,0.1)); }
.footer-logo h4 { color: #fff !important; font-size: 1.3rem; margin-top: 10px; font-weight: bold; }

.footer-info h3 { 
    color: var(--gold) !important; font-size: 1.4rem; margin-bottom: 25px; font-weight: 700; 
    border-bottom: 1px solid #333; padding-bottom: 5px; display: inline-block;
}
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
/* --- Footer Animation Fix --- */
.contact-item { 
    display: flex; align-items: flex-start; gap: 15px; 
    background: rgba(255,255,255,0.05); padding: 15px; border-radius: 8px; 
    transition: all 0.3s ease; /* เพิ่ม ease ให้นุ่ม */
    border-left: 3px solid transparent; /* เตรียมเส้นขอบไว้ก่อน กันกระตุก */
}

.contact-item:hover { 
    background: rgba(255,255,255,0.1); 
    transform: translateY(-3px); /* ขยับขึ้นนิดเดียวพอ */
    border-left: 3px solid var(--gold); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.contact-item i { 
    font-size: 1.3rem; color: var(--primary) !important; background: var(--gold) !important; 
    width: 38px; height: 38px; border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* เด้งดึ๋งเบาๆ */
}

/* เอาหมุนออก เปลี่ยนเป็นขยาย + เงา */
.contact-item:hover i {
    transform: scale(1.1); 
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    color: #fff !important; /* เปลี่ยนสีไอคอนข้างในเป็นขาว */
}

.contact-text h5 { color: #fff !important; font-size: 1rem; margin-bottom: 5px; font-weight: bold; }
.contact-text a, .contact-text p { color: #aaa !important; font-size: 0.9rem; line-height: 1.4; display: block; }
.contact-text a:hover { color: var(--gold) !important; }

.copyright { background: #000; padding: 20px; text-align: center; border-top: 1px solid #222; font-size: 0.9rem; }

@media (max-width: 900px) {
    header ul.main-nav { display: none; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-logo { border-right: none; padding-right: 0; border-bottom: 1px solid #333; padding-bottom: 20px; }
    .contact-item { text-align: left; }
}