/* ==========================================================================
   MINISTRY HEADER & ANNOUNCEMENT BAR
   ========================================================================== */

:root {
    --ministry-height: 82px;
    --ann-height: 48px;
}

@media (max-width: 768px) {
    :root {
        --ministry-height: 68px;
        --ann-height: 56px;
    }
}

@media (max-width: 480px) {
    :root {
        --ministry-height: 58px;
        --ann-height: 52px;
    }
}

/* ===== MINISTRY HEADER BAR ===== */
.ministry-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: linear-gradient(180deg, #1e5468 0%, #24687d 60%, #206070 100%);
    height: var(--ministry-height);
    display: flex;
    align-items: center;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #006233 0%, #006233 33%, #d4af37 33%, #d4af37 40%, #ffffff 40%, #ffffff 60%, #d4af37 60%, #d4af37 67%, #d21034 67%, #d21034 100%) 1;
}

.ministry-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M20 20.5V18H0v-2h20V0h2v16h18v2H22v4.5a3.5 3.5 0 1 1-2 0zM0 20h2v20H0V20zm4 0h2v20H4V20z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.ministry-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 5%, rgba(212,175,55,0.6) 20%, #d4af37 50%, rgba(212,175,55,0.6) 80%, transparent 95%);
}

.ministry-header-inner {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    z-index: 1;
}

.ministry-separator {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent 5%, rgba(212,175,55,0.5) 30%, rgba(212,175,55,0.7) 50%, rgba(212,175,55,0.5) 70%, transparent 95%);
    flex-shrink: 0;
    margin: 0 20px;
}

.ministry-logo {
    height: 64px;
    width: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
    border-radius: 4px;
}

.ministry-logo:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 3px 10px rgba(212,175,55,0.3));
}

.ministry-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
    padding: 0 8px;
    text-align: center;
}

.ministry-text-country {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.ministry-text-ar {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ministry-cnfepd-logo {
    height: 58px;
    width: auto;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: contain;
    border: 2px solid rgba(212,175,55,0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
    background: rgba(255,255,255,0.08);
}

.ministry-cnfepd-logo:hover {
    transform: scale(1.08);
    border-color: rgba(212,175,55,0.8);
}

/* ===== ANNOUNCEMENT BAR ===== */
.announcement-bar {
    position: fixed;
    top: var(--ministry-height);
    left: 0;
    right: 0;
    z-index: 1100;
    background: linear-gradient(90deg, #1a3a4a 0%, #1a5f7a 40%, #0d8a7a 100%);
    height: var(--ann-height);
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.announcement-bar.hidden {
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.ann-inner {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ann-pulse {
    width: 10px;
    height: 10px;
    background: var(--secondary);
    border-radius: 50%;
    flex-shrink: 0;
    animation: annPulse 2s infinite;
}

@keyframes annPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(87, 197, 182, 0.7);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(87, 197, 182, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(87, 197, 182, 0);
    }
}

.ann-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 500;
}

.ann-icon {
    color: var(--secondary);
    font-size: 16px;
    flex-shrink: 0;
}

.ann-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ann-label {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ann-ccp {
    color: var(--gold);
    font-size: 14.5px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    font-weight: 700;
}

.ann-sep {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

.ann-note {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.ann-note i {
    color: var(--secondary);
}

.ann-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-right: auto;
}

.ann-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.ann-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.ann-guide-link:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    transform: translateY(-1px);
}

.ann-guide-link:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* Responsive tweaks for Ministry and Announcement */
@media (max-width: 768px) {
    .ministry-header-inner {
        padding: 0 14px;
    }
    .ministry-text-country {
        font-size: 12px;
    }
    .ministry-text-ar {
        font-size: 11px;
    }
    .ministry-logo {
        height: 48px;
    }
    .ministry-cnfepd-logo {
        height: 42px;
    }
    .ministry-separator {
        margin: 0 10px;
        height: 38px;
    }
    .ann-note {
        display: none;
    }
    .ann-content {
        font-size: 12px;
        gap: 6px;
    }
    .ann-ccp {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ministry-text-country {
        font-size: 10.5px;
    }
    .ministry-text-ar {
        font-size: 9.5px;
    }
    .ministry-logo {
        height: 40px;
    }
    .ministry-cnfepd-logo {
        height: 34px;
    }
    .ministry-separator {
        margin: 0 6px;
        height: 30px;
    }
    .ann-sep,
    .ann-label {
        display: none;
    }
}
