/* Announcements Modal Styles */

/* Floating Action Button */
.announcements-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    height: 56px;
    min-width: 56px;
    background: linear-gradient(135deg, #1e88e5 0%, #00acc1 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
    transition: opacity 0.3s ease, transform 0.2s ease;
    z-index: 999;
    border: none;
    padding: 0 20px;
    white-space: nowrap;
    opacity: 1;
}

/* Hidden state when scrolling */
.announcements-fab.scrolling {
    opacity: 0;
    pointer-events: none;
}

.announcements-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
}

.announcements-fab-icon {
    width: 24px;
    height: 24px;
    fill: white;
    flex-shrink: 0;
}

.announcements-fab-text {
    color: white;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.announcements-fab .badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
    padding: 0 6px;
    box-sizing: border-box;
}

/* Modal */
.announcements-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.announcements-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.9) translateY(50px);
    transition: all 0.3s ease;
}

.announcements-modal.show .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, #1e88e5 0%, #00acc1 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

.modal-close {
    position: absolute;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Slider Container */
.slider-container {
    position: relative;
    overflow: hidden;
    height: 500px;
}

.announcements-slider {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.announcement-slide {
    min-width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
}

.announcement-slide::-webkit-scrollbar {
    width: 6px;
}

.announcement-slide::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.announcement-slide::-webkit-scrollbar-thumb {
    background: #1e88e5;
    border-radius: 3px;
}

/* Announcement Content */
.announcement-cover {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
    display: block;
}

.announcement-content {
    direction: rtl;
    text-align: right;
}

.announcement-title {
    font-size: 28px;
    font-weight: bold;
    color: #2d3436;
    margin: 0 0 15px 0;
    text-align: center;
}

.announcement-summary {
    font-size: 16px;
    line-height: 1.8;
    color: #636e72;
    margin-bottom: 20px;
    white-space: pre-line;
}

.announcement-full-content {
    font-size: 16px;
    line-height: 1.8;
    color: #2d3436;
    margin-bottom: 20px;
    white-space: pre-line;
}

/* Styling for HTML tags in announcements */
.announcement-summary a,
.announcement-full-content a {
    color: #1e88e5;
    text-decoration: none;
    border-bottom: 1px solid #1e88e5;
    transition: all 0.3s ease;
    font-weight: 600;
}

.announcement-summary a:hover,
.announcement-full-content a:hover {
    color: #00acc1;
    border-bottom-color: #00acc1;
    background: rgba(30, 136, 229, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
}

.announcement-summary strong,
.announcement-summary b,
.announcement-full-content strong,
.announcement-full-content b {
    color: #2d3436;
    font-weight: 700;
}

.announcement-summary em,
.announcement-summary i,
.announcement-full-content em,
.announcement-full-content i {
    font-style: italic;
    color: #636e72;
}

.announcement-summary u,
.announcement-full-content u {
    text-decoration: underline;
    text-decoration-color: #1e88e5;
    text-decoration-thickness: 2px;
}

.announcement-full-content p {
    margin-bottom: 15px;
}

.announcement-full-content h1,
.announcement-full-content h2,
.announcement-full-content h3,
.announcement-full-content h4,
.announcement-full-content h5,
.announcement-full-content h6 {
    color: #2d3436;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}

.announcement-full-content h1 { font-size: 26px; }
.announcement-full-content h2 { font-size: 24px; }
.announcement-full-content h3 { font-size: 22px; }
.announcement-full-content h4 { font-size: 20px; }
.announcement-full-content h5 { font-size: 18px; }
.announcement-full-content h6 { font-size: 16px; }

.announcement-full-content ul,
.announcement-full-content ol {
    margin: 15px 0;
    padding-right: 30px;
}

.announcement-full-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.announcement-full-content blockquote {
    border-right: 4px solid #1e88e5;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    font-style: italic;
    color: #636e72;
}

.announcement-full-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    color: #e83e8c;
    border: 1px solid #e9ecef;
}

.announcement-full-content pre {
    background: #2d3436;
    color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

.announcement-full-content pre code {
    background: transparent;
    border: none;
    color: #f8f9fa;
    padding: 0;
}

.announcement-toggle-btn {
    background: linear-gradient(135deg, #1e88e5 0%, #00acc1 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.announcement-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.4);
}

.announcement-date {
    font-size: 13px;
    color: #95a5a6;
    display: flex;
    align-items: center;
    gap: 5px;
}

.announcement-date::before {
    content: '📅';
    font-size: 14px;
}

/* Slider Navigation */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 136, 229, 0.9);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-btn:hover {
    background: rgba(30, 136, 229, 1);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    right: 15px;
}

.slider-btn.next {
    left: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .announcements-fab {
        bottom: 20px;
        right: 20px;
        height: 48px;
        min-width: 48px;
        padding: 0 16px;
    }

    .announcements-fab-icon {
        width: 20px;
        height: 20px;
    }

    .announcements-fab-text {
        font-size: 13px;
    }

    .announcements-fab .badge {
        top: -6px;
        left: -6px;
        min-width: 20px;
        height: 20px;
        font-size: 10px;
        padding: 0 5px;
    }

    .modal-container {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .slider-container {
        height: 450px;
    }

    .announcement-slide {
        padding: 20px;
    }

    .announcement-cover {
        max-height: 200px;
    }

    .announcement-title {
        font-size: 22px;
    }

    .announcement-summary,
    .announcement-full-content {
        font-size: 14px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* Animation */
@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(30, 136, 229, 0.5);
    }
}

.announcements-fab:not(.scrolling) {
    animation: gentlePulse 3s ease-in-out infinite;
}

.announcements-fab:hover {
    animation: none;
}

