/* ===================================================
   IMPORT FONTS: MITR
=================================================== */
@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@200;300;400;500;600;700&display=swap');

/* ---------- 1. GLOBAL & BASE STYLES ---------- */
* {
    box-sizing: border-box;
}

html, body, body.site {
    background-color: #fff5f7 !important;
    color: #5c343e !important;
    font-family: 'Mitr', "Segoe UI", sans-serif !important;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .site-title {
    font-family: 'Mitr', "Segoe UI", sans-serif !important;
    color: #7a3043 !important;
    font-weight: 700;
}

/* ---------- 2. RESPONSIVE BANNER (NO OVERLAP) ---------- */
header.header, .container-header {
    position: sticky !important;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #ff6ea7 0%, #ff9ebb) !important;
    box-shadow: 0 8px 30px rgba(255, 110, 167, 0.2) !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
}

.container-header .site-grid,
.container-header .grid-child {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.navbar-brand {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.navbar-brand img,
.container-header img,
.brand-logo img,
header.header img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important; 
    max-height: none !important;
    min-height: none !important;
    aspect-ratio: 2400 / 400 !important;
    object-fit: fill !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

.site-title-container, .site-title, .site-description {
    display: none !important; 
}

/* ---------- 3. DESKTOP MENU (>= 1200px) ---------- */
@media (min-width: 1200px) {
    .container-nav {
        display: block !important;
        width: 100% !important;
        padding: 12px 15px 18px 15px !important;
        background: transparent !important;
    }

    .mod-menu, .metismenu.mod-menu {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .mod-menu > li > a, 
    .metismenu.mod-menu > li > a {
        display: inline-flex !important;
        align-items: center;
        padding: 10px 22px !important;
        background: rgba(255, 255, 255, 0.25) !important;
        border: 1px solid rgba(255, 255, 255, 0.45) !important;
        border-radius: 30px !important;
        color: #ffffff !important;
        font-size: 14.5px !important;
        font-weight: 500;
        text-decoration: none !important;
        white-space: nowrap !important;
        backdrop-filter: blur(8px);
        transition: all 0.25s ease;
    }

    .mod-menu > li > a:hover {
        background: #ffffff !important;
        color: #ff3385 !important;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .mod-menu .current > a, 
    .metismenu.mod-menu .active > a {
        background: #ffffff !important;
        color: #ff3385 !important;
        font-weight: 600 !important;
    }

    .navbar-toggler {
        display: none !important;
    }
}

/* ---------- 4. RESPONSIVE SIDEBAR SYSTEM (< 1200px) ---------- */
@media (max-width: 1199.98px) {
    .container-nav {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: flex-end !important;
        padding: 10px 15px !important;
        background: rgba(255, 110, 167, 0.1) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .navbar-toggler, 
    button[data-bs-toggle="collapse"] {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffffff !important;
        border: 1px solid #ffd3e2 !important;
        border-radius: 10px !important;
        width: 110px !important;
        height: 40px !important;
        color: #ff3385 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        box-shadow: 0 4px 12px rgba(255, 110, 167, 0.1) !important;
    }
    
    .navbar-toggler::after {
        content: " เมนู";
    }

    .navbar-collapse,
    #navbar-main {
        position: fixed !important;
        top: 0 !important;
        right: -320px; 
        left: auto !important;
        width: 300px !important;
        height: 100vh !important;
        background: #ffffff !important; 
        padding: 40px 24px !important;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12) !important;
        z-index: 99999 !important;
        overflow-y: auto !important;
        display: block !important;
        visibility: visible !important;
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .navbar-collapse.show,
    #navbar-main.show {
        transform: translateX(-320px); 
    }

    .mod-menu, .metismenu.mod-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 0 !important;
        margin-top: 30px !important;
        list-style: none !important;
        width: 100% !important;
    }

    .mod-menu > li > a, .metismenu.mod-menu > li > a {
        display: flex !important;
        align-items: center;
        justify-content: flex-start !important;
        background: #fff5f8 !important;
        color: #7a3043 !important;
        padding: 14px 20px !important;
        border-radius: 14px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border: 1px solid #ffe3ed !important;
        text-decoration: none !important;
        width: 100% !important;
    }

    .mod-menu .current > a, 
    .metismenu.mod-menu .active > a {
        background: linear-gradient(135deg, #ff6ea7 0%, #ff3385 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 6px 15px rgba(255, 51, 133, 0.2) !important;
    }

    .metismenu.mod-menu ul {
        position: static !important;
        background: #fffbfe !important;
        margin: 5px 0 5px 12px !important;
        padding: 6px !important;
        box-shadow: none !important;
        border-radius: 12px !important;
        border: 1px dashed #ffd1e1 !important;
        list-style: none !important;
    }

    body:has(.navbar-collapse.show)::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(68, 31, 44, 0.35);
        backdrop-filter: blur(4px);
        z-index: 99990;
    }
}

/* ---------- 5. CONTENT AREA STYLING ---------- */
main, .component {
    background: #ffffff !important;
    border-radius: 26px !important;
    padding: clamp(20px, 4vw, 40px) !important;
    box-shadow: 0 12px 35px rgba(255, 110, 167, 0.05) !important;
    margin-top: 25px;
    border: 1px solid #ffeef3;
}

.mod-breadcrumbs {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 14px 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
    color: #ff3385 !important;
    border: 1px solid #ffeef3;
}

/* ---------- 6. NEW: SERVICE LINKS STYLING (ชมพูพาสเทลโมเดิร์น) ---------- */
.service-links-section {
    max-width: 1400px;
    margin: 45px auto;
    padding: 0 20px;
}

.service-links-header {
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.service-links-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6ea7, #ff9ebb);
    border-radius: 2px;
}

.service-links-main-title {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #7a3043 !important;
    letter-spacing: 0.5px;
    margin: 0 !important;
}

.service-links-subtitle {
    font-size: 14.5px;
    color: #9c6573;
    margin: 4px 0 0 0;
}

/* โครงสร้าง Grid 5 คอลัมน์บนจอใหญ่ */
.service-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    width: 100%;
}

/* ตกแต่งกล่องการ์ดแนวโปร่งแสงหรูหรา */
.service-card {
    background: #ffffff !important;
    border: 1px solid #ffeef3 !important;
    border-radius: 18px !important;
    padding: 24px 16px !important;
    text-align: center;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 25px rgba(255, 110, 167, 0.03) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* วงกลมรอบไอคอน */
.card-icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: #fff0f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: background-color 0.3s ease;
}

.card-icon {
    font-size: 24px;
}

.card-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #5c343e !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.4;
}

.card-desc {
    font-size: 12.5px;
    color: #a67f89;
    margin: 0;
    line-height: 1.4;
}

/* Hover Effect โทนชมพูละมุน */
.service-card:hover {
    transform: translateY(-5px);
    background: #ffffff !important;
    border-color: #ff9ebb !important;
    box-shadow: 0 12px 30px rgba(255, 110, 167, 0.15) !important;
}

.service-card:hover .card-icon-wrapper {
    background-color: #ffe0eb;
}

/* Responsive ของกลุ่มปุ่มบริการ */
@media (max-width: 1199px) {
    .service-grid-container {
        grid-template-columns: repeat(3, 1fr); /* จอแท็บเล็ตใหญ่เรียงแถวละ 3 */
    }
}

@media (max-width: 768px) {
    .service-grid-container {
        grid-template-columns: repeat(2, 1fr); /* จอแท็บเล็ตเล็กเรียงแถวละ 2 */
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .service-grid-container {
        grid-template-columns: 1fr; /* จอมือถือสลับมาเรียงแถวเดี่ยวเต็มหน้าจอ */
    }
    .service-card {
        padding: 20px 15px !important;
    }
}

/* ---------- 7. MODERN PREMIUM FOOTER STYLING ---------- */
.site-footer {
    background-color: #222222 !important;
    color: #e0e0e0 !important;
    padding: 60px 0 0 0 !important;
    margin-top: 50px;
    font-size: 14.5px;
    line-height: 1.6;
    border-top: 4px solid #ff6ea7;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr 1fr;
    gap: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-title {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 45px;
    height: 3px;
    background-color: #ff9ebb !important;
    border-radius: 2px;
}

.university-name {
    color: #ff9ebb !important;
    font-weight: 500;
    margin-top: -12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.info-item p {
    margin: 0;
    color: #cccccc;
}

.info-item strong {
    color: #ffffff;
}

.info-icon {
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* กล่องแผนที่ Google Maps */
.footer-map {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 15px;
    margin-bottom: 15px;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid #3d3d3d;
}

.footer-map iframe {
    display: block;
    width: 100% !important;
    height: 160px !important;
    transition: all 0.3s ease;
}

.footer-map:hover {
    box-shadow: 0 6px 20px rgba(255, 158, 187, 0.25) !important;
    border-color: #ff9ebb !important;
}

.footer-links {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-links li {
    margin-bottom: 12px;
    padding-left: 15px;
    position: relative;
}

.footer-links li::before {
    content: "›";
    position: absolute;
    left: 0;
    top: -2px;
    color: #ff9ebb !important;
    font-size: 18px;
    font-weight: bold;
}

.footer-links li a {
    color: #cccccc !important;
    text-decoration: none !important;
    transition: color 0.2s ease, padding 0.2s ease;
}

.footer-links li a:hover {
    color: #ffffff !important;
    padding-left: 4px;
}

.contacts a {
    color: #ff9ebb !important;
    text-decoration: none !important;
    font-weight: 500;
}
.contacts a:hover {
    color: #ffffff !important;
}

.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.social-btn.fb { background-color: #1877f2; }
.social-btn.web { background-color: #ff3385; }

.social-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

.footer-bottom {
    background-color: #181818 !important;
    padding: 20px 0 !important;
    margin-top: 50px;
    border-top: 1px solid #2d2d2d;
    font-size: 13px;
    color: #aaaaaa;
}

.footer-bottom-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom-container p {
    margin: 0;
}

.bottom-policies a {
    color: #aaaaaa !important;
    text-decoration: none !important;
}

.bottom-policies a:hover {
    color: #ffffff !important;
}

.bottom-policies .divider {
    margin: 0 8px;
    color: #444444;
}

/* ---------- 📱 RESPONSIVE BREAKPOINTS (FOOTER) ---------- */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
    }
}

@media (max-width: 767px) {
    .site-footer {
        padding: 40px 0 0 0 !important;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-map iframe {
        height: 180px !important;
    }
}