/* Header megafon ikonu badge */
.announcements .nav-link.icon { position: relative; }
#announcement-badge {
    position: absolute;
    top: 6px; right: 2px;
    width: 8px; height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 0 2px white;
    animation: ann-pulse 2s infinite;
    display: none;
}
@keyframes ann-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* Dropdown içi duyuru listesi */
.announcements .dropdown-menu { min-width: 340px; padding: 0; }
.announcements .drop-heading {
    padding: 12px 16px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border-radius: 8px 8px 0 0;
}
.announcements .drop-heading h6 i { color: #6366f1; margin-right: 6px; }
.announcements-menu { max-height: 420px; overflow-y: auto; }
.ann-empty {
    padding: 30px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.ann-item {
    display: flex !important;
    gap: 12px;
    padding: 12px 16px !important;
    border-bottom: 1px solid #f1f5f9;
    white-space: normal !important;
    transition: background 0.15s ease;
}
.ann-item:hover { background: #f8fafc !important; }
.ann-item-unread {
    background: linear-gradient(90deg, rgba(239,68,68,0.06) 0%, transparent 60%);
    border-left: 3px solid #ef4444;
    padding-left: 13px !important;
}
.ann-item-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1rem;
}
.ann-item-content { flex: 1; min-width: 0; }
.ann-item-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.ann-item-head strong {
    font-size: 0.88rem; color: #1e293b; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ann-item-head small { color: #94a3b8; font-size: 0.72rem; flex-shrink: 0; }
.ann-item-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: 0.03em;
}

/* Kategori renkleri */
.ann-cat-YENILIK  { background: #10b981; color: white; }
.ann-cat-KAMPANYA { background: #f59e0b; color: white; }
.ann-cat-LISANS   { background: #ef4444; color: white; }
.ann-cat-BAKIM    { background: #6366f1; color: white; }
.ann-cat-DUYURU   { background: #3b82f6; color: white; }

/* Öncelik renkleri */
.ann-pr-KRITIK { background: #991b1b; color: white; }
.ann-pr-DIKKAT { background: #c2410c; color: white; }
.ann-pr-BILGI  { background: #1e40af; color: white; }

/* Modal stil */
.ann-modal-wrap .modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}
.ann-modal-header {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
}
.ann-modal-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.ann-modal-header-text { flex: 1; min-width: 0; }
.ann-modal-chips { display: flex; gap: 6px; margin-bottom: 4px; }
.ann-modal-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}
.ann-modal-title {
    margin: 0; font-size: 1.15rem; font-weight: 800;
}

.ann-modal-body {
    padding: 22px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #334155;
    max-height: 400px;
    overflow-y: auto;
}
.ann-modal-body img { max-width: 100%; border-radius: 8px; }
.ann-modal-image { margin: 0 auto 16px; display: block; max-width: 100%; border-radius: 8px; }

.ann-modal-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 22px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}
.ann-modal-phone {
    font-size: 0.85rem; color: #475569;
}
.ann-modal-phone a {
    font-weight: 800; color: #4f46e5; text-decoration: none;
}
.ann-modal-actions { display: flex; gap: 8px; margin-left: auto; }
.ann-modal-dismiss {
    padding: 8px 18px;
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
}
.ann-modal-dismiss:hover { background: #f1f5f9; color: #334155; }
.ann-modal-cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 22px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.88rem;
}
.ann-modal-cta:hover { color: white; text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.35); }

/* Dark mode */
body.dark-mode .announcements .dropdown-menu { background: #1e293b; border-color: #334155; }
body.dark-mode .announcements .drop-heading { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); color: #f1f5f9; }
body.dark-mode .announcements .drop-heading h6 { color: #f1f5f9 !important; }
body.dark-mode .announcements .dropdown-divider { border-color: #334155; }
body.dark-mode .ann-empty { color: #64748b; }
body.dark-mode .ann-item { border-bottom-color: #334155; color: #cbd5e1; }
body.dark-mode .ann-item:hover { background: #0f172a !important; }
body.dark-mode .ann-item-head strong { color: #f1f5f9; }
body.dark-mode .ann-item-head small { color: #64748b; }

body.dark-mode .ann-modal-wrap .modal-content { background: #1e293b; color: #f1f5f9; }
body.dark-mode .ann-modal-body { color: #cbd5e1; }
body.dark-mode .ann-modal-body-text,
body.dark-mode .ann-modal-body-text * { color: #cbd5e1; }
body.dark-mode .ann-modal-footer { background: #0f172a; border-top-color: #334155; }
body.dark-mode .ann-modal-phone { color: #94a3b8; }
body.dark-mode .ann-modal-phone a { color: #a5b4fc; }
body.dark-mode .ann-modal-dismiss { color: #cbd5e1; border-color: #334155; background: transparent; }
body.dark-mode .ann-modal-dismiss:hover { background: #0f172a; color: #f1f5f9; }

/* Mobil */
@media (max-width: 640px) {
    .announcements .dropdown-menu { min-width: 300px; }
    .ann-modal-header { padding: 14px 16px; }
    .ann-modal-body { padding: 16px; }
    .ann-modal-footer { padding: 12px 16px; }
    .ann-modal-actions { width: 100%; }
    .ann-modal-cta, .ann-modal-dismiss { flex: 1; justify-content: center; }
}

/* Liste sayfası (announcementList.php) */
.duyuru-list { display: flex; flex-direction: column; gap: 12px; }
.duyuru-card {
    display: flex; gap: 16px;
    background: white; border-radius: 14px; padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.15s ease;
}
.duyuru-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.duyuru-card.unread { border-left: 4px solid #ef4444; }
.duyuru-card .icon-wrap {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.3rem;
}
.duyuru-card .body { flex: 1; }
.duyuru-card .chips { display: flex; gap: 6px; margin-bottom: 6px; }
.duyuru-card .chip {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 0.7rem; font-weight: 700;
}
.duyuru-card h4 { font-size: 1rem; font-weight: 800; color: #1e293b; margin: 0 0 8px; }
.duyuru-card .content { color: #475569; line-height: 1.55; font-size: 0.9rem; }
.duyuru-card .meta {
    margin-top: 10px; font-size: 0.8rem; color: #94a3b8;
    display: flex; gap: 16px; flex-wrap: wrap;
}
.duyuru-card .cta {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white; border-radius: 10px; font-weight: 700; text-decoration: none;
    font-size: 0.85rem;
}
body.dark-mode .duyuru-card { background: #1e293b; border-color: #334155; }
body.dark-mode .duyuru-card h4 { color: #f1f5f9; }
body.dark-mode .duyuru-card .content { color: #cbd5e1; }
@media (max-width: 640px) { .duyuru-card { padding: 14px; } }
