/**
 * Notice Board Manager - Frontend Styles (Enhanced Premium Design)
 *
 * @package Notice_Board_Manager
 */

/* ========================================
   GENERAL STYLES & CONTAINER
   ======================================== */

.nbm-notice-list,
.nbm-notice-grid {
    margin: 40px 0;
    padding: 0;
    list-style: none;
}

/* ========================================
   LIST LAYOUT - ENHANCED
   ======================================== */

.nbm-notice-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nbm-notice-list-item {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e1e8ed;
    border-left: 4px solid #3498db;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nbm-notice-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.03) 0%, rgba(155, 89, 182, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.nbm-notice-list-item:hover {
    border-left-color: #2980b9;
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.15), 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px) translateX(2px);
}

.nbm-notice-list-item:hover::before {
    opacity: 1;
}

.nbm-notice-list-item.urgent {
    border-left-color: #e74c3c;
}

.nbm-notice-list-item.urgent:hover {
    border-left-color: #c0392b;
    box-shadow: 0 8px 24px rgba(231, 76, 60, 0.2), 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* ========================================
   GRID LAYOUT - ENHANCED
   ======================================== */

.nbm-notice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.nbm-notice-grid-item {
    position: relative;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nbm-notice-grid-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db 0%, #9b59b6 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.nbm-notice-grid-item:hover {
    box-shadow: 0 12px 32px rgba(52, 152, 219, 0.18), 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
    border-color: #3498db;
}

.nbm-notice-grid-item:hover::after {
    transform: scaleX(1);
}

.nbm-notice-grid-item.urgent::after {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
}

/* ========================================
   NOTICE HEADER
   ======================================== */

.nbm-notice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 16px;
}

.nbm-notice-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    flex: 1;
    letter-spacing: -0.3px;
}

.nbm-notice-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(to right, #3498db 0%, #3498db 100%);
    background-size: 0 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    padding-bottom: 2px;
}

.nbm-notice-title a:hover {
    color: #3498db;
    background-size: 100% 2px;
}

/* ========================================
   BADGES - PREMIUM DESIGN
   ======================================== */

.nbm-notice-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.nbm-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.nbm-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.nbm-badge-urgent {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    }

    50% {
        box-shadow: 0 4px 16px rgba(231, 76, 60, 0.5);
    }
}

.nbm-badge-new {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #fff;
}

.nbm-badge-expired {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: #fff;
}

.nbm-badge-type {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
}

/* ========================================
   NOTICE META - ENHANCED ICONS
   ======================================== */

.nbm-notice-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #5a6c7d;
    font-weight: 500;
}

.nbm-notice-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nbm-notice-meta span:hover {
    background: #e9ecef;
    color: #3498db;
    transform: translateY(-1px);
}

.nbm-notice-meta .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #3498db;
}

.nbm-notice-date .dashicons {
    color: #e67e22;
}

.nbm-notice-category .dashicons {
    color: #9b59b6;
}

.nbm-notice-department .dashicons {
    color: #16a085;
}

.nbm-notice-attachment .dashicons {
    color: #e74c3c;
}

/* ========================================
   DEPARTMENT TAG
   ======================================== */

.nbm-notice-department-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ecf0f1 0%, #d5dbdb 100%);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 14px;
    border: 1px solid #bdc3c7;
    transition: all 0.3s ease;
}

.nbm-notice-department-tag:hover {
    background: linear-gradient(135deg, #d5dbdb 0%, #bdc3c7 100%);
    transform: translateX(3px);
}

.nbm-notice-department-tag .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #16a085;
}

/* ========================================
   NOTICE EXCERPT
   ======================================== */

.nbm-notice-excerpt {
    margin: 16px 0;
    color: #4a5568;
    line-height: 1.7;
    font-size: 15px;
}

.nbm-notice-excerpt p {
    margin: 0;
}

/* ========================================
   NOTICE FOOTER - ENHANCED
   ======================================== */

.nbm-notice-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 18px;
    border-top: 2px solid #f0f3f5;
}

.nbm-has-attachment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nbm-has-attachment:hover {
    background: #ffc107;
    color: #fff;
    transform: scale(1.05);
}

.nbm-has-attachment .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.nbm-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nbm-read-more::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nbm-read-more:hover::before {
    width: 300px;
    height: 300px;
}

.nbm-read-more:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    color: #fff;
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.nbm-read-more .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.nbm-read-more:hover .dashicons {
    transform: translateX(4px);
}

/* ========================================
   NO NOTICES MESSAGE
   ======================================== */

.nbm-no-notices {
    text-align: center;
    padding: 60px 30px;
    color: #7f8c8d;
    font-size: 18px;
    font-weight: 500;
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    border-radius: 16px;
    border: 2px dashed #bdc3c7;
}

.nbm-no-notices::before {
    content: '📢';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ========================================
   SINGLE NOTICE STYLES
   ======================================== */

.nbm-single-notice {
    max-width: 960px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nbm-single-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 3px solid #ecf0f1;
}

.nbm-single-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.nbm-single-title {
    margin: 0 0 24px 0;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}

.nbm-single-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.nbm-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    border-radius: 10px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
}

.nbm-meta-item:hover {
    background: linear-gradient(135deg, #ecf0f1 0%, #d5dbdb 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nbm-meta-item .dashicons {
    color: #3498db;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.nbm-meta-item strong {
    margin-right: 6px;
    color: #1a1a2e;
}

.nbm-single-thumbnail {
    margin: 36px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.nbm-single-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.nbm-single-thumbnail:hover img {
    transform: scale(1.05);
}

.nbm-single-content {
    margin: 36px 0;
    font-size: 17px;
    line-height: 1.8;
    color: #2c3e50;
}

.nbm-single-content p {
    margin-bottom: 24px;
}

.nbm-single-content h2,
.nbm-single-content h3,
.nbm-single-content h4 {
    margin-top: 36px;
    margin-bottom: 18px;
    color: #1a1a2e;
    font-weight: 700;
}

/* ========================================
   ACTION BUTTONS - PREMIUM
   ======================================== */

.nbm-single-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 36px 0;
    padding: 28px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.nbm-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.nbm-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nbm-button:hover::before {
    width: 300px;
    height: 300px;
}

.nbm-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.nbm-button-download {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #fff;
}

.nbm-button-download:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.nbm-button-download:hover .dashicons {
    transform: translateY(2px);
}

.nbm-button-external {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
}

.nbm-button-external:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.nbm-button-external:hover .dashicons {
    transform: translateX(3px);
}

/* ========================================
   SOCIAL SHARE - MODERN DESIGN
   ======================================== */

.nbm-social-share {
    margin: 48px 0;
    padding: 32px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    border: 2px solid #e1e8ed;
}

.nbm-social-share h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.nbm-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.nbm-share-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.nbm-share-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nbm-share-button:hover::before {
    width: 300px;
    height: 300px;
}

.nbm-share-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.nbm-share-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #145dbf 100%);
}

.nbm-share-facebook:hover {
    background: linear-gradient(135deg, #145dbf 0%, #0f4a99 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.nbm-share-twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
}

.nbm-share-twitter:hover {
    background: linear-gradient(135deg, #0d8bd9 0%, #0a6fb3 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

.nbm-share-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #1ebe57 100%);
}

.nbm-share-whatsapp:hover {
    background: linear-gradient(135deg, #1ebe57 0%, #17a647 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ========================================
   RELATED NOTICES
   ======================================== */

.nbm-related-notices {
    margin: 48px 0 0 0;
    padding: 32px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    border-radius: 16px;
    border: 2px solid #e1e8ed;
}

.nbm-related-notices h3 {
    margin: 0 0 24px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

.nbm-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.nbm-related-item {
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nbm-related-item:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.15);
    transform: translateY(-4px);
    border-color: #3498db;
}

.nbm-related-item h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
}

.nbm-related-item h4 a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nbm-related-item h4 a:hover {
    color: #3498db;
}

.nbm-related-date {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 500;
}

/* ========================================
   NOTICE TICKER - ENHANCED
   ======================================== */

.nbm-ticker-wrapper {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    border-radius: 10px;
    overflow: hidden;
    margin: 30px 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.nbm-ticker-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 1px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
}

.nbm-ticker-label .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    animation: ring 2s ease-in-out infinite;
}

@keyframes ring {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10%,
    30% {
        transform: rotate(-10deg);
    }

    20%,
    40% {
        transform: rotate(10deg);
    }
}

.nbm-ticker-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.nbm-ticker-content {
    display: flex;
    white-space: nowrap;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.nbm-ticker-slow {
    animation-name: ticker-scroll;
    animation-duration: 60s;
}

.nbm-ticker-medium {
    animation-name: ticker-scroll;
    animation-duration: 40s;
}

.nbm-ticker-fast {
    animation-name: ticker-scroll;
    animation-duration: 20s;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.nbm-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.nbm-ticker-item a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nbm-ticker-item a:hover {
    color: #3498db;
}

.nbm-ticker-urgent {
    padding: 4px 10px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
}

.nbm-ticker-date {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

@media screen and (max-width: 768px) {
    .nbm-notice-grid {
        grid-template-columns: 1fr;
    }

    .nbm-notice-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nbm-notice-list-item,
    .nbm-notice-grid-item {
        padding: 20px;
    }

    .nbm-single-notice {
        padding: 24px;
        margin: 20px;
    }

    .nbm-single-title {
        font-size: 28px;
    }

    .nbm-single-meta {
        grid-template-columns: 1fr;
    }

    .nbm-share-buttons {
        flex-direction: column;
    }

    .nbm-share-button {
        width: 100%;
        justify-content: center;
    }

    .nbm-single-actions {
        flex-direction: column;
        padding: 20px;
    }

    .nbm-button {
        width: 100%;
        justify-content: center;
    }

    .nbm-related-grid {
        grid-template-columns: 1fr;
    }

    .nbm-ticker-label {
        padding: 12px 16px;
        font-size: 12px;
    }

    .nbm-ticker-item {
        padding: 12px 24px;
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .nbm-notice-title {
        font-size: 19px;
    }

    .nbm-notice-meta {
        font-size: 13px;
        gap: 12px;
    }

    .nbm-single-title {
        font-size: 24px;
    }

    .nbm-single-content {
        font-size: 16px;
    }
}