/* ==== MAGOODS ANNOUNCEMENTS PAGE ==== */

:root {
    --primary: #007ea7;
    --mint: #00a8e8;
    --semi-dark: hsl(201 100% 8%);
    --light: #ffffff;
    --gray: rgba(255, 255, 255, 0.85);
    --darkGray: rgba(255, 255, 255, 0.6);
    --transition: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Wrapper */
.mg-announcements-wrapper {
    animation: pageSlideIn 0.6s var(--transition) forwards;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Header */
.mg-announcements-header {
    margin-bottom: 40px;
    padding: 40px 0;
    border-bottom: 2px solid rgba(0, 168, 232, 0.2);
    background: linear-gradient(135deg, rgba(0, 126, 167, 0.05), rgba(0, 168, 232, 0.05));
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 100%;
}

.mg-header-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mg-announcements-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #007ea7, #00a8e8, #00c9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mg-announcements-title i {
    font-size: 36px;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    color: #00a8e8;
    text-shadow: 0 0 20px rgba(0, 168, 232, 0.5);
}

.mg-announcements-subtitle {
    font-size: 15px;
    color: var(--darkGray);
    margin: 0;
}

/* Container */
.mg-announcements-container {
    padding: 20px 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Grid Layout */
.mg-announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
}

/* Announcement Card */
.mg-announcement-card {
    background: rgba(0, 23, 31, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 168, 232, 0.2);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--transition);
    animation: cardFadeIn 0.5s var(--transition) forwards;
    opacity: 0;
    min-width: 0;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.mg-announcement-card:nth-child(1) { animation-delay: 0.06s; }
.mg-announcement-card:nth-child(2) { animation-delay: 0.12s; }
.mg-announcement-card:nth-child(3) { animation-delay: 0.18s; }
.mg-announcement-card:nth-child(4) { animation-delay: 0.24s; }
.mg-announcement-card:nth-child(5) { animation-delay: 0.30s; }
.mg-announcement-card:nth-child(6) { animation-delay: 0.36s; }

.mg-announcement-card:hover {
    border-color: rgba(0, 168, 232, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.37),
        0 0 40px rgba(0, 168, 232, 0.25);
    transform: translateY(-5px);
}

/* Card Glow */
.mg-card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.1), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mg-announcement-card:hover .mg-card-glow {
    opacity: 1;
}

/* Card Header */
.mg-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 168, 232, 0.15);
}

.mg-card-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--darkGray);
    font-weight: 600;
}

.mg-card-date i {
    color: #00a8e8;
    font-size: 14px;
}

.mg-btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 168, 232, 0.15);
    border: 1px solid rgba(0, 168, 232, 0.3);
    color: #00a8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
}

.mg-btn-edit:hover {
    background: rgba(0, 168, 232, 0.25);
    border-color: #00a8e8;
    transform: scale(1.1);
}

/* Title */
.mg-announcement-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.mg-announcement-title a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.mg-announcement-title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00a8e8, #00c9ff);
    transition: width 0.3s ease;
}

.mg-announcement-title:hover a::after {
    width: 100%;
}

/* Content */
.mg-announcement-content {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    max-height: 150px;
    overflow: hidden;
    position: relative;
    word-break: break-word;
}

.mg-announcement-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 23, 31, 0.6), transparent);
    pointer-events: none;
}

/* Meta Info */
.mg-announcement-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 168, 232, 0.1);
}

.mg-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--darkGray);
}

.mg-meta-item i {
    color: #00a8e8;
}

/* Card Footer */
.mg-card-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(0, 168, 232, 0.15);
}

.mg-btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #00a8e8;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.mg-btn-read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00a8e8;
    transition: width 0.3s ease;
}

.mg-btn-read-more:hover {
    color: #00c9ff;
}

.mg-btn-read-more:hover::after {
    width: 100%;
}

.mg-btn-read-more i {
    transition: transform 0.3s ease;
}

.mg-btn-read-more:hover i {
    transform: translateX(4px);
}

/* Empty State */
.mg-no-announcements {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.mg-empty-state {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.mg-empty-state i {
    font-size: 60px;
    color: rgba(0, 168, 232, 0.3);
}

.mg-empty-state h3 {
    font-size: 24px;
    color: #fff;
    margin: 0;
}

.mg-empty-state p {
    color: var(--darkGray);
    margin: 0;
}

/* Pagination */
.mg-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

@media (min-width: 992px) {
            }

.mg-pagination {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mg-page-item {
    display: inline-flex;
}

.mg-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: rgba(0, 168, 232, 0.1);
    border: 1.5px solid rgba(0, 168, 232, 0.2);
    border-radius: 10px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mg-page-link:hover {
    background: rgba(0, 168, 232, 0.2);
    border-color: #00a8e8;
    color: #00a8e8;
    transform: translateY(-2px);
}

.mg-page-item.active .mg-page-link {
    background: linear-gradient(135deg, #007ea7, #00a8e8);
    border-color: #00a8e8;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.mg-page-item.disabled .mg-page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .mg-announcements-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .mg-announcements-header {
        padding: 30px 20px;
    }

    .mg-announcements-title {
        font-size: 24px;
    }

    .mg-announcements-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mg-announcement-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .mg-announcements-header {
        padding: 24px 16px;
    }

    .mg-announcements-title {
        font-size: 20px;
    }

    .mg-announcement-title {
        font-size: 18px;
    }

    .mg-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .mg-announcement-card,
    .mg-btn-read-more,
    .mg-page-link {
        animation: none;
        transition: none;
    }
}

*:focus-visible {
    outline: 2px solid #00a8e8;
    outline-offset: 2px;
}
