:root {
    --portal-bg: #f4f7fe;
    --card-bg: #ffffff;
    --text-main: #1b2559;
    --text-muted: #8f9bba;
    --primary-color: #4318FF;
}

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--portal-bg);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* เพื่อให้ Footer อยู่ติดขอบล่างเสมอ */
}

/* ================= Header Navbar ================= */
.custom-navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(112, 144, 176, 0.08);
    padding: 15px 0;
}
.navbar-brand {
    font-size: 1.4rem;
    color: var(--text-main);
}
.navbar-brand i {
    color: var(--primary-color);
}
.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}
.btn-login {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-login:hover {
    background-color: #3311db;
    color: white;
    box-shadow: 0 5px 15px rgba(67, 24, 255, 0.3);
    transform: translateY(-2px);
}

/* ================= Main Content ================= */
.main {
    flex-grow: 1; /* ขยายพื้นที่ตรงกลางให้เต็ม */
    padding: 1rem;
}

.portal-header { margin-bottom: 1.5rem; }

.portal-badge {
    background: rgba(67, 24, 255, 0.1);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.portal-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    margin-top: 15px;
}

.portal-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ================= Menu Cards ================= */
.menu-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 30px rgba(112, 144, 176, 0.07);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--card-color, #4318FF);
    border-radius: 20px 20px 0 0;
    transition: height 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(112, 144, 176, 0.18);
    border-color: rgba(67, 24, 255, 0.15);
}
.menu-card:hover::before { height: 8px; }

/* การตั้งค่ารูปให้เป็นวงกลม */
.icon-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background-color: var(--card-bg-soft, #f4f7fe);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 5px; /* ขอบระยะห่างระหว่างรูปกับสีพื้นหลัง */
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.menu-card:hover .icon-wrapper {
    transform: scale(1.08) translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

/* รูปภาพบังคับวงกลม */
.button-image {
    width: 100%;
    height: 100%;
    border-radius: 50%; /* ทำให้รูปเป็นวงกลม */
    object-fit: cover; /* ตัดส่วนเกินออกไม่ให้รูปเบี้ยว */
    background-color: #fff; /* ใส่สีขาวรองพื้นเผื่อรูปเป็น PNG โปร่งใส */
}

.menu-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    text-align: center;
}

.status-badge {
    font-size: 0.8rem;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ================= Theme Colors ================= */
.card-blue   { --card-color: #2563eb; --card-bg-soft: #eff6ff; }
.card-pink   { --card-color: #ec4899; --card-bg-soft: #fdf2f8; }
.card-red    { --card-color: #ef4444; --card-bg-soft: #fef2f2; }
.card-green  { --card-color: #10b981; --card-bg-soft: #ecfdf5; }
.card-purple { --card-color: #8b5cf6; --card-bg-soft: #f5f3ff; }
.card-gray   { --card-color: #64748b; --card-bg-soft: #f8fafc; }

.card-disabled { opacity: 0.85; }

/* ================= Footer ================= */
.custom-footer {
    background-color: #1b2559; /* สีน้ำเงินเข้มหรูหรา */
    color: #ffffff;
    padding: 2rem 0;
    margin-top: auto;
}
.footer-text {
    color: #8f9bba;
    font-size: 0.9rem;
}
/* ================= Page Specific: Contact Page ================= */
.contact-card {
    background: var(--card-bg, #ffffff);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 30px rgba(112, 144, 176, 0.07);
    position: relative;
    overflow: hidden;
}

/* แถบสีด้านบนของการ์ด */
.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color, #4318FF) 0%, #868CFF 100%);
}

.contact-org-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main, #1b2559);
}

.contact-divider {
    border-color: #e2e8f0;
    opacity: 0.7;
}

/* กล่องไอคอน */
.contact-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.contact-info-item {
    padding: 1rem;
    border-radius: 16px;
    transition: background-color 0.3s ease;
}

.contact-info-item:hover {
    background-color: #f8fafc;
}