:root {
    --primary-blue: #1e3a8a;
    --soft-blue: #3b82f6;
    --light-blue-bg: #f0f7ff;
    
    --primary-pink: #ec4899;
    --soft-pink: #f472b6;
    --light-pink-bg: #fff0f6;
    
    --bg-color: #faf7fc;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    
    --shadow-sm: 0 4px 12px rgba(236, 72, 153, 0.06);
    --shadow-md: 0 8px 24px rgba(30, 58, 138, 0.08);
    
    --gradient-blue-pink: linear-gradient(135deg, #1e3a8a 0%, #ec4899 100%);
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Kanit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding-top: 95px;
    overflow-x: hidden;
}

section, .page-section, .slider-container {
    scroll-margin-top: 110px;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.1);
    z-index: 1000;
    border-bottom: 3px solid var(--soft-pink);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.2rem;
}

.brand-logo-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    gap: 10px;
    padding: 4px 0;
}

.brand-img {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(236, 72, 153, 0.25));
    transition: transform 0.3s ease;
}

.brand-logo-block:hover .brand-img {
    transform: scale(1.04);
}

.brand-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.2;
}

.brand-title-sdg {
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--gradient-blue-pink);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.2px;
}

.brand-subtitle-lru {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-blue);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link i {
    color: var(--soft-blue);
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--light-pink-bg);
    color: var(--primary-pink);
}

.nav-link:hover i, .nav-link.active i {
    color: var(--primary-pink);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: var(--light-blue-bg);
}

/* HERO SLIDER */
.slider-container {
    max-width: 1400px;
    margin: 1.2rem auto 2rem;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: clamp(250px, 40vh, 400px);
    width: calc(100% - 2.4rem);
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active { opacity: 1; }

.slide-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.85), rgba(236, 72, 153, 0.75));
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 0 20px;
    max-width: 900px;
}

.slide-content h2 { 
    font-size: clamp(1.4rem, 4vw, 2.2rem); 
    font-weight: 700; 
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    line-height: 1.3;
}

.slide-content p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 300;
    color: #f3f4f6;
}

/* MAIN CONTAINER & SECTIONS */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.2rem 3rem;
}

.sdg-intro {
    background: #ffffff;
    padding: clamp(1.2rem, 3vw, 2.2rem);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border-left: 6px solid var(--primary-pink);
    background-image: linear-gradient(to right, #ffffff, #fff0f6);
}

.sdg-intro h2 {
    color: var(--primary-blue);
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 700;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

.sdg-intro h2 i { color: var(--primary-pink); }

.sdg-intro p {
    color: var(--text-main);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    line-height: 1.7;
    font-weight: 300;
    text-align: justify;
}

.sdg-section-box {
    background: #ffffff;
    border-radius: 24px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.08), 0 5px 15px rgba(236, 72, 153, 0.06);
    border: 2px solid rgba(244, 114, 182, 0.2);
    position: relative;
    margin-bottom: 3rem;
}

.sdg-section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sdg-section-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--primary-blue);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding-bottom: 10px;
}

.sdg-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-blue-pink);
    border-radius: 2px;
}

/* 17 SDGs GRID */
.sdg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.sdg-card {
    border-radius: 18px;
    color: #ffffff;
    padding: 1.4rem 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
}

.sdg-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.sdg-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.sdg-number {
    font-size: 1.3rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.22);
    padding: 4px 12px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
}

.sdg-icon {
    font-size: 2.2rem;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.sdg-card:hover .sdg-icon {
    transform: scale(1.15) rotate(5deg);
}

.sdg-title {
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.96);
}

/* PAGE SECTIONS */
.page-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem clamp(1.2rem, 3vw, 2.5rem);
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.page-section-title {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--light-pink-bg);
    padding-bottom: 0.5rem;
}

.page-section-title i {
    color: var(--primary-pink);
}

.content-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 1.2rem;
}

.info-card {
    background: var(--light-blue-bg);
    padding: 1.2rem;
    border-radius: 14px;
    border-left: 4px solid var(--soft-blue);
}

.info-card h4 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

/* FOOTER */
.site-footer {
    background: linear-gradient(135deg, #111827 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 3rem 0 1.5rem;
    border-top: 5px solid var(--primary-pink);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h3::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 40px; height: 3px; background: var(--primary-pink); border-radius: 2px;
}

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.contact-item { display: flex; gap: 10px; color: #cbd5e1; font-size: 0.88rem; }
.contact-item i { color: var(--soft-pink); margin-top: 4px; flex-shrink: 0; }
.contact-item a { color: #cbd5e1; text-decoration: none; word-break: break-all; }

.map-wrapper {
    height: 180px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(236, 72, 153, 0.4);
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.85rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .sdg-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
    .footer-col:last-child {
        grid-column: span 2;
    }
    
    .menu-toggle { display: block; }

    .nav-menu {
        position: fixed; 
        top: 65px; 
        left: -100%; 
        width: 100%;
        height: calc(100vh - 65px); 
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column; 
        padding: 1.5rem 1.2rem; 
        transition: left 0.35s ease-in-out;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        align-items: stretch;
        overflow-y: auto;
    }

    .nav-menu.active { left: 0; }

    .nav-link {
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 12px;
    }
}

@media (max-width: 640px) {
    body { padding-top: 80px; }
    
    .slider-container {
        width: calc(100% - 1.6rem);
        margin-top: 0.8rem;
    }

    .sdg-grid {
        grid-template-columns: 1fr;
    }

    .sdg-card {
        min-height: auto;
        padding: 1.1rem 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .footer-col:last-child {
        grid-column: span 1;
    }
}
/* ==========================================
   NEWS FEED STYLES (ส่วนฟีดข่าวรอบรั้วมหาวิทยาลัย)
   ========================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 1.8rem;
}

.news-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 28px rgba(30, 58, 138, 0.12);
}

.news-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.news-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img-wrapper img {
    transform: scale(1.08);
}

.news-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient-blue-pink);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.news-body {
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-meta i {
    color: var(--soft-pink);
}

.news-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-blue);
    line-height: 1.45;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.news-card:hover .news-card-title {
    color: var(--primary-pink);
}

.news-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.news-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 0.8rem;
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.btn-news-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-pink);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-news-more:hover {
    color: var(--primary-blue);
    transform: translateX(4px);
}