/* Clean DPS Sardhana Notice Board CSS - FIXED: No Sidebar, Strict 5 Items */
.nbf-board-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px -8px rgba(59, 130, 246, 0.15);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 530px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative; /* Prevent layout shift */
}

.nbf-board-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px -8px rgba(59, 130, 246, 0.2);
}

/* Header */
.nbf-header {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.nbf-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lottie Animation Container */
.nbf-title-animation {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* Navigation */
.nbf-nav-buttons {
    display: flex;
    gap: 6px;
}

.nbf-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nbf-nav-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nbf-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Content Area - FIXED: No Scrollbar, Strict Height */
.nbf-list {
    flex: 1;
    padding: 24px;
    overflow: hidden; /* Prevent any overflow */
    position: relative;
}

.nbf-wrapper {
    height: 100%;
    width: 100%;
    overflow: hidden; /* CRITICAL: No scrolling allowed */
    position: relative;
}

/* Page Container - FIXED: Exact Height Control */
.nbf-page {
    display: none;
    height: 100%;
    width: 100%;
    overflow: hidden; /* No scrolling within pages */
}

.nbf-page.active {
    display: block;
}

/* Notice Items - FIXED: Exact 5 Items Layout */
.nbf-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    height: 70px; /* FIXED HEIGHT - prevents layout shift */
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden; /* Prevent content overflow */
}

.nbf-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* CRITICAL: Only show exactly 5 items per page */
.nbf-item:nth-child(n+6) {
    display: none !important;
}

/* Date Box - FIXED: Shifted Upper for Better Alignment */
.nbf-date-box {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    margin-top: -3px; /* Shift the entire date box up */
    flex-shrink: 0;
    position: relative;
}

.nbf-date-box .month {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    width: 80%;
    text-align: center;
    padding: 1px 0 2px 0;
    line-height: 1;
    margin-bottom: 1px;
}

.nbf-date-box .day {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
}

/* Content - FIXED: Prevent Overflow */
.nbf-content {
    flex: 1;
    min-width: 0;
    padding-right: 50px;
    overflow: hidden; /* Prevent text overflow */
}

.nbf-text {
    color: #374151;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 6px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Max 2 lines */
    -webkit-box-orient: vertical;
    max-height: 2.6em;
}

.nbf-text a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nbf-text a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.nbf-date {
    color: #6b7280;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nbf-date::before {
    content: "📅";
    font-size: 10px;
}

/* NEW Badge - Classic GIF */
.nbf-new::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 18px;
    background: url('../images/new_red.gif') no-repeat;
    background-size: contain;
    background-position: center;
}

/* Empty State */
.nbf-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px;
    color: #6b7280;
}

.nbf-empty::before {
    content: '📋';
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.nbf-empty::after {
    content: 'No notices available\ACheck back later for updates';
    white-space: pre-line;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

/* Priority Colors */
.nbf-item[data-priority="urgent"] .nbf-date-box {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.nbf-item[data-priority="important"] .nbf-date-box {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.nbf-item[data-priority="event"] .nbf-date-box {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* CRITICAL: Remove all scrollbars */
.nbf-wrapper::-webkit-scrollbar,
.nbf-page::-webkit-scrollbar,
.nbf-list::-webkit-scrollbar {
    display: none;
    width: 0;
}

.nbf-wrapper,
.nbf-page,
.nbf-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Responsive Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .nbf-board-container {
        max-width: 580px;
        width: 580px;
        height: 520px;
        margin: 0 auto;
    }
    
    .nbf-header {
        padding: 16px 22px;
    }
    
    .nbf-title {
        font-size: 16px;
    }
    
    .nbf-list {
        padding: 22px;
    }
}

@media (max-width: 768px) {
    .nbf-board-container {
        height: 450px;
        padding: 0;
        border-radius: 20px;
    }

    .nbf-header {
        padding: 14px 16px;
    }

    .nbf-title {
        font-size: 16px;
    }

    .nbf-list {
        padding: 20px 16px;
    }

    .nbf-item {
        padding: 14px;
        margin-bottom: 10px;
        height: 65px; /* Reduced height for mobile */
    }

    .nbf-date-box {
        width: 45px;
        height: 45px;
        margin-right: 14px;
    }

    .nbf-date-box .day {
        font-size: 15px;
    }

    .nbf-text {
        font-size: 12px;
        padding-right: 45px;
    }

    .nbf-content {
        padding-right: 45px;
    }
}

@media (max-width: 480px) {
    .nbf-board-container {
        height: 480px;
        border-radius: 16px;
        padding: 0;
    }

    .nbf-header {
        padding: 12px 16px;
    }

    .nbf-title {
        font-size: 14px;
    }

    .nbf-list {
        padding: 16px;
    }

    .nbf-item {
        padding: 12px;
        margin-bottom: 8px;
        height: 60px; /* Smaller height for small screens */
    }

    .nbf-date-box {
        width: 42px;
        height: 42px;
        margin-right: 12px;
    }

    .nbf-date-box .day {
        font-size: 14px;
    }

    .nbf-text {
        font-size: 11px;
        padding-right: 40px;
    }

    .nbf-content {
        padding-right: 40px;
    }

    .nbf-nav-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}