/*
Theme Name: Newsnet
Theme URI: https://presa360.ro
Description: Reuters-inspired premium news theme - clean, professional, whitespace-rich
Author: Newsnet
Version: 1.0
License: GPL v2 or later
Text Domain: newsnet
*/

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

:root {
    --navy: #7B2FBE;
    --navy-light: #1a3a6b;
    --orange: #00BCD4;
    --orange-hover: #e67300;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --white: #ffffff;
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
    --max-width: 1280px;
    --content-width: 800px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-stack);
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* === LINE CLAMP UTILITIES === */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === CONTAINER === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === HEADER === */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-logo img {
    height: 44px;
    width: auto;
}

.header-date {
    position: absolute;
    left: 20px;
    font-size: 0.8rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-menu-toggle {
    display: none;
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    margin: 5px 0;
    transition: 0.3s;
}

/* === NAVIGATION === */
.main-nav {
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}

.main-nav .container {
    display: flex;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    gap: 0;
}

.main-nav li a {
    display: block;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--navy);
    border-bottom: 3px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.main-nav li a:hover,
.main-nav li.current-menu-item a,
.main-nav li.current-menu-parent a,
.main-nav li.current_page_item a {
    color: var(--orange);
    border-bottom-color: var(--orange);
}

/* === HERO SECTION === */
.hero-section {
    padding: 40px 0 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 48px;
}

.hero-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.hero-featured {
    position: relative;
}

.hero-featured .hero-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 2px;
}

.hero-featured .hero-category {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--orange);
}

.hero-featured .hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-featured .hero-title a { color: inherit; }
.hero-featured .hero-title a:hover { color: var(--orange); }

.hero-featured .hero-excerpt {
    margin-top: 12px;
    font-size: 1rem;
    color: var(--gray-700);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-featured .hero-meta {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Hero sidebar stories */
.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-sidebar-item {
    display: flex;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.hero-sidebar-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-sidebar-item .sidebar-thumb {
    flex-shrink: 0;
    width: 140px;
    height: 90px;
    object-fit: cover;
    border-radius: 2px;
}

.hero-sidebar-item .sidebar-content {
    flex: 1;
    min-width: 0;
}

.hero-sidebar-item .sidebar-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--orange);
    margin-bottom: 6px;
}

.hero-sidebar-item .sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-sidebar-item .sidebar-title a { color: inherit; }
.hero-sidebar-item .sidebar-title a:hover { color: var(--orange); }

.hero-sidebar-item .sidebar-meta {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* === LATEST STORIES GRID === */
.stories-section {
    padding: 0 0 48px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--gray-200);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--navy);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--navy);
}

.section-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-link:hover { color: var(--orange-hover); }

.stories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.story-card {}

.story-card .card-image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 12px;
}

.story-card .card-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--orange);
    margin-bottom: 6px;
}

.story-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card .card-title a { color: inherit; }
.story-card .card-title a:hover { color: var(--orange); }

.story-card .card-excerpt {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card .card-meta {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* === CATEGORY SECTION (topic rows) === */
.category-section {
    padding: 0 0 48px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--gray-200);
}

.category-section:last-of-type {
    border-bottom: none;
}

.category-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.category-featured .cat-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 2px;
}

.category-featured .cat-title {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
    margin-top: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-featured .cat-title a { color: inherit; }
.category-featured .cat-title a:hover { color: var(--orange); }

.category-featured .cat-excerpt {
    margin-top: 10px;
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-featured .cat-meta {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.category-list-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--gray-200);
}

.category-list-item:first-child { padding-top: 0; }
.category-list-item:last-child { border-bottom: none; }

.category-list-item .list-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 2px;
}

.category-list-item .list-content {
    flex: 1;
    min-width: 0;
}

.category-list-item .list-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-list-item .list-title a { color: inherit; }
.category-list-item .list-title a:hover { color: var(--orange); }

.category-list-item .list-meta {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* === SINGLE ARTICLE === */
.article-header {
    max-width: var(--content-width);
    margin: 48px auto 32px;
    padding: 0 20px;
}

.article-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--orange);
    margin-bottom: 12px;
}

.article-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
    margin-bottom: 16px;
}

.article-excerpt-single {
    font-size: 1.2rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 16px;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--gray-500);
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.article-featured-image {
    max-width: 960px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.article-featured-image img {
    width: 100%;
    border-radius: 2px;
}

.article-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 20px 60px;
}

.article-content p {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-800);
    margin-bottom: 24px;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin: 40px 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin: 32px 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin: 28px 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-content ul, .article-content ol {
    margin: 0 0 24px 28px;
    list-style: disc;
}

.article-content ol { list-style: decimal; }

.article-content li {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.article-content blockquote {
    border-left: 4px solid var(--orange);
    padding: 16px 24px;
    margin: 28px 0;
    background: var(--gray-100);
}

.article-content blockquote p {
    font-style: italic;
    margin-bottom: 0;
}

.article-content img {
    border-radius: 2px;
    margin: 24px 0;
}

.article-content figure {
    margin: 28px 0;
}

.article-content figcaption {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 8px;
}

/* Related articles */
.related-articles {
    max-width: var(--content-width);
    margin: 0 auto 60px;
    padding: 40px 20px 0;
    border-top: 2px solid var(--navy);
}

.related-articles h2 {
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--navy);
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.related-grid .story-card .card-title {
    font-size: 0.9375rem;
}

/* === ARCHIVE === */
.archive-header {
    padding: 40px 0 32px;
    border-bottom: 2px solid var(--navy);
    margin-bottom: 40px;
}

.archive-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.archive-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 16px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--gray-200);
}

.archive-featured .af-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 2px;
}

.archive-featured .af-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.archive-featured .af-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--orange);
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.archive-featured .af-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-featured .af-title a { color: inherit; }
.archive-featured .af-title a:hover { color: var(--orange); }

.archive-featured .af-excerpt {
    margin-top: 14px;
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-featured .af-meta {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 40px 0 60px;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--gray-300);
    border-radius: 2px;
    color: var(--navy);
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.pagination .current {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* === FOOTER === */
.site-footer {
    background: var(--navy);
    color: var(--gray-400);
    padding: 48px 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-top: 16px;
    color: var(--gray-500);
}

.footer-brand .footer-logo img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-links li { margin-bottom: 10px; }

.footer-links a {
    font-size: 0.875rem;
    color: var(--gray-400);
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* === 404 === */
.page-404 {
    text-align: center;
    padding: 100px 20px;
}

.page-404 h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.page-404 p {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin: 20px 0 32px;
}

.page-404 .btn-home {
    display: inline-block;
    padding: 14px 36px;
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 2px;
    transition: background 0.2s;
}

.page-404 .btn-home:hover { background: var(--orange); color: var(--white); }

/* === BREAKING NEWS BAR === */
.breaking-bar {
    background: var(--orange);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 0;
    text-align: center;
    letter-spacing: 0.04em;
}

.breaking-bar span {
    text-transform: uppercase;
    margin-right: 8px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .hero-main { grid-template-columns: 1fr; gap: 32px; }
    .stories-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .category-layout { grid-template-columns: 1fr; gap: 32px; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
    .archive-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .archive-featured { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-date { display: none; }

    .mobile-menu-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .main-nav.active { display: block; }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav li a {
        padding: 14px 20px;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .main-nav li a:hover,
    .main-nav li.current-menu-item a {
        border-bottom: none;
        border-left-color: var(--orange);
    }

    .hero-featured .hero-title { font-size: 1.375rem; }
    .stories-grid { grid-template-columns: 1fr; }
    .archive-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; gap: 28px; }

    .article-title { font-size: 1.75rem; }
    .article-content p,
    .article-content li { font-size: 1rem; }
}

/* === ADMIN BAR FIX === */
.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* === NO THUMBNAIL PLACEHOLDER === */
.no-thumb {
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
