/* Notice Board Section Redesign */
.notice-board {
    background-color: var(--day-background);
    padding: 60px 0;
}

.notice-board-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.notice-list-container {
    flex: 1;
    min-width: 300px;
}

.new-notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary-blue);
}

.notice-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.notice-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 10px;
    border-radius: 8px;
    width: 70px;
    height: 70px;
    text-align: center;
    flex-shrink: 0;
}

.nd-day {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.nd-month {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 2px;
}

.notice-info h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.notice-info p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary-blue);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--dark-blue);
}

.notice-view-all {
    margin-top: 20px;
    text-align: center;
}

/* Featured Notice Section */
.notice-featured {
    flex: 1;
    min-width: 300px;
}

.featured-image-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.featured-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.featured-image-card:hover img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px;
    color: #fff;
    pointer-events: none;
}

.featured-overlay h3 {
    color: #fff;
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.featured-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.featured-overlay .btn {
    pointer-events: auto;
}

/* Responsive adjustments for Notice Board */
@media (max-width: 768px) {
    .notice-board-wrapper {
        flex-direction: column;
    }

    .notice-featured {
        width: 100%;
        /* order: -1; Removed to keep image below the list/button */
    }

    .notice-list-container {
        width: 100%;
    }
}

/* Adjust Desktop Image Size */
@media (min-width: 992px) {
    .notice-featured {
        flex: 1.2;
        /* Give more space to the image on large screens */
    }

    .featured-image-card {
        min-height: 400px;
        /* Ensure a minimum height for larger appearance */
    }
}

/* Notice Page Styles */
.notice-page-section {
    padding: 10px 0 60px 0;
    min-height: 600px;
}

.notice-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Search Bar Styling */
.notice-search-wrap {
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 12px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.1);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

.search-box i {
    color: var(--primary-blue);
    margin-right: 15px;
    font-size: 1.1rem;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    color: #333;
    background: transparent;
}

.search-box input::placeholder {
    color: #aaa;
}

.night-mode .search-box,
body.dark-theme .search-box {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.night-mode .search-box input,
body.dark-theme .search-box input {
    color: #fff !important;
}

.notice-card-long {
    display: flex;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.notice-card-long:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.notice-img-wrapper {
    flex: 0 0 200px;
    position: relative;
    overflow: hidden;
}

.notice-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.notice-card-long:hover .notice-img-wrapper img {
    transform: scale(1.1);
}

.notice-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-blue);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.notice-content-wrapper {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.notice-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.notice-card-long:hover .notice-title {
    color: var(--secondary-blue);
}

.notice-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #888;
}

.notice-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.notice-meta i {
    color: var(--primary-blue);
}

.notice-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.read-more-btn:hover {
    gap: 12px;
    color: var(--secondary-blue);
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 50%;
    color: #555;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-blue);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 64, 175, 0.2);
}

.page-dots {
    color: #888;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Responsive Styles for Notice Page */
@media (max-width: 992px) {
    .notice-grid-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .notice-card-long {
        flex-direction: column;
    }

    .notice-img-wrapper {
        flex: 0 0 200px;
        width: 100%;
    }

    .notice-grid-container {
        grid-template-columns: 1fr;
        min-width: auto;
    }

    .notice-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==========================================================================
   Premium Night Mode Styles for Notices
   ========================================================================== */

/* Apply to both .night-mode and .dark-theme/dark-mode for compatibility */
.night-mode .notice-page-section,
.night-mode .notice-board,
body.dark-theme .notice-page-section,
body.dark-theme .notice-board {
    background-color: #0b0f19 !important;
    background-image:
        radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 58, 138, 0.1) 0px, transparent 50%) !important;
}

/* Night Mode Page Header - Handled globally in style.css */

/* Notice Card (Long Version - notice.html) */
.night-mode .notice-card-long,
body.dark-theme .notice-card-long {
    background: rgba(30, 41, 59, 0.7) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4) !important;
}

.night-mode .notice-card-long:hover,
body.dark-theme .notice-card-long:hover {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
}

.night-mode .notice-title,
body.dark-theme .notice-title {
    color: #f8fafc !important;
}

.night-mode .notice-meta,
body.dark-theme .notice-meta {
    color: #94a3b8 !important;
}

.night-mode .notice-meta i,
body.dark-theme .notice-meta i {
    color: #3b82f6 !important;
}

.night-mode .notice-excerpt,
body.dark-theme .notice-excerpt {
    color: #cbd5e1 !important;
}

.night-mode .read-more-btn,
body.dark-theme .read-more-btn {
    color: #60a5fa !important;
}

/* Notice Item (List Version - index.html) */
.night-mode .notice-item,
body.dark-theme .notice-item {
    background: rgba(30, 41, 59, 0.6) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-left: 4px solid #3b82f6 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.night-mode .notice-item:hover,
body.dark-theme .notice-item:hover {
    background: rgba(30, 41, 59, 0.8) !important;
    transform: translateX(8px);
}

.night-mode .notice-date,
body.dark-theme .notice-date {
    background: #1e293b !important;
    color: #3b82f6 !important;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.night-mode .notice-info h3,
body.dark-theme .notice-info h3 {
    color: #f1f5f9 !important;
}

.night-mode .notice-info p,
body.dark-theme .notice-info p {
    color: #94a3b8 !important;
}

.night-mode .notice-category,
body.dark-theme .notice-category {
    background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3) !important;
}

.night-mode .read-more,
body.dark-theme .read-more {
    color: #60a5fa !important;
}

/* Pagination in Dark Mode */
.night-mode .page-link,
body.dark-theme .page-link {
    background: rgba(30, 41, 59, 0.8) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.night-mode .page-link.active,
.night-mode .page-link:hover,
body.dark-theme .page-link.active,
body.dark-theme .page-link:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
}

/* Section Title & Header */
.night-mode .section-title,
body.dark-theme .section-title,
.night-mode .notice-board h2,
body.dark-theme .notice-board h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

/* Buttons in Dark Mode */
.night-mode .btn-primary,
body.dark-theme .btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4) !important;
}

.night-mode .btn-secondary,
body.dark-theme .btn-secondary {
    background: rgba(30, 41, 59, 0.6) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.night-mode .btn-secondary:hover,
body.dark-theme .btn-secondary:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
}

/* Page Header Overrides specifically for Night Mode - Handled globally */

/* Helper for JS Pagination */
.hidden-notice {
    display: none !important;
}
