:root {
        --primary-color: #3498db;
        --secondary-color: #2980b9;
        --accent-color: #e74c3c;
        --dark-color: #2c3e50;
        --light-color: #ecf0f1;
        --text-color: #2c3e50;
        --male-color: #3498db;
        --female-color: #e74c3c;
        --success-color: #27ae60;
        --warning-color: #f39c12;
    }

    body {
        font-family: 'Prompt', sans-serif;
        line-height: 1.6;
        color: var(--text-color);
        padding-top: 70px; /* เพิ่มขึ้นเล็กน้อยเพื่อให้พอดีกับ navbar */
    }

    .container[style*="margin-top"] {
        margin-top: 0 !important;
        padding-top: 1rem;
    }

    .navbar-brand {
        font-weight: 700;
        color: var(--primary-color) !important;
    }

    .nav-link {
        font-weight: 500;
        color: var(--text-color) !important;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        color: var(--primary-color) !important;
        transform: translateY(-2px);
    }

    /* Hero Section */
    .hero-section {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        min-height: 100vh;
        display: flex;
        align-items: center;
        position: relative;
        overflow: hidden;
    }

    .hero-content {
        position: relative;
        z-index: 2;
    }

    .hero-title {
        font-size: 4rem;
        font-weight: 700;
        color: white;
        margin-bottom: 1.5rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    .hero-subtitle {
        font-size: 1.5rem;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 2rem;
    }

    .hero-stats {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: 2rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .stat-item {
        text-align: center;
        color: white;
    }

    .stat-number {
        font-size: 3rem;
        font-weight: 700;
        display: block;
    }

    .stat-label {
        font-size: 1rem;
        opacity: 0.9;
    }

    /* Banner Carousel */
    /* Banner Carousel - ปรับความสูงเหลือ 450px และกว้างเต็มหน้าจอ */
    /* Banner Carousel - ความสูง 450px และความกว้างเท่า container */
.banner-slide {
    position: relative;
    width: 100%;
    height: 450px; /* กำหนดความสูงคงที่ 450px */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: transparent; /* ลบสีเทา */
    background-repeat: no-repeat !important;
    background-size: cover !important; /* ให้ภาพเต็มพื้นที่ */
    background-position: center !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ปรับ container ให้ขนาดเท่ากับ container ของ content */
.banner-carousel .container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.banner-carousel {
    margin-top: -80px;
    position: relative;
    z-index: 3;
    padding: 0 15px; /* เพิ่ม padding เล็กน้อย */
}

/* Responsive Design */
@media (min-width: 576px) {
    .banner-carousel .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .banner-carousel .container {
        max-width: 720px;
    }
    
    .banner-carousel {
        padding: 0; /* ลบ padding ในหน้าจอใหญ่ */
    }
}

@media (min-width: 992px) {
    .banner-carousel .container {
        max-width: 960px;
    }
    
    .banner-slide {
        border-radius: 15px; /* คืน border-radius ในหน้าจอใหญ่ */
    }
}

@media (min-width: 1200px) {
    .banner-carousel .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .banner-carousel .container {
        max-width: 1320px;
    }
}

/* ปรับความสูงตาม responsive */
@media (max-width: 1400px) {
    .banner-slide {
        height: 400px;
    }
}

@media (max-width: 1200px) {
    .banner-slide {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .banner-slide {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .banner-slide {
        height: 250px;
    }
    
    .banner-carousel {
        margin-top: -80px;
        padding: 0 5px;
    }
}

@media (max-width: 576px) {
    .banner-slide {
        height: 200px;
    }
    
    .banner-carousel {
        margin-top: -60px;
        padding: 0;
    }
}

/* Carousel Caption adjustments */
.carousel-caption-content {
    transform: translateY(10px);
    opacity: 0;
    animation: slideUpFade 0.8s ease-out 0.3s forwards;
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-caption {
    background: linear-gradient(
        transparent 0%, 
        transparent 40%, 
        rgba(0, 0, 0, 0.1) 60%, 
        rgba(0, 0, 0, 0.4) 80%, 
        rgba(0, 0, 0, 0.7) 100%
    );
}

/* ปรับ carousel controls ให้เหมาะสม */
.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 8%;
    }
}

/* ปรับ indicators */
.carousel-indicators {
    margin-bottom: 1.5rem;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.carousel-indicators .active {
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
}

@media (max-width: 768px) {
    .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
        margin: 0 3px;
    }
    
    .carousel-indicators {
        margin-bottom: 1.2rem;
    }
}

/*สิ้นสุดส่วน Slider ด้านบน*/

/* ปรับ hero section ให้เหมาะกับความสูงของ banner ที่ลดลง */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh; /* ลดจาก 120vh กลับเป็น 100vh */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh; /* คงเดิม */
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 100vh;
    }
}

    /* สิ้นสุด banner */
    /* Section Styles */
    .section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--text-color);
        text-align: center;
        margin-bottom: 3rem;
        position: relative;
    }

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
        height: 4px;
        background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
        border-radius: 2px;
    }

    /* Student Statistics Section */
    .summary-stats-card {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        border-radius: 20px;
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
        overflow: hidden;
        position: relative;
    }

    .summary-stats-card::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: float 6s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% {
            transform: translate(0, 0) rotate(0deg);
        }
        50% {
            transform: translate(-20px, -20px) rotate(180deg);
        }
    }

    .summary-stat-item {
        padding: 1.5rem;
        position: relative;
        z-index: 2;
    }

    .summary-stat-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        color: rgba(255, 255, 255, 0.9);
    }

    .summary-stat-number {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: white;
    }

    .summary-stat-label {
        font-size: 1rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 0;
    }

    /* Students Table Card */
    .students-table-card {
        border: none;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .students-table-card .card-header {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        border: none;
        padding: 1.5rem;
        font-weight: 600;
    }

    .students-table-card .card-header h5 {
        margin: 0;
        font-size: 1.2rem;
    }

    /* Students Table */
    .students-table {
        font-size: 0.95rem;
        border-collapse: separate;
        border-spacing: 0;
    }

    .students-table thead th {
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        color: var(--text-color);
        font-weight: 600;
        border: none;
        padding: 1rem 0.8rem;
        position: sticky;
        top: 0;
        z-index: 10;
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .students-table tbody tr {
        transition: all 0.3s ease;
        border-bottom: 1px solid #f1f3f4;
    }

    .students-table tbody tr:hover {
        background: linear-gradient(135deg, #f8f9ff, #f0f4ff);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    }

    .students-table tbody td {
        padding: 1rem 0.8rem;
        border: none;
        vertical-align: middle;
    }

    .students-table tbody tr:nth-child(odd) {
        background: rgba(248, 249, 250, 0.5);
    }

    /* Grade Level Badge */
    .grade-level-cell {
        position: relative;
    }

    .grade-level-badge {
        display: inline-block;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 25px;
        font-weight: 600;
        font-size: 0.9rem;
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
        transition: all 0.3s ease;
    }

    .grade-level-badge:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    }

    /* Student Count Styling */
    .student-count {
        display: inline-block;
        padding: 0.4rem 0.8rem;
        border-radius: 15px;
        font-weight: 600;
        font-size: 1rem;
        min-width: 60px;
        text-align: center;
    }

    .male-count {
        background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.2));
        color: var(--male-color);
        border: 2px solid rgba(52, 152, 219, 0.3);
    }

    .female-count {
        background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.2));
        color: var(--female-color);
        border: 2px solid rgba(231, 76, 60, 0.3);
    }

    .total-count {
        background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(39, 174, 96, 0.2));
        color: var(--success-color);
        border: 2px solid rgba(39, 174, 96, 0.3);
        font-weight: 700;
    }

    /* Percentage Container */
    .percentage-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .percentage-text {
        font-weight: 600;
        color: var(--text-color);
        font-size: 0.9rem;
    }

    .percentage-bar {
        width: 80px;
        height: 8px;
        background: #e9ecef;
        border-radius: 4px;
        overflow: hidden;
        position: relative;
    }

    .percentage-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
        border-radius: 4px;
        transition: width 1.5s ease-in-out;
        position: relative;
    }

    .percentage-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        animation: shimmer 2s infinite;
    }

    @keyframes shimmer {
        0% {
            transform: translateX(-100%);
        }
        100% {
            transform: translateX(100%);
        }
    }

    /* Table Summary Row */
    .table-summary {
        background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
        border-top: 3px solid var(--primary-color);
    }

    .table-summary td {
        padding: 1.2rem 0.8rem !important;
        font-weight: 600 !important;
        color: var(--text-color) !important;
    }

    /* Cards */
    .card {
        border: none;
        border-radius: 15px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        overflow: hidden;
    }

    .card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }

    .news-card {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .news-image {
        height: 160px;
        background-size: cover;
        background-position: center;
        background-color: #f8f9fa;
        flex-shrink: 0;
    }

    .news-card .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 1rem;
    }

    .news-category {
        background: var(--primary-color);
        color: white;
        padding: 0.2rem 0.6rem;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80px;
    }

    .news-date {
        color: #6c757d;
        font-size: 0.75rem;
    }

    .news-title {
        font-weight: 600;
        color: var(--text-color);
        line-height: 1.3;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 0;
    }

    .news-excerpt {
        color: #6c757d;
        font-size: 0.8rem;
        line-height: 1.4;
        flex: 1;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 0.8rem;
    }

    .news-card .btn {
        margin-top: auto;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* Personnel Organization Chart */
    .org-chart {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .org-level {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
        position: relative;
    }

    .org-level-0 {
        /* ผู้อำนวยการ */
        margin-bottom: 2rem;
    }

    .org-level-1 {
        /* รองผู้อำนวยการ */
        margin-bottom: 2rem;
    }

    .org-level:not(.org-level-0):not(.org-level-1) {
        /* หัวหน้าฝ่าย/ครู */
        max-width: 1200px;
    }

    .personnel-card {
        text-align: center;
        background: white;
        border-radius: 20px;
        padding: 2rem 1.5rem;
        width: 280px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        position: relative;
    }

    .personnel-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    .personnel-avatar {
        width: 200px;
        height: 200px;
        border-radius: 5px;
        margin: 0 auto 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 3rem;
        color: white;
        overflow: hidden;
        border: 1px solid var(--primary-color);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .personnel-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        border-radius: 0%;
    }

    .personnel-avatar.default {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    }

    .personnel-name {
        font-weight: 600;
        color: var(--text-color);
        margin-bottom: 0.5rem;
        font-size: 1.0rem;
    }

    .personnel-position {
        color: var(--primary-color);
        font-weight: 500;
        font-size: 0.9rem;
        background: rgba(52, 152, 219, 0.1);
        padding: 0.5rem 1rem;
        border-radius: 10px;
        display: inline-block;
    }

    /* Organization chart connecting lines */
    .org-chart::before {
        content: '';
        position: absolute;
        top: 180px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 80px;
        background: linear-gradient(to bottom, var(--primary-color), transparent);
        z-index: 1;
    }

    .org-level-1::before {
        content: '';
        position: absolute;
        top: -40px;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(to right, transparent, var(--primary-color), transparent);
        z-index: 1;
    }

    /* Level indicators */
    .level-indicator {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-bottom: 2rem;
        position: relative;
    }

    .level-title {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        padding: 0.8rem 2rem;
        border-radius: 30px;
        font-weight: 600;
        font-size: 1.1rem;
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
        position: relative;
        z-index: 2;
    }

    .level-line {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(to right, transparent, var(--primary-color), transparent);
        z-index: 1;
    }

    /* Event Timeline */
    .event-item {
        background: white;
        border-radius: 10px;
        padding: 1.5rem;
        margin-bottom: 1rem;
        border-left: 4px solid var(--primary-color);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .event-date {
        background: var(--primary-color);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.9rem;
        font-weight: 500;
        display: inline-block;
        margin-bottom: 1rem;
    }

    .event-title {
        font-weight: 600;
        color: var(--text-color);
        margin-bottom: 0.5rem;
    }

    .event-details {
        color: #6c757d;
        font-size: 0.9rem;
    }

    /* Footer */
    .footer {
        background: var(--dark-color);
        color: white;
        padding: 3rem 0 1rem;
    }

    .footer-section h5 {
        color: var(--primary-color);
        margin-bottom: 1.5rem;
        font-weight: 600;
    }

    .footer-link {
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        transition: all 0.3s ease;
        display: block;
        padding: 0.3rem 0;
    }

    .footer-link:hover {
        color: var(--primary-color);
        transform: translateX(5px);
    }

    .social-links a {
        display: inline-block;
        width: 40px;
        height: 40px;
        background: var(--primary-color);
        color: white;
        text-align: center;
        line-height: 40px;
        border-radius: 50%;
        margin-right: 0.5rem;
        transition: all 0.3s ease;
    }

    .social-links a:hover {
        background: var(--accent-color);
        transform: translateY(-3px);
    }

    /* Responsive Design */
    @media (max-width: 1400px) {
        /* XL screens - 6 items per row */
        .news-image {
            height: 150px;
        }
        
        .news-title {
            font-size: 0.85rem;
        }
        
        .news-excerpt {
            font-size: 0.75rem;
        }
    }

    @media (max-width: 1200px) {
        /* Large screens - 4 items per row */
        .news-image {
            height: 160px;
        }
        
        .news-title {
            font-size: 0.9rem;
        }
        
        .news-excerpt {
            font-size: 0.8rem;
        }
    }

    @media (max-width: 992px) {
        /* Medium screens - 3 items per row */
        .students-table {
            font-size: 0.85rem;
        }

        .students-table th,
        .students-table td {
            padding: 0.8rem 0.5rem;
        }

        .grade-level-badge {
            font-size: 0.8rem;
            padding: 0.4rem 0.8rem;
        }

        .student-count {
            font-size: 0.9rem;
            padding: 0.3rem 0.6rem;
            min-width: 50px;
        }

        .percentage-bar {
            width: 60px;
            height: 6px;
        }
        
        .news-image {
            height: 180px;
        }
        
        .news-title {
            font-size: 1rem;
        }
        
        .news-excerpt {
            font-size: 0.85rem;
        }
        
        .news-category {
            font-size: 0.75rem;
            max-width: 100px;
        }
    }

    @media (max-width: 768px) {
        /* Small screens - 2 items per row */
        .hero-title {
            font-size: 2.5rem;
        }

        .hero-subtitle {
            font-size: 1.2rem;
        }

        .section {
            padding: 50px 0;
        }

        .section-title {
            font-size: 2rem;
        }

        .stat-number {
            font-size: 2rem;
        }

        .personnel-card {
            width: 100%;
            max-width: 300px;
        }

        .org-level {
            flex-direction: column;
            align-items: center;
        }

        .summary-stat-number {
            font-size: 2rem;
        }

        .summary-stat-icon {
            font-size: 2.5rem;
        }

        /* Mobile table adjustments */
        .students-table-card {
            margin: 0 -15px;
            border-radius: 0;
        }

        .students-table {
            font-size: 0.75rem;
        }

        .students-table th,
        .students-table td {
            padding: 0.6rem 0.3rem;
        }

        .grade-level-badge {
            font-size: 0.7rem;
            padding: 0.3rem 0.6rem;
        }

        .student-count {
            font-size: 0.8rem;
            padding: 0.2rem 0.4rem;
            min-width: 40px;
        }

        .percentage-container {
            gap: 0.3rem;
        }

        .percentage-bar {
            width: 50px;
            height: 5px;
        }

        .percentage-text {
            font-size: 0.8rem;
        }
        
        /* News cards on mobile */
        .news-image {
            height: 160px;
        }
        
        .news-title {
            font-size: 0.9rem;
        }
        
        .news-excerpt {
            font-size: 0.8rem;
        }
        
        .news-card .card-body {
            padding: 0.8rem;
        }
        
        .news-category {
            font-size: 0.7rem;
            padding: 0.2rem 0.5rem;
            max-width: 90px;
        }
        
        .news-date {
            font-size: 0.7rem;
        }
    }

    @media (max-width: 576px) {
        /* Extra small screens - 1 item per row */
        .summary-stats-card .row > div {
            margin-bottom: 1rem;
        }

        .students-table th:first-child,
        .students-table td:first-child {
            display: none; /* Hide row numbers on very small screens */
        }

        .students-table th,
        .students-table td {
            padding: 0.5rem 0.2rem;
            text-align: center;
        }

        .grade-level-cell {
            text-align: left;
        }
        
        /* Single column news layout on very small screens */
        .news-image {
            height: 200px;
        }
        
        .news-title {
            font-size: 1rem;
        }
        
        .news-excerpt {
            font-size: 0.85rem;
            -webkit-line-clamp: 4;
        }
        
        .news-card .card-body {
            padding: 1rem;
        }
        
        .news-category {
            font-size: 0.75rem;
            padding: 0.3rem 0.6rem;
            max-width: none;
        }
        
        .news-date {
            font-size: 0.75rem;
        }
    }

    /* Modal Content Styles */
    #itaMenuModalContent img,
    #newsModalContent img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    #itaMenuModalContent table,
    #newsModalContent table {
        width: 100%;
        font-size: 0.9rem;
        border-collapse: collapse;
    }

    #itaMenuModalContent table th,
    #itaMenuModalContent table td,
    #newsModalContent table th,
    #newsModalContent table td {
        padding: 0.5rem;
        border: 1px solid #dee2e6;
        word-wrap: break-word;
    }

    #itaMenuModalContent .table-responsive,
    #newsModalContent .table-responsive {
        overflow-x: auto;
        margin: 1rem 0;
    }

    /* Custom Modal Styles */
    .modal-xl {
        max-width: 90vw;
    }

    .modal-content {
        border-radius: 15px;
        border: none;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    .modal-header {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding: 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
        line-height: 1.6;
    }

    /* Responsive adjustments for modal content */
    @media (max-width: 768px) {
        .modal-xl {
            max-width: 95vw;
        }

        .modal-body {
            padding: 1rem;
            max-height: 70vh;
        }

        #itaMenuModalContent table,
        #newsModalContent table {
            font-size: 0.8rem;
        }
    }

    /* Animations */
    .fade-in {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 1s ease forwards;
    }

    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Loading Overlay */
    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        transition: opacity 0.5s ease;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-top: 3px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    /* About Content Styles */
    .about-content {
        line-height: 1.5;
        color: var(--text-color);
    }

    .about-content img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        margin: 1rem 0;
        display: block;
        object-fit: cover;
    }

    .about-content p {
        margin-bottom: 1.2rem;
        text-align: left;
    }

    .about-content h1,
    .about-content h2,
    .about-content h3,
    .about-content h4,
    .about-content h5,
    .about-content h6 {
        color: var(--primary-color);
        margin: 1.5rem 0 1rem 0;
        font-weight: 100;
    }

    .about-content ul,
    .about-content ol {
        margin: 1rem 0;
        padding-left: 2rem;
    }

    .about-content li {
        margin-bottom: 0.5rem;
    }

    .about-content table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.5rem 0;
        font-size: 0.95rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        overflow: hidden;
    }

    .about-content table th,
    .about-content table td {
        padding: 0.8rem;
        border: 1px solid #dee2e6;
        text-align: left;
    }

    .about-content table th {
        background: var(--primary-color);
        color: white;
        font-weight: 600;
    }

    .about-content table tr:nth-child(even) {
        background-color: #f8f9fa;
    }

    /* Enhanced about content styles */
    .info-stats .stat-row {
        padding: 0.8rem;
        background: rgba(52, 152, 219, 0.1);
        border-radius: 10px;
        border-left: 4px solid var(--primary-color);
    }

    .info-stats .stat-row strong {
        color: var(--text-color);
        font-size: 0.9rem;
    }

    .info-stats .stat-row .text-primary {
        font-size: 1.2rem;
        font-weight: 600;
    }

    .quick-links a {
        color: var(--text-color);
        padding: 0.8rem;
        background: rgba(52, 152, 219, 0.05);
        border-radius: 8px;
        transition: all 0.3s ease;
        border: 1px solid rgba(52, 152, 219, 0.1);
    }

    .quick-links a:hover {
        background: rgba(52, 152, 219, 0.1);
        color: var(--primary-color);
        transform: translateX(5px);
        border-color: var(--primary-color);
    }

    .quick-links a i {
        color: var(--primary-color);
        width: 20px;
    }

    .about-content {
        position: relative;
        overflow: hidden;
    }

    .about-content figure {
        margin: 1.5rem 0;
        text-align: center;
    }

    .about-content figure img {
        max-width: 100%;
        height: auto;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .about-content figcaption {
        font-size: 0.9rem;
        color: #6c757d;
        margin-top: 0.5rem;
        font-style: italic;
    }

    .about-content blockquote {
        border-left: 4px solid var(--primary-color);
        background: rgba(52, 152, 219, 0.05);
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
        border-radius: 0 8px 8px 0;
        font-style: italic;
    }

    .about-content blockquote p:last-child {
        margin-bottom: 0;
    }

    .about-content .table-responsive {
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin: 1.5rem 0;
    }

    .about-content strong,
    .about-content b {
        color: var(--primary-color);
        font-weight: 600;
    }

    .about-content em,
    .about-content i {
        color: var(--secondary-color);
    }

    .about-content a {
        color: var(--primary-color);
        text-decoration: none;
        border-bottom: 1px dotted var(--primary-color);
        transition: all 0.3s ease;
    }

    .about-content a:hover {
        color: var(--secondary-color);
        border-bottom-style: solid;
    }

    /* Table Animation on Load */
    .students-table tbody tr {
        opacity: 0;
        transform: translateY(20px);
        animation: slideInUp 0.6s ease forwards;
    }

    .students-table tbody tr:nth-child(1) { animation-delay: 0.1s; }
    .students-table tbody tr:nth-child(2) { animation-delay: 0.2s; }
    .students-table tbody tr:nth-child(3) { animation-delay: 0.3s; }
    .students-table tbody tr:nth-child(4) { animation-delay: 0.4s; }
    .students-table tbody tr:nth-child(5) { animation-delay: 0.5s; }
    .students-table tbody tr:nth-child(n+6) { animation-delay: 0.6s; }

    @keyframes slideInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Additional responsive adjustments */
    @media (max-width: 991px) {
        .about-content {
            margin-top: 2rem;
        }
    }

    @media (max-width: 576px) {
        .info-stats .stat-row {
            padding: 0.6rem;
        }

        .info-stats .stat-row .text-primary {
            font-size: 1.1rem;
        }

        .quick-links a {
            padding: 0.6rem;
            font-size: 0.9rem;
        }
    }

        .news-actions {
        display: flex;
        gap: 8px;
        margin-top: auto;
    }

    .news-card .card-body {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .news-excerpt {
        flex-grow: 1;
        margin-bottom: 1rem;
    }

    .btn-quick-view {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
    }

    .btn-quick-view:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
        color: white;
        transform: translateY(-1px);
    }

    .btn-full-read {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        border: none;
        color: white;
    }

    .btn-full-read:hover {
        background: linear-gradient(135deg, #ee7ae9 0%, #f3455a 100%);
        color: white;
        transform: translateY(-1px);
    }

    .news-actions .btn {
        flex: 1;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        transition: all 0.3s ease;
    }

    @media (max-width: 768px) {
        .news-actions {
            flex-direction: column;
        }
    }

        /* Custom Menu Styles */
    .custom-menu-link {
        padding: 0.5rem 0;
        border-radius: 6px;
        transition: all 0.3s ease;
    }

    .custom-menu-link:hover {
        background-color: #f8f9fa;
        padding-left: 0.5rem;
        color: var(--primary-color) !important;
    }

    .custom-image-menu-item {
        text-align: center;
        padding: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        transition: all 0.3s ease;
        background: #fff;
        position: relative;
        overflow: hidden;
    }

    .custom-image-menu-item:hover {
        border-color: var(--primary-color);
        box-shadow: 0 4px 12px rgba(0,123,255,0.15);
        transform: translateY(-2px);
    }

    .custom-menu-image {
        width: 60px;
        height: 60px;
        margin: 0 auto 0.5rem;
        border-radius: 8px;
        overflow: hidden;
        border: 2px solid #f1f3f4;
    }

    .custom-menu-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .custom-menu-name {
        font-size: 0.875rem;
        font-weight: 500;
        color: #495057;
        line-height: 1.3;
    }

    .custom-image-menu-link:hover .custom-menu-name {
        color: var(--primary-color);
    }

    /* Responsive adjustments */
    @media (max-width: 576px) {
        .custom-image-menus .col-6 {
            margin-bottom: 1rem;
        }
        
        .custom-image-menu-item {
            padding: 0.75rem;
        }
        
        .custom-menu-image {
            width: 50px;
            height: 50px;
        }
        
        .custom-menu-name {
            font-size: 0.8rem;
        }
    }

    /* Animation effects */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .custom-image-menu-item {
        animation: fadeInUp 0.6s ease forwards;
    }

    /* Hover effect for image menus */
    .custom-image-menu-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, transparent, rgba(0,123,255,0.1));
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: 8px;
    }

    .custom-image-menu-item:hover::before {
        opacity: 1;
    }

    /* Icon animation for text menus */
    .custom-menu-link .bx-chevron-right {
        transition: transform 0.3s ease;
    }

    .custom-menu-link:hover .bx-chevron-right {
        transform: translateX(5px);
    }

/* Custom Image Menu Simple Styles - เฉพาะรูปภาพ */
.custom-image-menu-item-simple {
    display: block;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    margin-bottom: 0.75rem;
}

.custom-image-menu-item-simple:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
    transform: translateY(-2px);
}

.custom-menu-image-simple {
    width: 100%;
    height: 60px;
    object-fit: cover;
    display: block;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.custom-image-menu-link:hover .custom-menu-image-simple {
    transform: scale(1.02);
}

/* Hover effect */
.custom-image-menu-item-simple::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0,123,255,0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.custom-image-menu-item-simple:hover::before {
    opacity: 1;
}

.custom-image-menu-item-simple {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .custom-menu-image-simple {
        height: 45px;
    }
    
    .custom-image-menu-item-simple {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 400px) {
    .custom-menu-image-simple {
        height: 40px;
    }
}

/* Animation effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-image-menu-item-simple {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* Stagger animation delay for multiple items */
.custom-image-menu-item-simple:nth-child(1) { animation-delay: 0.1s; }
.custom-image-menu-item-simple:nth-child(2) { animation-delay: 0.2s; }
.custom-image-menu-item-simple:nth-child(3) { animation-delay: 0.3s; }
.custom-image-menu-item-simple:nth-child(4) { animation-delay: 0.4s; }
.custom-image-menu-item-simple:nth-child(5) { animation-delay: 0.5s; }

/* Focus state for accessibility */
.custom-image-menu-link:focus .custom-image-menu-item-simple {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading state */
.custom-menu-image-simple {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

.custom-menu-image-simple:not([src]) {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

    /* Header Image Styles */
    .header-image-section {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        min-height: 300px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 0; /* เปลี่ยนจาก 80px เป็น 0 */
        border-radius: 0 0 15px 15px;
        overflow: hidden;
    }


    .header-image-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        /*background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 0%) */;
    }

    .header-content {
        position: relative;
        z-index: 2;
        text-align: center;
        color: white;
        padding: 2rem;
    }

    .header-title {
        font-size: 3rem;
        font-weight: 700;
        margin-bottom: 1rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    .header-subtitle {
        font-size: 1.2rem;
        font-weight: 400;
        opacity: 0.95;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }

    /* Sidebar Styles */
    .sidebar-section {
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin-bottom: 2rem;
        overflow: hidden;
    }

    .sidebar-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 1rem;
        font-weight: 600;
    }

    .news-list-item {
        padding: 1rem;
        border-bottom: 1px solid #eee;
        transition: background-color 0.3s ease;
    }

    .news-list-item:hover {
        background-color: #f8f9fa;
    }

    .news-list-item:last-child {
        border-bottom: none;
    }

    .news-list-thumb {
        width: 60px;
        height: 45px;
        background-size: cover;
        background-position: center;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .category-item {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: background-color 0.3s ease;
        text-decoration: none;
        color: inherit;
    }

    .category-item:hover {
        background-color: #f8f9fa;
        color: inherit;
        text-decoration: none;
    }

    .category-item:last-child {
        border-bottom: none;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .header-title {
            font-size: 2rem;
        }

        .header-subtitle {
            font-size: 1rem;
        }

        .header-image-section {
            min-height: 200px;
            margin-top: 70px;
        }
    }

    /* Quick stats cards */
    .quick-stats {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 10px;
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .stat-item {
        text-align: center;
    }

    .stat-number {
        font-size: 2rem;
        font-weight: 700;
        display: block;
    }

    .stat-label {
        font-size: 0.9rem;
        opacity: 0.9;
    }

    /* Content cards styling */
    .content-card {
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin-bottom: 2rem;
        overflow: hidden;
    }

    .content-card-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 1rem;
        font-weight: 600;
    }

    .personnel-mini-card {
        text-align: center;
        padding: 1rem;
        margin-bottom: 1rem;
        background: #f8f9fa;
        border-radius: 8px;
        transition: transform 0.3s ease;
    }

    .personnel-mini-card:hover {
        transform: translateY(-2px);
    }

    .personnel-mini-avatar {
        width: 60px;
        height: 60px;
        border-radius: 10px;
        margin: 0 auto 0.5rem;
        background-size: cover;
        background-position: top center;
        background-color: #dee2e6;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .personnel-mini-name {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .personnel-mini-position {
        font-size: 0.8rem;
        color: #6c757d;
    }

    .event-mini-item {
        padding: 0.75rem;
        border-left: 4px solid #667eea;
        background: #f8f9fa;
        border-radius: 0 8px 8px 0;
        margin-bottom: 0.75rem;
    }

    .event-mini-date {
        font-size: 0.8rem;
        color: #667eea;
        font-weight: 600;
    }

    .event-mini-title {
        font-size: 0.9rem;
        font-weight: 600;
        margin: 0.25rem 0;
    }

    .navbar-brand {
        font-weight: 700;
        color: white !important;
    }

    .nav-link {
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9) !important;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        color: white !important;
        transform: translateY(-2px);
    }

    .nav-link.active {
        color: white !important;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }

    /* Dropdown menu styles */
    .navbar .dropdown-menu {
        max-height: 400px;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0.5rem 0;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 10px;
    }

    .navbar .dropdown-menu::-webkit-scrollbar {
        width: 6px;
    }

    .navbar .dropdown-menu::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .navbar .dropdown-menu::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

    .navbar .dropdown-menu::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

    .navbar .dropdown-item {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
        transition: all 0.2s ease;
    }

    .navbar .dropdown-item:hover {
        background-color: #f8f9fa;
        padding-left: 2rem;
    }

    .navbar .dropdown-item i {
        width: 20px;
        text-align: center;
    }

    .dropdown-toggle::after {
        margin-left: 0.5em;
        vertical-align: 0.125em;
    }

    .dropdown-divider {
        margin: 0.25rem 0;
        opacity: 0.3;
    }

    @media (max-width: 768px) {
        .navbar .dropdown-menu {
            max-height: 300px;
            position: static !important;
            transform: none !important;
            margin-top: 0.5rem;
        }
    }

    /* Navbar Styles - แก้ไขให้แสดงผลบนมือถือ */
        .navbar {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%) !important;
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 25px rgba(102, 126, 234, 0.3);
            transition: all 0.3s ease;
            position: fixed !important;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1050;
            height: auto;
            min-height: 70px;
        }

        .navbar-brand {
            font-weight: 700;
            color: white !important;
            font-size: 1.2rem;
        }

        .navbar-toggler {
            border: 2px solid rgba(255, 255, 255, 0.8) !important;
            border-radius: 8px !important;
            padding: 0.4rem 0.6rem !important;
            background: rgba(255, 255, 255, 0.1) !important;
            backdrop-filter: blur(5px);
            position: relative;
            z-index: 1051;
        }

        .navbar-toggler:focus {
            box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.3) !important;
            border-color: rgba(255, 255, 255, 1) !important;
        }

        .navbar-toggler:hover {
            background: rgba(255, 255, 255, 0.2) !important;
            border-color: rgba(255, 255, 255, 1) !important;
        }

        .navbar-toggler-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
            width: 1.5rem !important;
            height: 1.5rem !important;
        }

        .nav-link {
            font-weight: 500;
            color: rgba(255, 255, 255, 0.9) !important;
            transition: all 0.3s ease;
            padding: 0.8rem 1rem !important;
            border-radius: 8px;
            margin: 0.2rem 0;
        }

        .nav-link:hover {
            color: white !important;
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(5px);
        }

        .nav-link.active {
            color: white !important;
            background: rgba(255, 255, 255, 0.2);
        }

        /* Dropdown styles */
        .dropdown-menu {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            max-height: 300px;
            overflow-y: auto;
        }

        .dropdown-item {
            color: #333 !important;
            padding: 0.8rem 1.5rem;
            transition: all 0.3s ease;
            border-radius: 8px;
            margin: 0.2rem;
        }

        .dropdown-item:hover {
            background: rgba(102, 126, 234, 0.1);
            color: #667eea !important;
            transform: translateX(5px);
        }

        /* Mobile specific styles */
        @media (max-width: 991.98px) {
            .navbar-toggler {
                display: block !important;
                margin-left: auto;
            }
            
            .navbar-collapse {
                transition: all 0.3s ease-in-out !important;
            }

            .navbar-collapse.show {
                animation: slideDown 0.3s ease-in-out;
            }

            
            /* Mobile Nav Links */
            .navbar-nav .nav-link {
                color: #333 !important;
                border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
                margin: 0 !important;
                border-radius: 0 !important;
                padding: 1rem 1.5rem !important;
                transition: all 0.3s ease;
            }
            
            .navbar-nav .nav-link:hover {
                color: #667eea !important;
                background: rgba(102, 126, 234, 0.1) !important;
                transform: translateX(0) !important;
                padding-left: 2rem !important;
            }
            
            /* Mobile Dropdown Menu */
            .navbar-nav .dropdown-menu {
                background: transparent !important;
                border: none !important;
                box-shadow: none !important;
                padding-left: 1rem !important;
                margin-top: 0 !important;
                position: static !important;
                transform: none !important;
            }
            
            .navbar-nav .dropdown-item {
                font-size: 0.9rem !important;
                padding: 0.6rem 1rem !important;
                color: #666 !important;
                border-radius: 8px !important;
                margin: 0.2rem 0 !important;
            }
            
            .navbar-nav .dropdown-item:hover {
                background: rgba(102, 126, 234, 0.1) !important;
                color: #667eea !important;
                transform: translateX(5px) !important;
            }
            
            /* Remove last border */
            .navbar-nav .nav-item:last-child .nav-link {
                border-bottom: none !important;
            }
        }

        /* Content styles */
        .hero-section {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            color: white;
            text-align: center;
        }

        .hero-title {
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .hero-subtitle {
            font-size: 1.2rem;
            margin-bottom: 2rem;
            opacity: 0.9;
        }

        /* ปรับ responsive */
        @media (max-width: 768px) {
            body {
                padding-top: 70px;
            }
            
            .hero-title {
                font-size: 2rem;
            }
            
            .hero-subtitle {
                font-size: 1rem;
            }
        }

        @media (max-width: 576px) {
            body {
                padding-top: 65px;
            }
            
            .navbar-brand {
                font-size: 1rem;
            }
            
            .hero-title {
                font-size: 1.8rem;
            }
        }

        /* Animation for mobile menu */
        .navbar-collapse {
            transition: all 0.3s ease-in-out;
        }

        .navbar-collapse.show {
            animation: slideDown 0.3s ease-in-out;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

/* ปรับระยะห่างข้อความกับขอบของปุ่มเมนู */

/* ปรับระยะห่างของปุ่มเมนูให้ชิดกันมากขึ้น */

/* ลบ gap และ margin ระหว่างเมนู */
.navbar-nav {
    gap: 0 !important; /* ลบระยะห่างระหว่างเมนูทั้งหมด */
}

/* ลด padding ของเมนูและลบ margin */
.navbar-nav .nav-link {
    padding: 0.4rem 0.5rem !important; /* ลด padding ซ้าย-ขวา */
    margin: 0 !important; /* ลบ margin ทั้งหมด */
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 0; /* ลบ border-radius เพื่อให้ชิดกัน */
}

/* ปรับ dropdown toggle ให้เหมือนกัน */
.navbar-nav .dropdown-toggle {
    padding: 0.4rem 0.5rem !important;
    margin: 0 !important;
    border-radius: 0;
}

/* ปรับ hover effect ให้ไม่มี margin */
.navbar-nav .nav-link:hover {
    transform: none; /* ลบ animation เลื่อน */
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
}

/* ปรับขนาดตามหน้าจอ แต่ยังคงชิดกัน */
@media (min-width: 576px) {
    .navbar-nav .nav-link {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.95rem;
    }
    
    .navbar-nav .dropdown-toggle {
        padding: 0.4rem 0.6rem !important;
    }
}

@media (min-width: 768px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.7rem !important;
        font-size: 1rem;
    }
    
    .navbar-nav .dropdown-toggle {
        padding: 0.5rem 0.7rem !important;
    }
}

@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
}

@media (min-width: 1200px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.9rem !important;
        font-size: 1rem;
    }
    
    .navbar-nav .dropdown-toggle {
        padding: 0.5rem 0.9rem !important;
    }
}

@media (min-width: 1400px) {
    .navbar-nav .nav-link {
        padding: 0.6rem 1rem !important;
        font-size: 1rem;
    }
    
    .navbar-nav .dropdown-toggle {
        padding: 0.6rem 1rem !important;
    }
}

/* ลบ border-radius ของ navbar items */
.navbar-nav .nav-item {
    margin: 0;
}

/* ปรับ active state ให้ไม่มี margin */
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    border-radius: 0;
}

/* ปรับ dropdown arrow ให้ชิดกว่าเดิม */
.dropdown-toggle::after {
    margin-left: 0.2rem; /* ลดจาก 0.3rem */
}

/* สำหรับเมนูที่มีไอคอน */
.nav-link i {
    margin-right: 0.2rem; /* ลดจาก 0.25rem */
}

/* ปรับ navbar container ให้ใช้พื้นที่เต็มที่ */
.navbar .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    max-width: 100%;
}

@media (min-width: 768px) {
    .navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 768px) {
    .navbar {
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
        min-height: 60px;
    }
}

/* แก้ไข Brand ให้ไม่ชนกับปุ่ม */
.navbar-brand {
    margin-right: 1rem !important;
    flex-grow: 1;
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 0.9rem !important;
        margin-right: 0.5rem !important;
    }
    
    .navbar-toggler {
        padding: 0.3rem 0.5rem !important;
    }
    
    .navbar-toggler-icon {
        width: 1.2rem !important;
        height: 1.2rem !important;
    }
}

/* สำหรับหน้าจอมือถือ */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.3rem 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.7rem 1rem !important;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        white-space: normal;
    }
    
    .navbar-nav .dropdown-toggle {
        padding: 0.7rem 1rem !important;
    }
    
    .navbar-collapse {
        margin-top: 0.3rem;
        padding: 0.5rem;
    }
}

/* เอฟเฟกต์พิเศษ - ให้เมนูดูเป็นแถบเดียวกัน */
.navbar-nav {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.1rem;
}

@media (max-width: 991.98px) {
    .navbar-nav {
        background: transparent;
        border-radius: 0;
        padding: 0;
    }
}

/* Ultra compact mode สำหรับพื้นที่จำกัด */
.navbar-ultra-compact .navbar-nav .nav-link {
    padding: 0.3rem 0.4rem !important;
    font-size: 0.85rem;
    margin: 0 !important;
}

.navbar-ultra-compact .navbar-brand {
    font-size: 0.9rem;
    margin-right: 0.3rem;
}

.navbar-ultra-compact {
    min-height: 50px;
    padding: 0.1rem 0.5rem;
}

/* ปรับ dropdown menu ให้สอดคล้อง */
.dropdown-menu {
    margin-top: 0;
    border-radius: 0 0 8px 8px;
    border-top: none;
}

/* Hover effect แบบใหม่ที่ไม่เปลี่ยนขนาด */
.navbar-nav .nav-link:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
    transition: background 0.3s ease;
}

.navbar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.3));
}

/* Download Files Section */
.download-files-container {
    padding: 1rem;
    margin: 0.5rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.download-file-item {
    padding: 1.2rem 1rem;
    margin: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 6px;
}

.download-file-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.download-file-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(5px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.download-file-item:hover::before {
    transform: scaleY(1);
}

.download-file-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.download-file-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 0.5rem 0 1.5rem;
}

.download-file-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
    position: relative;
}

.file-protected-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ffc107;
    color: #212529;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.download-file-info {
    flex: 1;
    min-width: 0;
    padding: 0 0.5rem;
}

.download-file-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.download-file-title a:hover {
    color: #28a745 !important;
}

.download-file-meta {
    margin-top: 0.5rem;
}

.download-file-meta small {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #6c757d;
}

.file-type-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
}

.first-file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.download-button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .download-files-container {
        margin: 0.25rem;
        padding: 0.75rem;
    }
    
    .download-file-item {
        padding: 1rem 0.75rem;
        margin: 0.25rem 0;
    }
    
    .download-file-content {
        gap: 0.75rem;
        padding: 0 0.25rem 0 1rem;
    }
    
    .download-file-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .download-file-info {
        padding: 0 0.25rem;
    }
    
    .download-file-title {
        font-size: 0.85rem;
    }
    
    .download-file-meta small {
        font-size: 0.7rem;
    }
    
    .file-protected-badge {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
    
    .first-file-info {
        gap: 0.3rem;
    }
}

@media (max-width: 576px) {
    .download-files-container {
        margin: 0.125rem;
        padding: 0.5rem;
    }
    
    .download-file-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0 0 0 0.75rem;
    }
    
    .download-file-info {
        width: 100%;
        padding: 0;
    }
    
    .download-button {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
}

/* Animation for file items */
.download-file-item {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container for better spacing */
.download-section {
    max-width: 100%;
    margin: 1rem auto;
    padding: 0 1rem;
}

@media (min-width: 992px) {
    .download-section {
        max-width: 1200px;
        padding: 0 2rem;
    }
}

@media (min-width: 1200px) {
    .download-section {
        max-width: 1400px;
    }
}


/* ส่วน CSS ของการแสดงผล Facebook Page */
/* เพิ่ม/แทนที่ CSS สำหรับ Facebook Page ใน style.index.css */

/* Facebook Page Container - ปรับปรุงใหม่ */
.facebook-page-container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    min-height: 200px;
}

.facebook-iframe-wrapper {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

.facebook-iframe-wrapper iframe {
    width: 100% !important;
    max-width: 100%;
    height: 500px;
    border: none;
    border-radius: 8px;
    background: #fff;
    display: block;
}

/* Loading State */
.facebook-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
    min-height: 200px;
}

.facebook-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.25em;
}

.facebook-loading p {
    font-size: 0.85rem;
    margin: 0;
    color: #6c757d;
}

/* Error State - ปรับปรุงใหม่ */
.facebook-error {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    color: #6c757d;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    padding: 2rem 1rem;
}

.facebook-error h6 {
    color: #495057;
    font-weight: 600;
}

.facebook-error .btn {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(24, 119, 242, 0.3);
}

.facebook-error .btn:hover {
    background: linear-gradient(135deg, #166fe5 0%, #1976d2 100%);
    transform: translateY(-1px);
    color: white;
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
}

/* Facebook Page Card - ทางเลือกเมื่อ iframe ไม่ทำงาน */
.facebook-page-card {
    margin-top: 1rem;
}

.facebook-page-card .bg-light {
    background: linear-gradient(135deg, #f8f9fc 0%, #e3f2fd 100%) !important;
    border: 1px solid rgba(24, 119, 242, 0.1);
    transition: all 0.3s ease;
}

.facebook-page-card .bg-light:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border-color: rgba(24, 119, 242, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.15);
}

.facebook-page-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    box-shadow: 0 3px 10px rgba(24, 119, 242, 0.3);
}

.facebook-page-card h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.facebook-page-card .text-muted {
    font-size: 0.8rem;
    color: #6c757d !important;
}

.facebook-page-card .btn {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.facebook-page-card .btn:hover {
    background: linear-gradient(135deg, #166fe5 0%, #1976d2 100%);
    transform: translateY(-1px);
    color: white;
    box-shadow: 0 3px 8px rgba(24, 119, 242, 0.3);
}

/* Animation Effects */
.facebook-page-container {
    animation: fadeInUp 0.6s ease-out;
}

.facebook-iframe-wrapper {
    animation: slideInRight 0.8s ease-out;
}

.facebook-page-card {
    animation: slideInUp 0.6s ease-out 0.3s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* iframe Loading Effect */
.facebook-iframe-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(24, 119, 242, 0.1) 20%,
        rgba(24, 119, 242, 0.2) 50%,
        rgba(24, 119, 242, 0.1) 80%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    z-index: 1;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.facebook-iframe-wrapper.loading::before {
    opacity: 1;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .facebook-iframe-wrapper {
        min-height: 400px;
    }
    
    .facebook-iframe-wrapper iframe {
        height: 400px;
    }
    
    .facebook-loading {
        min-height: 150px;
    }
    
    .facebook-error {
        min-height: 150px;
        padding: 1.5rem 1rem;
    }
    
    .facebook-page-card .bg-light {
        padding: 1rem;
    }
    
    .facebook-page-icon {
        width: 40px;
        height: 40px;
    }
    
    .facebook-page-icon i {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .facebook-iframe-wrapper {
        min-height: 350px;
    }
    
    .facebook-iframe-wrapper iframe {
        height: 350px;
    }
    
    .facebook-loading {
        min-height: 120px;
    }
    
    .facebook-error {
        min-height: 120px;
        padding: 1rem 0.5rem;
    }
    
    .facebook-error h6 {
        font-size: 0.9rem;
    }
    
    .facebook-error p {
        font-size: 0.8rem;
    }
    
    .facebook-page-card .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .facebook-page-icon {
        align-self: center;
    }
}

@media (max-width: 400px) {
    .facebook-iframe-wrapper {
        min-height: 300px;
    }
    
    .facebook-iframe-wrapper iframe {
        height: 300px;
    }
}

/* Debug Mode Styles */
.facebook-debug {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-family: monospace;
    font-size: 0.75rem;
    color: #856404;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .facebook-error {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
    
    .facebook-loading {
        background: #fff;
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .facebook-page-container,
    .facebook-iframe-wrapper,
    .facebook-page-card {
        animation: none;
    }
    
    .facebook-iframe-wrapper::before {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .facebook-page-container {
        display: none;
    }
}

/* Focus States for Accessibility */
.facebook-error .btn:focus,
.facebook-page-card .btn:focus {
    outline: 2px solid #1877f2;
    outline-offset: 2px;
}

/* Loading State Management */
.facebook-iframe-loaded .facebook-loading {
    display: none !important;
}

.facebook-iframe-error .facebook-iframe-wrapper iframe {
    display: none !important;
}

/* Fallback Styles */
.no-js .facebook-iframe-wrapper {
    display: none;
}

.no-js .facebook-page-card {
    display: block !important;
}
/* ส่วน CSS ของการแสดงผล Facebook Page */


/* ส่วน CSS การแสดงผลประกาศ */

.announce-item {
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.announce-item:hover {
    background-color: rgba(0, 123, 255, 0.02);
    border-radius: 8px;
    margin: 0 -1rem;
    padding: 1.5rem 1rem;
}

.announce-item.urgent {
    border-left: 4px solid #dc3545;
    padding-left: 1.5rem;
    background-color: rgba(220, 53, 69, 0.02);
}

.announce-item.featured {
    border-left: 4px solid #ffc107;
    padding-left: 1.5rem;
    background-color: rgba(255, 193, 7, 0.02);
}

.announce-item.urgent.featured {
    border-left: 4px solid #dc3545;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.02) 0%, rgba(255, 193, 7, 0.02) 100%);
}

.announce-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.announce-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.announce-date {
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}

.announce-title {
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.announce-title a:hover {
    color: #0d6efd !important;
}

.announce-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.announce-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.announce-image {
    max-width: 200px;
    margin-left: auto;
    flex-shrink: 0;
}

.announce-content {
    flex: 1;
    min-width: 0;
}

.announce-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.announce-divider {
    margin: 0;
    opacity: 0.3;
}

@media (max-width: 768px) {
    .announce-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .announce-image {
        max-width: 100%;
        margin-left: 0;
    }
    
    .announce-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .announce-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Animation for urgent announces */
.announce-item.urgent .announce-title {
    animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ส่วน CSS การแสดงผลประกาศ */

/* เพิ่มโค้ดนี้ต่อท้ายไฟล์ style.index.css */

/* ===== แก้ไข Navbar สำหรับหน้าจอขนาด 1024px ===== */

/* ปรับ breakpoint สำหรับแสดง mobile menu */
@media (max-width: 1199.98px) {
    .navbar-toggler {
        display: block !important;
    }
}

/* สำหรับหน้าจอ 1024px - 1199px */
@media (min-width: 1024px) and (max-width: 1199.98px) {
    .navbar-nav .nav-link {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.85rem !important;
        margin: 0 !important;
    }
    
    .navbar-brand {
        font-size: 1rem !important;
        margin-right: 0.5rem !important;
    }
    
    .navbar .container {
        max-width: 100% !important;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .navbar-nav {
        gap: 0 !important;
        padding: 0.05rem;
    }
}

/* สำหรับหน้าจอที่เล็กกว่า 1024px */
@media (max-width: 1023.98px) {
    .navbar-toggler {
        display: block !important;
    }
    
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        margin-top: 0.5rem;
        border-radius: 10px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .navbar-nav .nav-link {
        color: #333 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
        padding: 0.8rem 1.5rem !important;
    }
}

/* Ultra compact mode */
@media (min-width: 1024px) and (max-width: 1150px) {
    .navbar-ultra-compact .navbar-nav .nav-link {
        padding: 0.3rem 0.3rem !important;
        font-size: 0.8rem !important;
    }
    
    .navbar-ultra-compact .navbar-brand {
        font-size: 0.9rem !important;
    }
}

/* Menu overflow handling */
@media (min-width: 992px) and (max-width: 1080px) {
    .navbar-nav {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    
    .nav-item {
        flex-shrink: 0;
    }
}

/* Emergency responsive */
@media (min-width: 992px) {
    .navbar-nav-overflow .navbar-toggler {
        display: block !important;
    }
    
    .navbar-nav-overflow .navbar-nav {
        display: none !important;
    }
}

@media (max-width: 1199px) {
    .navbar-toggler {
        cursor: pointer !important;
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    .navbar-collapse.show {
        background: rgba(255, 255, 255, 0.98) !important;
        border-radius: 0 0 15px 15px !important;
        margin-top: 0.5rem !important;
        padding: 1rem !important;
    }
}