/* ══════════════════════════════════════════════════════════════════════
   Głos Podlasia — Custom Styles
   Portal regionalny, Bootstrap 5 overrides & custom components
   ══════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────────────────── */
:root {
    --gp-red: #c0392b;
    --gp-red-dark: #96281b;
    --gp-dark: #1a1a2e;
    --gp-gray: #f8f9fa;
    --gp-text: #2c3e50;
    --gp-border: #e9ecef;
}

/* ── Typography ─────────────────────────────────────────────────────── */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    color: var(--gp-text);
    background-color: #f5f6f8;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* ── Top bar ────────────────────────────────────────────────────────── */
.topbar {
    font-size: 0.8rem;
}

/* ── Navbar ─────────────────────────────────────────────────────────── */
.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar-brand {
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gp-red) !important;
}

/* ── Article Cards ──────────────────────────────────────────────────── */
.article-card {
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    border-radius: 8px;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.article-card .card-title a {
    transition: color 0.2s;
}

.article-card .card-title a:hover {
    color: var(--gp-red) !important;
}

.article-card__image {
    height: 220px;
    object-fit: cover;
}

.article-card__image--small {
    height: 140px;
    object-fit: cover;
}

.article-card__placeholder {
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.article-card__placeholder--small {
    height: 140px;
    font-size: 2rem;
}

.article-card--featured .card-title {
    font-size: 1.2rem;
}

/* ── Article Detail ─────────────────────────────────────────────────── */
.article-detail__title {
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 800;
}

.article-detail__lead {
    font-size: 1.15rem;
    color: #4a5568;
    border-left: 4px solid var(--gp-red);
    padding-left: 1rem;
}

.article-detail__body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-detail__body p {
    margin-bottom: 1.2rem;
}

.article-detail__body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.article-detail__body blockquote {
    border-left: 4px solid var(--gp-red);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: var(--gp-gray);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.article-detail__body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.article-detail__image img {
    border-radius: 8px;
}

.article-detail__meta {
    font-size: 0.9rem;
}

/* ── Badge overrides ────────────────────────────────────────────────── */
.badge.bg-danger {
    background-color: var(--gp-red) !important;
    font-weight: 500;
}

/* ── Navbar dropdown ────────────────────────────────────────────────── */
@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

.dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0,0,0,.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    font-size: 0.88rem;
}

.dropdown-item {
    padding: 0.4rem 1.2rem;
    transition: background 0.15s;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--gp-gray);
    color: var(--gp-red);
}

/* ── Sidebar ────────────────────────────────────────────────────────── */
.sidebar-section h5 {
    font-size: 1rem;
}

/* ── Article detail page ────────────────────────────────────────────── */
.article-detail-wrapper {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.article-detail__author-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.article-detail__author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gp-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.article-detail__share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gp-border);
    color: var(--gp-text);
    transition: all 0.2s;
    text-decoration: none;
    font-size: 1rem;
}

.article-detail__share-btn:hover {
    border-color: var(--gp-red);
    color: var(--gp-red);
    transform: translateY(-2px);
}

.article-detail__share-btn--fb:hover {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.article-detail__share-btn--tw:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.article-detail__share-btn--wa:hover {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}

.article-detail__share-btn--mail:hover {
    background: var(--gp-red);
    color: #fff;
    border-color: var(--gp-red);
}

.sidebar-related__item {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0;
    text-decoration: none;
    transition: background 0.15s;
}

.sidebar-related__item:hover h6 {
    color: var(--gp-red) !important;
}

.sidebar-related__img {
    width: 80px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.sidebar-related__placeholder {
    width: 80px;
    height: 56px;
    border-radius: 6px;
    background: var(--gp-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
footer a:hover {
    color: var(--gp-red) !important;
}

/* ── Pagination ─────────────────────────────────────────────────────── */
.page-link {
    color: var(--gp-red);
}

.page-item.active .page-link {
    background-color: var(--gp-red);
    border-color: var(--gp-red);
}

/* ── Search ─────────────────────────────────────────────────────────── */
.form-control:focus {
    border-color: var(--gp-red);
    box-shadow: 0 0 0 0.2rem rgba(192, 57, 43, 0.15);
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .article-detail__title {
        font-size: 1.5rem;
    }

    .article-card__image {
        height: 160px;
    }

    .article-card__placeholder {
        height: 160px;
    }

    .topbar {
        display: none !important;
    }

    .regional-tabs .nav-link {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
}

/* ── Section headers ────────────────────────────────────────────────── */
.section-title {
    position: relative;
    font-weight: 700;
}

.section-title__accent {
    display: inline-block;
    width: 4px;
    height: 1.1em;
    background: var(--gp-red);
    border-radius: 2px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.section-header {
    border-bottom: 2px solid var(--gp-border);
    padding-bottom: 0.5rem;
}

/* ── Latest items (compact list) ────────────────────────────────────── */
.latest-item {
    transition: transform 0.15s, box-shadow 0.15s;
}

.latest-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.latest-item__img {
    width: 100px;
    height: 70px;
    object-fit: cover;
}

.latest-item__placeholder {
    width: 100px;
    height: 70px;
}

.latest-item__link {
    transition: color 0.15s;
}

.latest-item__link:hover {
    color: var(--gp-red) !important;
}

/* ── Category list items ────────────────────────────────────────────── */
.cat-list-item {
    transition: background 0.15s;
}

.cat-list-item:hover {
    background: var(--gp-gray) !important;
}

.cat-list-item__img {
    width: 60px;
    height: 45px;
    object-fit: cover;
}

/* ── Regional tabs ──────────────────────────────────────────────────── */
.regional-tabs .nav-link {
    color: var(--gp-text);
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

.regional-tabs .nav-link.active {
    background: var(--gp-red) !important;
    color: #fff !important;
}

.regional-tabs .nav-link:not(.active):hover {
    background: var(--gp-gray);
}

/* ── Sidebar widgets ────────────────────────────────────────────────── */
.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.sidebar-widget--cta {
    background: linear-gradient(135deg, var(--gp-red) 0%, var(--gp-red-dark) 100%);
}

.sidebar-widget__title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gp-border);
}

.sidebar-widget--cta .sidebar-widget__title {
    border-bottom-color: rgba(255,255,255,.2);
}

/* ── Popular list ───────────────────────────────────────────────────── */
.popular-list__item {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem 0;
    align-items: flex-start;
}

.popular-list__rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gp-gray);
    color: var(--gp-red);
    font-weight: 800;
    font-size: 0.8rem;
    border-radius: 6px;
}

.popular-list__item:nth-child(-n+3) .popular-list__rank {
    background: var(--gp-red);
    color: #fff;
}

.popular-list__content {
    min-width: 0;
}

.popular-list__link {
    display: block;
    color: var(--gp-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.15s;
}

.popular-list__link:hover {
    color: var(--gp-red);
}

/* ── Cookie consent banner ──────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(26, 26, 46, 0.97);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transform: translateY(0);
    transition: transform 0.3s;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

@media (max-width: 575.98px) {
    .article-card__image--small {
        height: 120px;
    }
}

/* ── Breadcrumb ─────────────────────────────────────────────────────── */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* ── Admin quick link ───────────────────────────────────────────────── */
.btn-danger {
    background-color: var(--gp-red);
    border-color: var(--gp-red);
}

.btn-danger:hover {
    background-color: var(--gp-red-dark);
    border-color: var(--gp-red-dark);
}

.btn-outline-danger {
    color: var(--gp-red);
    border-color: var(--gp-red);
}

.btn-outline-danger:hover {
    background-color: var(--gp-red);
    border-color: var(--gp-red);
}

/* ── Empty state ────────────────────────────────────────────────────── */
.display-1.text-muted,
.display-4.text-muted {
    opacity: 0.3;
}
