/* === RESET & BAZA === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:       #142740;
    --navy-mid:   #1e3a5f;
    --blue:       #2563eb;
    --blue-light: #3b82f6;
    --cyan:       #0ea5e9;
    --bg:         #eef2f7;
    --card:       #ffffff;
    --text:       #1e293b;
    --muted:      #64748b;
    --border:     #e2e8f0;
    --accent:     #f59e0b;
    --radius:     8px;
    --shadow:     0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 24px rgba(0,0,0,0.14);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-light); text-decoration: underline; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

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

/* === HEADER === */
.site-header {
    background: linear-gradient(135deg, #071828 0%, #0d2137 30%, #1e3a5f 60%, #1565c0 85%, #0288d1 100%);
    color: white;
    overflow: hidden;
    position: relative;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0288d1, #29b6f6, #81d4fa, #29b6f6, #0288d1);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo a { text-decoration: none; }

.logo-text {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1.5px;
}

.logo-poke  { color: #fff;    text-shadow: 2px 2px 0 #0288d1, 4px 4px 0 rgba(2,136,209,.35); }
.logo-beach { color: #29b6f6; text-shadow: 2px 2px 0 #01579b, 4px 4px 0 rgba(1,87,155,.35); }
.logo-ro    { color: #ffd54f; font-size: 2rem; text-shadow: 1px 1px 0 #e65100; }

.logo-tagline {
    color: #b3d9f5;
    font-size: 0.75rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-top: 6px;
    font-weight: 500;
}

/* mascot SVG */
.header-mascot { width: 200px; opacity: 0.9; flex-shrink: 0; }
.mascot-svg    { width: 100%; height: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }

/* === NAVIGATION === */
.main-nav {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 6px;
    flex-direction: column;
    gap: 5px;
    margin-right: 8px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }

.nav-menu { display: flex; align-items: center; flex: 1; }
.nav-menu > li { position: relative; }

.nav-menu > li > a {
    display: block;
    padding: 15px 16px;
    color: #b3d4ed;
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    transition: background .2s, color .2s;
    text-decoration: none;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background: rgba(255,255,255,.1);
    color: #fff;
    text-decoration: none;
}

/* dropdown */
.has-dropdown .dropdown {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    background: #1a3a5f;
    min-width: 190px;
    border-top: 2px solid var(--cyan);
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
    z-index: 300;
}
.has-dropdown:hover .dropdown,
.has-dropdown.dropdown-open .dropdown { display: block; }

.dropdown li a {
    display: block;
    padding: 10px 18px;
    color: #b3d4ed;
    font-size: .84rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: background .2s, color .2s;
    text-decoration: none;
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* nav actions */
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-left: 12px; }

.search-form {
    display: flex;
    background: rgba(255,255,255,.1);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.2);
    overflow: hidden;
}
.search-input {
    background: none; border: none; color: #fff;
    padding: 6px 12px; font-size: .83rem; width: 145px; outline: none;
}
.search-input::placeholder { color: rgba(255,255,255,.45); }
.search-btn { background: none; border: none; color: #fff; padding: 6px 10px; cursor: pointer; font-size: .9rem; }

.btn-nav {
    padding: 6px 14px; border-radius: 20px;
    font-size: .8rem; font-weight: 600;
    text-decoration: none; transition: .2s; white-space: nowrap;
}
.btn-login  { color: #b3d4ed; border: 1px solid rgba(255,255,255,.25); }
.btn-login:hover  { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.btn-register     { background: var(--blue); color: #fff; }
.btn-register:hover { background: var(--blue-light); color: #fff; text-decoration: none; }

.nav-username {
    color: #fff; font-size: .82rem; font-weight: 600;
    padding: 4px 12px 4px 4px; white-space: nowrap;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    text-decoration: none;
    transition: background .2s;
    display: flex; align-items: center; gap: 7px;
}
.nav-username:hover { background: rgba(255,255,255,.28); color: #fff; text-decoration: none; }
.nav-avatar-img {
    width: 30px; height: 30px; border-radius: 50%;
    object-fit: cover; background: #e8f0fe;
    border: 2px solid rgba(255,255,255,.5);
    flex-shrink: 0;
}
.btn-logout {
    padding: 6px 14px; border-radius: 20px;
    font-size: .8rem; font-weight: 600; cursor: pointer;
    color: #fca5a5; border: 1px solid rgba(252,165,165,.35);
    background: none; transition: .2s; white-space: nowrap;
}
.btn-logout:hover { background: rgba(220,38,38,.15); color: #fca5a5; }

/* === LAYOUT === */
.site-wrapper {
    max-width: 1200px;
    margin: 28px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 285px;
    gap: 28px;
    align-items: start;
}

/* === ARTICLES === */
.article-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 210px 1fr;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.article-image-link { display: block; }

.article-image {
    width: 210px;
    min-height: 150px;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 10px;
    position: relative;
    overflow: hidden;
    transition: filter .3s;
}
.article-card:hover .article-image { filter: brightness(1.1); }

.article-image::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 35%, rgba(255,255,255,.18) 0%, transparent 65%);
}

.article-img {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 58%;
    height: 95%;
    object-fit: contain;
    object-position: bottom right;
    z-index: 1;
    filter: drop-shadow(-4px 0 12px rgba(0,0,0,.35));
    transition: transform .4s ease;
}
.article-card:hover .article-img { transform: scale(1.07) translateY(-4px); }

.image-label {
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 10px;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.article-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--blue); text-decoration: none; }

.article-meta {
    font-size: .78rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.article-meta a { color: var(--muted); }
.article-meta a:hover { color: var(--blue); }
.meta-sep { color: #cbd5e1; }
.article-comments { font-weight: 700; color: var(--blue) !important; }

.article-excerpt { font-size: .87rem; color: #475569; line-height: 1.65; }

/* === PAGINATION === */
.pagination { margin: 4px 0 28px; }
.page-list  { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.page-item .page-link {
    display: flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: .87rem;
    transition: .2s;
    text-decoration: none;
}
.page-item .page-link:hover,
.page-item.active .page-link {
    background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none;
}
.page-item.ellipsis span { padding: 0 4px; color: var(--muted); }
.page-link.next { padding: 0 16px; font-weight: 600; }

/* === SIDEBAR === */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 62px; }

.widget { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.widget-title {
    background: var(--navy-mid);
    color: #fff;
    padding: 11px 16px;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.widget-content { padding: 16px; }

.archive-select {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--border); border-radius: 6px;
    font-size: .85rem; color: var(--text);
    background: var(--bg); cursor: pointer; outline: none;
}
.archive-select:focus { border-color: var(--blue); }

.widget-about p {
    font-size: .84rem; color: #475569; line-height: 1.65; margin-bottom: 8px;
}
.widget-about p:last-child { margin-bottom: 0; }

.categories-list li a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 16px;
    color: var(--text);
    font-size: .84rem;
    border-bottom: 1px solid var(--border);
    transition: background .2s, color .2s;
    text-decoration: none;
}
.categories-list li:last-child a { border-bottom: none; }
.categories-list li a:hover,
.categories-list li a.active { background: #e8f0fe; color: var(--blue); text-decoration: none; font-weight: 700; }
.categories-list .count { color: var(--muted); font-size: .76rem; }

.dropdown li a.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 700; }

/* === FOOTER === */
.site-footer {
    background: var(--navy);
    color: #8faec9;
    margin-top: 40px;
    padding: 32px 24px 80px;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-links {
    display: flex; gap: 24px; flex-wrap: wrap;
    margin-bottom: 20px; padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-links li a { color: #90b4d0; font-size: .84rem; font-weight: 600; transition: color .2s; }
.footer-links li a:hover { color: #fff; text-decoration: none; }

.footer-copy p { font-size: .76rem; line-height: 1.75; margin-bottom: 5px; color: #5e82a0; }
.footer-copy p:last-child { margin-bottom: 0; }

.footer-social {
    display: flex; gap: 10px; justify-content: center;
    margin-bottom: 18px; flex-wrap: wrap;
}
.footer-social-link {
    display: inline-flex; align-items: center; gap: 7px;
    color: rgba(255,255,255,.55); text-decoration: none;
    font-size: .82rem; font-weight: 600;
    padding: 7px 18px; border-radius: 22px;
    border: 1.5px solid rgba(255,255,255,.15);
    transition: color .2s, border-color .2s, background .2s;
}
.footer-social-link:hover { text-decoration: none; background: rgba(255,255,255,.07); }
.footer-social-link.yt:hover { color: #ff4444; border-color: rgba(255,68,68,.5); }
.footer-social-link.tt:hover { color: #69c9d0; border-color: rgba(105,201,208,.5); }
.footer-by { opacity: .45; font-size: .74rem; letter-spacing: .01em; }
.footer-by strong { color: rgba(255,255,255,.8); opacity: 1; font-weight: 700; }

/* back to top */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--blue); color: #fff;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; box-shadow: 0 4px 12px rgba(37,99,235,.45);
    transition: opacity .3s, transform .2s;
    opacity: 0; pointer-events: none;
    text-decoration: none;
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { background: var(--blue-light); color: #fff; transform: translateY(-2px); text-decoration: none; }

/* === RESPONSIVE === */
@media (max-width: 960px) {
    .site-wrapper { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .article-card { grid-template-columns: 170px 1fr; }
    .article-image { width: 170px; }
    .header-mascot { width: 150px; }
    .logo-text { font-size: 2.4rem; }
}

/* === FEED HEADER === */
.feed-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy-mid);
    letter-spacing: .3px;
}

.result-count {
    font-size: .8rem;
    color: var(--muted);
}

/* === LOADING / FARA REZULTATE === */
.loading {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
}

.no-results {
    background: var(--card);
    border-radius: var(--radius);
    padding: 48px 32px;
    text-align: center;
}

.no-results p {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 18px;
}

.btn-reset {
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 9px 22px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.btn-reset:hover { background: var(--blue-light); }

/* === CATEGORII SIDEBAR — aliniere nume + numar === */
.categories-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.cat-name { flex: 1; }

/* === DROPDOWN NAV — click pe link cu data-cat inchide dropdown === */
.dropdown li a[data-cat-filter] { cursor: pointer; }

@media (max-width: 680px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        display: none; position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--navy); flex-direction: column;
        padding: 6px 0; box-shadow: 0 8px 20px rgba(0,0,0,.35);
    }
    .nav-menu.open { display: flex; }
    .nav-menu > li > a { padding: 13px 22px; }
    .has-dropdown .dropdown {
        position: static; display: block;
        padding-left: 18px; background: rgba(255,255,255,.04);
        box-shadow: none; border-top: none;
    }
    .nav-actions { flex-wrap: wrap; padding: 10px 22px; }
    .search-input { width: 110px; }
    .article-card { grid-template-columns: 1fr; }
    .article-image { width: 100%; min-height: 130px; }
    .header-mascot { display: none; }
    .logo-text { font-size: 2.2rem; }
    .header-inner { padding-bottom: 22px; }
}
