/* ═══════════════════════════════════════════════════════════════
   MUHARRAM SEASONAL DECORATION — فدراسیون شمشیربازی ایران
   ماه محرم الحرام — عزاداری سیدالشهداء حضرت امام حسین (ع)

   TO REMOVE: unlink this file from Base.html and Base_Dashboard_New.html,
   then delete the three <!-- MUHARRAM -->...<!-- /MUHARRAM --> blocks
   from navbar.html, footer.html, and Base_Dashboard_New.html.
   ═══════════════════════════════════════════════════════════════ */

/* ── Palette ─────────────────────────────────────────────────── */
:root {
    --muh-black:        #0a0a0a;
    --muh-black-soft:   #111214;
    --muh-crimson:      #5c0000;
    --muh-crimson-mid:  #7a0a0a;
    --muh-cream:        #e8d5a3;
    --muh-cream-dim:    #c4aa78;
    --muh-gold:         #c9a84c;
    --muh-gold-glow:    #e2be72;
    --muh-flame-outer:  #c94000;
    --muh-flame-mid:    #e05c00;
    --muh-flame-inner:  #f5a623;
    --muh-flame-tip:    #fde68a;
    --muh-bar-height:   44px;
}


/* ══════════════════════════════════════════════════════════════
   ANNOUNCEMENT BAR — sits above the navbar in normal flow
   ══════════════════════════════════════════════════════════════ */

.muharram-bar {
    position: relative;
    width: 100%;
    height: var(--muh-bar-height);
    background: var(--muh-black);
    border-top: 2px solid #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1050;
    gap: 0;
}

/* gold hairline at the bottom of the bar */
.muharram-bar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--muh-gold) 20%,
        var(--muh-gold-glow) 50%,
        var(--muh-gold) 80%,
        transparent 100%
    );
    opacity: 0.55;
}

/* ── Candle wrapper ──────────────────────────────────────────── */
.muharram-candle {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 18px;
    height: 34px;
    flex-shrink: 0;
    margin: 0 10px;
}

/* candle body */
.muharram-candle::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 18px;
    background: linear-gradient(to right, #2a2a2a 0%, #3d3d3d 45%, #2a2a2a 100%);
    border-radius: 1px 1px 2px 2px;
}

/* wax-top glow ring */
.muharram-candle::before {
    content: "";
    position: absolute;
    bottom: 17px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 3px;
    background: radial-gradient(ellipse, rgba(240,220,180,0.35) 0%, transparent 80%);
    border-radius: 50%;
    z-index: 2;
}

/* ── Flame element ───────────────────────────────────────────── */
.muharram-flame {
    position: absolute;
    bottom: 17px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 16px;
    z-index: 3;
}

/* outer flame layer */
.muharram-flame::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 16px;
    background: radial-gradient(
        ellipse 55% 65% at 50% 80%,
        var(--muh-flame-outer) 0%,
        var(--muh-flame-mid)   35%,
        var(--muh-flame-inner) 60%,
        transparent            100%
    );
    border-radius: 50% 50% 30% 30% / 60% 60% 40% 40%;
    clip-path: polygon(
        50%  0%,  72%  28%,  85%  55%,
        80%  80%, 60%  100%, 40%  100%,
        20%  80%, 15%  55%,  28%  28%
    );
    animation: muharram-flicker 2.4s ease-in-out infinite;
    transform-origin: bottom center;
}

/* inner bright core */
.muharram-flame::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 9px;
    background: radial-gradient(
        ellipse 60% 70% at 50% 75%,
        var(--muh-flame-tip)   0%,
        var(--muh-flame-inner) 55%,
        transparent            100%
    );
    border-radius: 50% 50% 35% 35% / 55% 55% 45% 45%;
    clip-path: polygon(
        50%  0%,  68%  30%,  80%  60%,
        70%  100%, 30%  100%, 20%  60%,
        32%  30%
    );
    animation: muharram-flicker-inner 2.4s ease-in-out infinite 0.15s;
    transform-origin: bottom center;
}

/* glow halo around the flame */
.muharram-candle-glow {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    background: radial-gradient(
        circle,
        rgba(245,166,35,0.28)  0%,
        rgba(224,92,0,0.12)    45%,
        transparent             75%
    );
    border-radius: 50%;
    animation: muharram-glow-pulse 2.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes muharram-flicker {
    0%   { transform: translateX(-50%) scaleX(1)    scaleY(1)    rotate(0deg);    opacity: 1;    }
    8%   { transform: translateX(-51%) scaleX(0.92) scaleY(1.04) rotate(-1.5deg); opacity: 0.97; }
    18%  { transform: translateX(-50%) scaleX(1.06) scaleY(0.96) rotate(1deg);    opacity: 1;    }
    30%  { transform: translateX(-49%) scaleX(0.95) scaleY(1.05) rotate(-2deg);   opacity: 0.95; }
    42%  { transform: translateX(-50%) scaleX(1.03) scaleY(0.98) rotate(1.5deg);  opacity: 1;    }
    55%  { transform: translateX(-51%) scaleX(0.90) scaleY(1.06) rotate(-1deg);   opacity: 0.93; }
    68%  { transform: translateX(-50%) scaleX(1.05) scaleY(0.95) rotate(2deg);    opacity: 1;    }
    80%  { transform: translateX(-49%) scaleX(0.97) scaleY(1.03) rotate(-1deg);   opacity: 0.97; }
    92%  { transform: translateX(-50%) scaleX(1.02) scaleY(1.01) rotate(0.5deg);  opacity: 1;    }
    100% { transform: translateX(-50%) scaleX(1)    scaleY(1)    rotate(0deg);    opacity: 1;    }
}

@keyframes muharram-flicker-inner {
    0%   { transform: translateX(-50%) scaleX(1)    scaleY(1)    rotate(0deg);    opacity: 0.9;  }
    12%  { transform: translateX(-52%) scaleX(0.88) scaleY(1.08) rotate(-2deg);   opacity: 0.85; }
    25%  { transform: translateX(-49%) scaleX(1.08) scaleY(0.92) rotate(2.5deg);  opacity: 0.95; }
    38%  { transform: translateX(-51%) scaleX(0.93) scaleY(1.06) rotate(-1.5deg); opacity: 0.80; }
    52%  { transform: translateX(-50%) scaleX(1.05) scaleY(0.96) rotate(1deg);    opacity: 0.92; }
    66%  { transform: translateX(-48%) scaleX(0.90) scaleY(1.07) rotate(-2.5deg); opacity: 0.85; }
    78%  { transform: translateX(-50%) scaleX(1.04) scaleY(0.97) rotate(1.5deg);  opacity: 0.90; }
    88%  { transform: translateX(-51%) scaleX(0.96) scaleY(1.02) rotate(-1deg);   opacity: 0.88; }
    100% { transform: translateX(-50%) scaleX(1)    scaleY(1)    rotate(0deg);    opacity: 0.9;  }
}

@keyframes muharram-glow-pulse {
    0%,  100% { opacity: 0.70; transform: translateX(-50%) scale(1);    }
    40%        { opacity: 0.45; transform: translateX(-50%) scale(0.88); }
    70%        { opacity: 0.80; transform: translateX(-50%) scale(1.10); }
}

/* ── Bar text ────────────────────────────────────────────────── */
.muharram-bar-text {
    font-family: Vazirmatn, sans-serif;
    font-size: 0.92rem;
    font-weight: 750;
    color: #ffffff;
    letter-spacing: 0.03em;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    text-shadow:
        0 1px 4px rgba(0,0,0,0.8),
        0 0px 12px rgba(255,255,255,0.08);
    padding: 0 4px;
}

.muharram-bar-separator {
    display: inline-block;
    width: 1px;
    height: 14px;
    background: var(--muh-gold);
    opacity: 0.4;
    margin: 0 10px;
    vertical-align: middle;
}


/* ══════════════════════════════════════════════════════════════
   CALLIGRAPHY IMAGE BAR — dedicated strip between text bar & navbar
   ══════════════════════════════════════════════════════════════ */

.muharram-img-bar {
    width: 100%;
    height: 68px;
    background: #0a0a0a;
    overflow: hidden;
    line-height: 0;
}

.muharram-img-bar__img {
    width: 100%;
    height: 68px;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR — mourning override
   ══════════════════════════════════════════════════════════════ */

.muharram-navbar-accent {
    background-color: #0f0f0f !important;
    border-top: 3px solid #1c1c1c !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.55) !important;
}


/* ══════════════════════════════════════════════════════════════
   FOOTER — mourning override
   ══════════════════════════════════════════════════════════════ */

.muharram-footer {
    background-color: #0f0f0f !important;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER MOURNING BAND
   ══════════════════════════════════════════════════════════════ */

.muharram-footer-band {
    width: 100%;
    background: linear-gradient(
        90deg,
        var(--muh-black)       0%,
        var(--muh-black-soft)  15%,
        var(--muh-crimson)     50%,
        var(--muh-black-soft)  85%,
        var(--muh-black)       100%
    );
    padding: 10px 1rem;
    text-align: center;
    font-family: Vazirmatn, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muh-cream-dim);
    letter-spacing: 0.03em;
    line-height: 1.6;
    border-top: 1px solid rgba(201,168,76,0.25);
    border-bottom: 1px solid rgba(201,168,76,0.10);
}

.muharram-footer-band strong {
    color: var(--muh-cream);
    font-weight: 750;
}


/* ══════════════════════════════════════════════════════════════
   DASHBOARD SIDEBAR BADGE
   ══════════════════════════════════════════════════════════════ */

.muharram-sidebar-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(10,10,10,0.72);
    border: 1px solid rgba(201,168,76,0.30);
    border-radius: 999px;
    padding: 3px 10px 3px 8px;
    font-family: Vazirmatn, sans-serif;
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--muh-cream-dim);
    letter-spacing: 0.02em;
    margin-top: 6px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.muharram-sidebar-badge .muharram-sidebar-flame {
    font-size: 0.78rem;
    line-height: 1;
    filter: brightness(0.78) saturate(0.7);
}


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 575.98px) {
    .muharram-img-bar {
        height: 48px;
    }

    .muharram-bar {
        height: auto;
        min-height: 38px;
        padding: 6px 0.5rem;
        flex-wrap: nowrap;
    }
    .muharram-bar-text {
        font-size: 0.76rem;
        white-space: normal;
        line-height: 1.45;
    }
    .muharram-candle--secondary {
        display: none;
    }
    .muharram-bar-separator {
        display: none;
    }
    .muharram-footer-band {
        font-size: 0.76rem;
        padding: 8px 0.75rem;
    }
}

@media (max-width: 359.98px) {
    .muharram-candle {
        display: none;
    }
    .muharram-bar-text {
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .muharram-flame::before,
    .muharram-flame::after,
    .muharram-candle-glow {
        animation: none;
    }
}
