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

:root {
    --p-dark: #0f1c2e;
    --p-main: #003366;
    --p-accent: #00b4d8;
    
    /* Blue Ocean Palette */
    --ocean-deep: #00264d;
    --ocean-mid: #004e80;
    --ocean-light: #0096c7;
    
    --grad-card: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
    --shadow-soft: 0 5px 15px rgba(0, 51, 102, 0.05);
    --shadow-sharp: 0 2px 8px rgba(0, 0, 0, 0.03);
    --border-radius: 4px;
}

body {
    font-family: 'Kanit', sans-serif;
    background-color: #f4f6f9;
    color: var(--p-dark);
    font-weight: 300;
}

/* --- GEOMETRIC HERO SECTION (แก้ไข: ปรับความสูง + จัดกึ่งกลาง) --- */
.sitemap-hero-geo {
    position: relative;
    margin-top: 80px; 
    
    /* ปรับ Padding ตามที่ร้องขอ (5rem 0 16rem) */
    padding: 5rem 0 16rem;
    
    /* จัดข้อความทั้งหมดให้อยู่กึ่งกลาง */
    text-align: center; 
    
    background: linear-gradient(120deg, var(--ocean-deep) 0%, var(--ocean-mid) 60%, var(--ocean-light) 100%);
    color: white;
    overflow: hidden;
    
    /* Clip-path ตัดมุมล่าง */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0% 100%);
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.2);
    z-index: 1;
}

/* Geometric Lines */
.geo-line {
    position: absolute;
    z-index: -1;
}

.line-1 {
    width: 120%;
    height: 100%;
    top: 0;
    left: -10%;
    background: linear-gradient(90deg, transparent 40%, rgba(255,255,255,0.05) 40%, rgba(255,255,255,0.05) 60%, transparent 60%);
    transform: skewX(-25deg);
}

.line-2 {
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 150px 100%;
}

.line-3 {
    width: 400px;
    height: 100%;
    top: 0;
    right: 0;
    background: linear-gradient(225deg, rgba(255,255,255,0.07), transparent);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

/* Typography */
.hero-title-strong {
    font-size: 3.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 4px 0 rgba(0,0,0,0.1), 0 8px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
}

.hero-separator {
    width: 120px;
    height: 6px;
    background: #FFD700;
    /* margin auto ช่วยให้เส้นอยู่กลางเมื่อ parent เป็น text-align center */
    margin: 20px auto 25px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.hero-subtitle-strong {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* --- Main Content --- */
.main-content-wrapper {
    padding-bottom: 3rem;
    
    /* ดึงเนื้อหาขึ้นไปทับ Background มากขึ้น (-8rem) เพื่อให้สมดุลกับ padding ด้านล่างที่เพิ่มเป็น 16rem */
    margin-top: -3rem; 
    
    position: relative;
    z-index: 2;
}

/* --- Premium Cards --- */
.premium-card {
    background: var(--grad-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sharp);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    
    /* จัด Text ภายใน Card ให้ชิดซ้ายตามปกติ (เพื่อไม่ให้ได้รับผลกระทบจาก text-center ของ body/header) */
    text-align: left;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 51, 102, 0.15);
    border-color: #fff;
}

.card-header-strip {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--ocean-deep) 0%, var(--ocean-light) 100%);
    position: absolute;
    top: 0; left: 0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--p-main);
    padding: 1.5rem 1.2rem 0.8rem;
    margin: 0;
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 12px;
    color: var(--p-accent);
    width: 32px;
    height: 32px;
    text-align: center;
    background: rgba(0, 180, 216, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

/* --- Link Styling --- */
.link-group {
    padding: 0.5rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
}

.scrollable-group {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.scrollable-group::-webkit-scrollbar {
    width: 4px;
}
.scrollable-group::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 4px;
}

.sitemap-link {
    display: block;
    padding: 12px 8px;
    text-decoration: none;
    color: #555;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.sitemap-link:last-child {
    border-bottom: none;
}

.sitemap-link:hover {
    color: var(--p-main);
    background-color: rgba(0, 91, 150, 0.03);
    padding-left: 15px;
    border-left: 3px solid var(--p-accent);
}

.external-link-icon {
    font-size: 0.75rem;
    margin-left: 5px;
    opacity: 0.6;
}

.border-end-md {
    border-right: 1px solid #f0f0f0;
}

@media (max-width: 991px) {
    .hero-title-strong {
        font-size: 2.5rem;
    }
    .sitemap-hero-geo {
        margin-top: 60px;
        padding: 4rem 0 20rem; /* มือถือลดความสูงลงหน่อยเพื่อไม่ให้โล่งเกินไป */
    }
    .main-content-wrapper {
        margin-top: -6rem; /* ปรับการซ้อนทับในมือถือ */
    }
}

@media (max-width: 767px) {
    .border-end-md {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
}

/* --- Dark Mode --- */
[data-theme="dark"] body {
    background-color: #0b0f15;
    color: #d1d5db;
}
[data-theme="dark"] .premium-card {
    background: #151f2e;
    border-color: #2a3b55;
}
[data-theme="dark"] .card-title {
    color: #fff;
}
[data-theme="dark"] .sitemap-link {
    color: #b0b8c3;
    border-bottom-color: #2a3b55;
}
[data-theme="dark"] .sitemap-link:hover {
    background-color: rgba(0, 180, 216, 0.1);
    color: var(--p-accent);
}
[data-theme="dark"] .border-end-md {
    border-right-color: #2a3b55;
    border-bottom-color: #2a3b55;
}