/* Google Fonts — Prompt for headings (Thai + Latin), Inter for body */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;600;700&family=Inter:wght@300;400;500&display=swap');

/* Base */
body {
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Prompt', sans-serif;
}

/* --- การจัดการสี (Color Palette) --- */
/* สีน้ำเงินกรมท่า (Navy Blue) - สีหลัก */
.bg-navy {
    background-color: #0f2540 !important;
}
.text-navy {
    color: #0f2540 !important;
}

/* สีทอง (Gold) - สีรอง */
.text-gold {
    color: #c5a059 !important;
}

/* ปุ่มสีทอง */
.btn-gold {
    background-color: #c5a059;
    color: #fff;
    border: 1px solid #c5a059;
    font-family: 'Prompt', sans-serif;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background-color: #a8853d;
    border-color: #a8853d;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* --- Navbar --- */
.navbar {
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.navbar-brand img {
    height: 40px; /* ปรับขนาดโลโก้ */
    width: auto;
}

.nav-link {
    font-size: 1rem;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* --- Hero Section (ส่วนหัวขนาดใหญ่) --- */
.hero-section {
    /* พื้นหลังแบบไล่เฉดสีทับรูปภาพ และเรียกรูปจากโฟลเดอร์ img */
    background: linear-gradient(rgba(15, 37, 64, 0.85), rgba(15, 37, 64, 0.7)), 
                url('../img/hero1.png'); 
    
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* ทำให้ภาพพื้นหลังนิ่งเมื่อเลื่อน */
    height: 100vh; /* เต็มความสูงหน้าจอ */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding-top: 70px; /* เผื่อพื้นที่ให้ Navbar */
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
}

/* --- Section: Services --- */
.service-card {
    border: none;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px); /* ลอยขึ้นเมื่อเอาเมาส์ชี้ */
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.icon-box {
    width: 80px;
    height: 80px;
    background-color: #f8f9fa;
    color: #0f2540;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    border: 2px solid #c5a059;
    transition: all 0.3s;
}

.service-card:hover .icon-box {
    background-color: #c5a059;
    color: #fff;
}

.service-card h4 {
    color: #0f2540;
    margin-bottom: 15px;
    font-weight: 600;
}

/* --- Section: Articles Slider --- */
.article-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-track-outer {
    overflow: hidden;
    flex: 1;
}

.article-track {
    display: flex;
    gap: 24px;
    will-change: transform;
}

.article-card {
    flex: 0 0 calc((100% - 48px) / 3);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.13);
}

.article-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #e9ecef;
}

.article-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-img-wrap img {
    transform: scale(1.05);
}

.article-body {
    padding: 20px;
}

.article-tag {
    display: inline-block;
    background-color: #c5a059;
    color: #fff;
    font-size: 0.75rem;
    font-family: 'Prompt', sans-serif;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.article-title {
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #0f2540;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-excerpt {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #c5a059;
    background: #fff;
    color: #c5a059;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
}

.article-arrow:hover {
    background: #c5a059;
    color: #fff;
}

.article-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .article-card {
        flex: 0 0 85%;
    }
    .article-arrow {
        display: none;
    }
    .article-track-outer {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .article-card {
        scroll-snap-align: start;
    }
}

/* --- Footer --- */
footer {
    background-color: #1a1a1a;
    font-size: 0.9rem;
}

footer h5 {
    color: #c5a059; /* หัวข้อใน Footer สีทอง */
    margin-bottom: 20px;
    font-weight: 600;
}

footer a {
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #c5a059 !important;
}

/* --- Utility --- */
/* เส้นคั่นเล็กๆ */
hr.bg-secondary {
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- Hero eyebrow text --- */
.hero-eyebrow {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #c5a059;
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

/* --- Why Us Section --- */
.trust-item {
    padding: 24px 16px;
    border-radius: 10px;
    transition: background 0.3s;
}
.trust-item:hover {
    background: #f8f9fa;
}
.trust-icon {
    font-size: 2rem;
    color: #c5a059;
}

/* --- Attorney badge --- */
.badge-english {
    display: inline-block;
    background-color: #0f2540;
    color: #c5a059;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* --- Attorney note box --- */
.attorney-note {
    background: #f8f9fa;
    border-left: 3px solid #c5a059;
    border-radius: 0 6px 6px 0;
}

/* --- Icon box (override color per card) --- */
.service-card .icon-box {
    color: #0f2540;
}
.service-card:hover .icon-box {
    background-color: #c5a059;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section {
        height: auto;
        padding: 150px 0 100px;
    }
}
