:root {
    --azd-primary: #1b4fd6;
    --azd-red: #d7263d;
    --azd-amber: #f2a900;
    --azd-dark: #0f1b33;
    --bs-primary: var(--azd-primary);
    --bs-primary-rgb: 27, 79, 214;
    --bs-link-color: var(--azd-primary);
    --bs-link-color-rgb: 27, 79, 214;
}

html { font-size: 15px; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
    font-family: "Noto Sans Armenian", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: #f5f7fb;
}

.btn-primary { --bs-btn-bg: var(--azd-primary); --bs-btn-border-color: var(--azd-primary); --bs-btn-hover-bg: #153fb0; --bs-btn-hover-border-color: #153fb0; }
.btn-outline-primary { --bs-btn-color: var(--azd-primary); --bs-btn-border-color: var(--azd-primary); --bs-btn-hover-bg: var(--azd-primary); --bs-btn-hover-border-color: var(--azd-primary); }

/* ---------- Header ---------- */
.topbar { background: var(--azd-dark); color: #cfd8ea; padding: .3rem 0; }
.topbar a { color: #fff; }
.site-header .navbar { position: sticky; top: 0; z-index: 1020; }
.brand-name { font-weight: 700; font-size: 1.25rem; color: var(--azd-dark); }
.brand-tagline { font-size: .7rem; }
.main-menu .nav-link { font-weight: 500; padding-inline: .9rem !important; border-radius: .5rem; }
.main-menu .nav-link.active { background: rgba(27, 79, 214, .1); color: var(--azd-primary); }

.critical-banner { background: var(--azd-red); color: #fff; animation: pulse-bg 2.5s ease-in-out infinite; }
@keyframes pulse-bg { 50% { background: #b01d31; } }

/* ---------- Home ---------- */
.hero { background: linear-gradient(135deg, #0f1b33 0%, #1b4fd6 70%, #3a6cf0 100%); color: #fff; }
.section-tile {
    display: flex; flex-direction: column; gap: .3rem; height: 100%;
    padding: 1.1rem 1.2rem; border-radius: 1rem; color: #fff; text-decoration: none;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); transition: .2s;
}
.section-tile:hover { background: rgba(255, 255, 255, .2); color: #fff; transform: translateY(-2px); }
.section-tile i { font-size: 1.8rem; }
.section-tile span { font-size: .85rem; opacity: .85; }

/* ---------- Cards ---------- */
.item-card { transition: box-shadow .2s, transform .2s; border: 0; box-shadow: 0 1px 3px rgba(15, 27, 51, .08); }
.item-card:hover { box-shadow: 0 8px 24px rgba(15, 27, 51, .12); transform: translateY(-2px); }
.thumb { height: 150px; object-fit: cover; }
.detail-img { max-height: 420px; object-fit: cover; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pre-line { white-space: pre-line; }
.card { border-color: #e4e8f0; }

.ann-type { background: #e9eefc; color: var(--azd-primary); }
.ann-sale, .ann-purchase, .ann-rent { background: #e6f6ec; color: #197a3c; }
.ann-job, .ann-jobseeking { background: #fff4d6; color: #8a6100; }
.ann-lost, .ann-found, .ann-search { background: #fde8eb; color: #a61c2f; }
.ann-question { background: #efe8fd; color: #5b2bb5; }

/* ---------- Notice levels ---------- */
.notice-card { border-left: 5px solid #adb5bd; }
.notice-card .level-badge { background: #e9ecef; color: #495057; }
.notice-card.level-important { border-left-color: var(--azd-amber); }
.notice-card.level-important .level-badge { background: #fff4d6; color: #8a6100; }
.notice-card.level-critical { border-left-color: var(--azd-red); background: #fff7f8; }
.notice-card.level-critical .level-badge { background: var(--azd-red); color: #fff; }

.level-option { border: 2px solid #dee2e6; background: #fff; }
.btn-check:checked + .level-option.level-normal { border-color: #6c757d; background: #f1f3f5; }
.btn-check:checked + .level-option.level-important { border-color: var(--azd-amber); background: #fff8e1; }
.btn-check:checked + .level-option.level-critical { border-color: var(--azd-red); background: #fdecee; }

/* ---------- Rating ---------- */
.stars, .star-btn { color: var(--azd-amber); }
.star-btn { font-size: 1.2rem; line-height: 1; }
.rate-form:hover .star-btn i::before { content: "\F588"; } /* bi-star-fill */
.rate-form .star-btn:hover ~ .star-btn i::before { content: "\F586"; } /* bi-star */

/* ---------- Location picker ---------- */
.lp-chip { font-size: .85rem; font-weight: 500; padding: .45rem .6rem; }
.btn-close-sm { width: .5em; height: .5em; }

/* ---------- Admin ---------- */
.admin-nav .list-group-item.active { background: var(--azd-primary); border-color: var(--azd-primary); }
.sticky-save { position: sticky; bottom: 0; background: #f5f7fb; border-top: 1px solid #e4e8f0; }
.translations td { vertical-align: top; }

/* ---------- Footer ---------- */
.site-footer { background: var(--azd-dark); color: #cfd8ea; }
.site-footer a { color: #fff; text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.site-footer h6 { color: #fff; letter-spacing: .05em; font-size: .8rem; margin-bottom: 1rem; }
.site-footer li { margin-bottom: .4rem; }
.footer-bottom { background: rgba(0, 0, 0, .25); }

.main-menu .nav-link { white-space: nowrap; }
@media (min-width: 1200px) { .nav-search { max-width: 190px; } }
.navbar-brand .brand-name + br { display: none; }
@media (min-width: 1400px) { .navbar-brand .brand-name + br { display: inline; } }

.validation-summary-valid { display: none; }
