/* ═══════════════════════════════════════════════
   Gurmat School Noticeboard — Front-End Styles
   ═══════════════════════════════════════════════ */

:root {
    --gnb-bg:     #1a7a3e;
    --gnb-text:   #ffffff;
    --gnb-accent: #f5a623;
    --gnb-radius: 16px;
    --gnb-shadow: 0 8px 40px rgba(0,0,0,.18);
}

.gnb-board {
    background: var(--gnb-bg);
    color: var(--gnb-text);
    border-radius: var(--gnb-radius);
    box-shadow: var(--gnb-shadow);
    overflow: hidden;
    max-width: 860px;
    margin: 32px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

/* ── Decorative top stripe ── */
.gnb-board::before {
    content: '';
    display: block;
    height: 6px;
    background: linear-gradient(90deg, var(--gnb-accent) 0%, #ffda44 50%, var(--gnb-accent) 100%);
}

/* ── Header ── */
.gnb-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    background: rgba(0,0,0,.15);
    border-bottom: 1px solid rgba(255,255,255,.1);
    flex-wrap: wrap;
    gap: 12px;
}
.gnb-board-header-inner { display:flex; align-items:center; gap:14px; }
.gnb-board-icon {
    width: 52px; height: 52px;
    background: rgba(255,255,255,.15);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gnb-text);
    flex-shrink: 0;
}
.gnb-icon-emoji { font-size: 1.7rem; line-height: 1; }
.gnb-board-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--gnb-text);
}
.gnb-board-subtitle {
    margin: 2px 0 0;
    font-size: .83rem;
    opacity: .75;
    color: var(--gnb-text);
}
.gnb-board-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.gnb-board-count {
    background: var(--gnb-accent);
    color: #1a1a1a;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
}
.gnb-board-date { font-size: .78rem; opacity: .65; }

/* ── Urgent Ticker ── */
.gnb-ticker {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,.25);
    border-bottom: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
    height: 38px;
}
.gnb-ticker-label {
    background: var(--gnb-accent);
    color: #1a1a1a;
    font-weight: 700;
    font-size: .75rem;
    padding: 0 14px;
    white-space: nowrap;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    letter-spacing: .5px;
}
.gnb-ticker-track { flex: 1; overflow: hidden; }
.gnb-ticker-inner {
    display: flex;
    gap: 60px;
    white-space: nowrap;
    animation: gnb-ticker 18s linear infinite;
    font-size: .82rem;
    opacity: .9;
    padding: 0 24px;
}
.gnb-ticker-inner span::after { content: ' ●'; opacity: .4; margin-left: 60px; }
@keyframes gnb-ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Notice Wrapper ── */
.gnb-notices-wrap { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 14px; }

/* ── Individual Notice Card ── */
.gnb-notice {
    display: flex;
    gap: 14px;
    background: rgba(255,255,255,.92);
    color: #1c2b1c;
    border-radius: 12px;
    padding: 18px 20px;
    border-left: 5px solid rgba(255,255,255,.4);
    transition: transform .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}
.gnb-notice::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle at top right, rgba(26,122,62,.08) 0%, transparent 70%);
    pointer-events: none;
}
.gnb-notice:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.15); }

.gnb-notice-urgent {
    background: rgba(255,255,255,.97);
    border-left-color: var(--gnb-accent);
    box-shadow: 0 4px 20px rgba(245,166,35,.2);
}

/* Animation variants */
.gnb-board[data-animation="slide"] .gnb-notice  { animation: gnb-slideIn .35s ease both; }
.gnb-board[data-animation="fade"]  .gnb-notice  { animation: gnb-fadeIn  .4s ease both;  }
.gnb-board[data-animation="bounce"].gnb-notice  { animation: gnb-bounce  .5s ease both;  }

@keyframes gnb-slideIn  { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:none; } }
@keyframes gnb-fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes gnb-bounce   { 0% { transform:scale(.9); opacity:0; } 60% { transform:scale(1.03); } 100% { transform:scale(1); opacity:1; } }

.gnb-notice-left { display:flex; flex-direction:column; align-items:center; padding-top:2px; }
.gnb-notice-pin  { font-size:1.4rem; line-height:1; }
.gnb-pin-urgent  { animation: gnb-wiggle 2.5s ease-in-out infinite; }
@keyframes gnb-wiggle { 0%,100%{transform:rotate(0);} 20%{transform:rotate(-8deg);} 40%{transform:rotate(8deg);} 60%{transform:rotate(-4deg);} 80%{transform:rotate(4deg);} }

.gnb-notice-body { flex: 1; min-width: 0; }
.gnb-notice-top  { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-bottom:6px; }

.gnb-notice-cat {
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
    background: #e8f5ee; color: #1a7a3e;
    padding: 2px 9px; border-radius: 20px;
}
.gnb-urgent-badge {
    font-size: .7rem; font-weight: 700;
    background: #fff3cd; color: #856404;
    padding: 2px 9px; border-radius: 20px;
}
.gnb-notice-date { font-size: .72rem; color: #888; margin-left: auto; }

.gnb-notice-title { margin: 0 0 8px; font-size: 1.02rem; font-weight: 700; color: #1c2b1c; line-height: 1.3; }

.gnb-notice-content { font-size: .88rem; line-height: 1.6; color: #3a4a3a; }
.gnb-notice-content p { margin: 0 0 6px; }
.gnb-notice-content p:last-child { margin-bottom: 0; }

.gnb-notice-expiry { margin-top: 10px; font-size: .75rem; color: #c0392b; font-weight: 600; }

/* ── No Notices ── */
.gnb-no-notices {
    text-align: center; padding: 40px 20px;
    background: rgba(255,255,255,.1); border-radius: 12px;
}
.gnb-no-notices-icon { font-size: 2.5rem; margin-bottom: 12px; }
.gnb-no-notices p { margin: 4px 0; opacity: .8; }

/* ── Footer ── */
.gnb-board-footer {
    text-align: center;
    padding: 14px;
    background: rgba(0,0,0,.15);
    font-size: .78rem;
    opacity: .8;
    border-top: 1px solid rgba(255,255,255,.08);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .gnb-board-header  { flex-direction: column; align-items: flex-start; }
    .gnb-board-meta    { align-items: flex-start; }
    .gnb-notices-wrap  { padding: 16px; }
    .gnb-notice        { padding: 14px 16px; }
    .gnb-board-title   { font-size: 1.15rem; }
}
