:root {
    --bg: #f5f7fb;
    --text: #172033;
    --muted: #667085;
    --brand: #c1121f;
    --card: #ffffff;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: min(1180px, 92%);
    margin: auto;
}

/* HEADER */

body.menu-open {
    overflow: hidden;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    overflow: visible;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.header-main {
    position: relative;
    z-index: 3;
    background: #ffffff;
}

.header-main-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

.site-brand-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), #ef476f);
    box-shadow: 0 10px 25px rgba(193, 18, 31, 0.25);
    font-size: 24px;
    font-weight: 900;
}

.site-brand-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-brand-name {
    color: var(--text);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
}

.site-brand-tagline {
    color: var(--muted);
    font-size: 12px;
}

/* SEARCH */

.desktop-search {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
}

.search-box {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 5px 5px 5px 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-box:focus-within {
    border-color: rgba(193, 18, 31, 0.55);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(193, 18, 31, 0.08);
}

.search-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-box input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 14px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.search-box button {
    height: 38px;
    padding: 0 19px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    color: #ffffff;
    background: var(--brand);
    font-weight: 700;
}

.search-box button:hover {
    filter: brightness(0.92);
}

.mobile-menu-toggle {
    width: 46px;
    height: 46px;
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 13px;
    cursor: pointer;
    background: #f8fafc;
}

.mobile-menu-toggle span {
    width: 21px;
    height: 2px;
    border-radius: 100px;
    background: var(--text);
}

/* NAVIGATION */

.main-navigation {
    position: relative;
    z-index: 2;
    background: #0f172a;
}

.navigation-inner {
    position: relative;
}

.navigation-links {
    min-height: 56px;
    display: flex;
    align-items: stretch;
    gap: 2px;
}

.navigation-home,
.navigation-link {
    position: relative;
    min-height: 56px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.navigation-home {
    gap: 8px;
}

.navigation-home svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.navigation-home:hover,
.navigation-link:hover,
.navigation-home.active,
.navigation-link.active {
    color: #ffffff;
    background: #1e293b;
}

.navigation-home::after,
.navigation-link::after {
    position: absolute;
    right: 14px;
    bottom: 0;
    left: 14px;
    height: 3px;
    border-radius: 4px 4px 0 0;
    background: var(--brand);
    content: "";
    opacity: 0;
    transform: scaleX(0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.navigation-home.active::after,
.navigation-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.navigation-item {
    position: relative;
}

.navigation-item-main {
    height: 100%;
    display: flex;
    align-items: stretch;
}

.navigation-item.has-dropdown .navigation-link {
    padding-right: 5px;
}

.dropdown-toggle {
    width: 32px;
    min-height: 56px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    cursor: pointer;
    color: #94a3b8;
    background: transparent;
}

.dropdown-toggle:hover {
    color: #ffffff;
    background: #1e293b;
}

.dropdown-toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.navigation-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 290px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    visibility: hidden;
    opacity: 0;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.navigation-dropdown::before {
    position: absolute;
    top: -11px;
    right: 0;
    left: 0;
    height: 12px;
    content: "";
}

.navigation-item.has-dropdown:hover .navigation-dropdown,
.navigation-item.has-dropdown:focus-within .navigation-dropdown,
.navigation-item.dropdown-open .navigation-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.navigation-item.has-dropdown:hover .dropdown-toggle svg,
.navigation-item.dropdown-open .dropdown-toggle svg {
    transform: rotate(180deg);
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 7px 12px;
    border-bottom: 1px solid var(--border);
}

.dropdown-header span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dropdown-header a {
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
}

.dropdown-links {
    display: grid;
    gap: 4px;
    padding-top: 8px;
}

.dropdown-links > a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;
    border-radius: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dropdown-links > a:hover,
.dropdown-links > a.active {
    color: var(--brand);
    background: #fff1f2;
    transform: translateX(3px);
}

.dropdown-link-icon {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 8px;
    color: var(--brand);
    background: #ffe4e6;
}

.dropdown-link-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-navigation-header,
.mobile-search,
.mobile-menu-overlay {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* MAIN */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    padding: 30px 0;
}

/* HERO */

.hero {
    position: relative;
    min-height: 420px;
    background: #111111;
    border-radius: 16px;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    opacity: 0.55;
}

.hero-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 32px;
    color: #ffffff;
}

.hero h1 {
    margin: 12px 0;
    font-size: 38px;
    line-height: 1.2;
}

.hero h1 a:hover {
    text-decoration: underline;
}

/* BADGE */

.badge {
    display: inline-block;
    background: var(--brand);
    color: #ffffff;
    font-size: 12px;
    padding: 6px 9px;
    border-radius: 999px;
    font-weight: 700;
}

/* SECTIONS */

.section-title {
    margin: 32px 0 18px;
    font-size: 28px;
}

/* NEWS GRID */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition:
            transform 0.2s ease,
            box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.card > a {
    display: block;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}

.card h3 {
    margin: 10px 0;
    font-size: 19px;
    line-height: 1.35;
}

.card h3 a:hover {
    color: var(--brand);
}

.card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.55;
}

.card time,
.article-meta {
    color: var(--muted);
    font-size: 13px;
}

.card time {
    margin-top: auto;
}

/* SIDEBAR */

.widget {
    position: sticky;
    top: 130px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.widget h3 {
    margin-top: 0;
}

.popular-item {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.popular-item:last-child {
    border-bottom: 0;
}

.popular-item:hover strong {
    color: var(--brand);
}

.popular-item small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

/* ARTICLE */

.article-wrap {
    max-width: 860px;
    padding: 40px 0;
}

.article-page {
    background: #ffffff;
    padding: 36px;
    border-radius: 16px;
}

.article-page h1 {
    margin: 16px 0;
    font-size: 42px;
    line-height: 1.15;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.article-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 14px;
    margin: 24px 0;
}

.lead {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.5;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.article-content img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.article-content a {
    color: var(--brand);
    text-decoration: underline;
}

.source {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.source a {
    color: var(--brand);
}

/* FOOTER */

footer {
    margin-top: 40px;
    background: #111827;
    color: #ffffff;
    padding: 28px 0;
}

footer a {
    color: #ffffff;
    text-decoration: underline;
}

/* ADMIN */

.admin-bg {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.admin-card {
    width: min(420px, 92%);
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    display: grid;
    gap: 14px;
}

.error {
    color: #b42318;
}

.admin-header {
    background: #111827;
    color: #ffffff;
    padding: 16px;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header nav {
    display: flex;
    gap: 20px;
}

.admin-main {
    padding: 30px 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stats div {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
}

.stats b {
    display: block;
    font-size: 28px;
}

.stats span {
    color: var(--muted);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.editor {
    display: grid;
    gap: 14px;
    background: #ffffff;
    padding: 24px;
    border-radius: 14px;
}

.editor textarea {
    min-height: 110px;
    resize: vertical;
}

.editor .content-input {
    min-height: 360px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* TABLET DHE MOBILE */

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        display: none;
    }

    .header-main-inner {
        min-height: 70px;
        gap: 14px;
    }

    .site-brand {
        min-width: 0;
    }

    .site-brand-icon {
        width: 43px;
        height: 43px;
        border-radius: 13px;
        font-size: 21px;
    }

    .site-brand-content {
        min-width: 0;
    }

    .site-brand-name {
        max-width: 190px;
        overflow: hidden;
        font-size: 18px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-brand-tagline {
        font-size: 11px;
    }

    .desktop-search {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .main-navigation {
        position: fixed;
        z-index: 10002;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(88vw, 390px);
        overflow-y: auto;
        background: #ffffff;
        box-shadow: -20px 0 60px rgba(15, 23, 42, 0.25);
        transform: translateX(105%);
        transition: transform 0.3s ease;
    }

    .main-navigation.is-open {
        transform: translateX(0);
    }

    .navigation-inner {
        width: 100%;
        min-height: 100%;
        padding: 0 16px 30px;
    }

    .mobile-navigation-header {
        min-height: 70px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--border);
    }

    .mobile-navigation-header > span {
        font-size: 18px;
        font-weight: 800;
    }

    .mobile-menu-close {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 12px;
        cursor: pointer;
        color: var(--text);
        background: #f8fafc;
    }

    .mobile-menu-close svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }

    .mobile-search {
        display: block;
        padding: 18px 0;
    }

    .mobile-search-box {
        min-height: 48px;
        display: flex;
        align-items: center;
        padding-left: 14px;
        border: 1px solid var(--border);
        border-radius: 13px;
        background: #f8fafc;
    }

    .mobile-search-box input {
        width: 100%;
        min-width: 0;
        height: 46px;
        padding: 0 11px;
        border: 0;
        outline: 0;
        background: transparent;
    }

    .mobile-search-box button {
        width: 46px;
        height: 46px;
        display: grid;
        place-items: center;
        flex-shrink: 0;
        padding: 0;
        border: 0;
        border-radius: 0 12px 12px 0;
        cursor: pointer;
        color: #ffffff;
        background: var(--brand);
    }

    .mobile-search-box button svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .navigation-links {
        min-height: 0;
        display: block;
    }

    .navigation-home,
    .navigation-link {
        min-height: 50px;
        padding: 0 13px;
        border-radius: 11px;
        color: #334155;
        font-size: 15px;
    }

    .navigation-home:hover,
    .navigation-link:hover,
    .navigation-home.active,
    .navigation-link.active {
        color: var(--brand);
        background: #fff1f2;
    }

    .navigation-home::after,
    .navigation-link::after {
        display: none;
    }

    .navigation-item {
        margin-bottom: 5px;
    }

    .navigation-item-main {
        min-height: 50px;
        align-items: stretch;
        border-radius: 11px;
    }

    .navigation-item.has-dropdown .navigation-link {
        flex: 1;
        padding-right: 10px;
    }

    .dropdown-toggle {
        width: 48px;
        min-height: 50px;
        border-radius: 11px;
        color: var(--muted);
    }

    .navigation-dropdown {
        position: static;
        width: auto;
        max-height: 0;
        margin: 0;
        padding: 0 0 0 17px;
        overflow: hidden;
        border: 0;
        visibility: visible;
        opacity: 1;
        background: transparent;
        box-shadow: none;
        transform: none;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .navigation-dropdown::before,
    .dropdown-header {
        display: none;
    }

    .navigation-item.dropdown-open .navigation-dropdown {
        max-height: 700px;
        padding-top: 7px;
        padding-bottom: 6px;
    }

    .dropdown-links {
        padding: 0 0 0 13px;
        border-left: 2px solid var(--border);
    }

    .dropdown-links > a {
        min-height: 43px;
        padding: 8px 10px;
        font-size: 14px;
    }

    .dropdown-links > a:hover,
    .dropdown-links > a.active {
        transform: none;
    }

    .mobile-menu-overlay {
        position: fixed;
        z-index: 10001;
        inset: 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(3px);
        transition: visibility 0.3s ease, opacity 0.3s ease;
    }

    .mobile-menu-overlay.is-visible {
        visibility: visible;
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .site-brand-tagline {
        display: none;
    }

    .site-brand-name {
        max-width: 175px;
        font-size: 17px;
    }

    .site-brand-icon {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }

    .main-navigation {
        width: min(92vw, 370px);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .hero img {
        min-height: 340px;
        height: 340px;
    }

    .hero-content {
        padding: 22px;
    }

    .hero h1,
    .article-page h1 {
        font-size: 30px;
    }

    .article-page {
        padding: 20px;
    }

    .article-content {
        font-size: 17px;
    }

    .stats,
    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-header .container,
    .admin-header nav {
        flex-direction: column;
        align-items: flex-start;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}