/* ======================================
   Planet News - Main Stylesheet
   ====================================== */

/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #f5f5f5;
    --text-main: #1a1a1a;
    --text-muted: #555;
    --accent: #1a1a1a;
    --border: #ddd;
    --radius: 4px;
    --container: 1200px;

    /* Category colors */
    --cat-news: #e8f0fc;
    --cat-news-dark: #2563eb;
    --cat-business: #fef3e8;
    --cat-business-dark: #d97706;
    --cat-finance: #e8faf0;
    --cat-finance-dark: #059669;
    --cat-tech: #e8f8f8;
    --cat-tech-dark: #0891b2;
    --cat-lifestyle: #fce8f4;
    --cat-lifestyle-dark: #db2777;
    --cat-entertainment: #f3e8fc;
    --cat-entertainment-dark: #7c3aed;
    --cat-travel: #fefce8;
    --cat-travel-dark: #ca8a04;
    --cat-society: #f1f5f9;
    --cat-society-dark: #475569;
    --cat-sport: #e8fcef;
    --cat-sport-dark: #16a34a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a1a;
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: 0.2s ease; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

ins.adsbygoogle {
    background: transparent !important;
    background-color: transparent !important;
}

/* Pokud se reklama nevyplní, prvek se úplně skryje */
ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* --- TOP TICKER --- */
.top-ticker {
    background: #1a1a1a;
    padding: 0.5rem 0;
    overflow: hidden;
}
.top-ticker-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ticker-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: #dc2626;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}
.ticker-content {
    flex: 1;
    position: relative;
    height: 1.5rem;
    overflow: hidden;
}
.ticker-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.5s ease;
}
.ticker-item.active {
    opacity: 1;
    transform: translateY(0);
}
.ticker-item.exit {
    opacity: 0;
    transform: translateY(-100%);
}
.ticker-category {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    white-space: nowrap;
}
.ticker-category.news { background: var(--cat-news); color: var(--cat-news-dark); }
.ticker-category.business { background: var(--cat-business); color: var(--cat-business-dark); }
.ticker-category.finance { background: var(--cat-finance); color: var(--cat-finance-dark); }
.ticker-category.technology { background: var(--cat-tech); color: var(--cat-tech-dark); }
.ticker-category.lifestyle { background: var(--cat-lifestyle); color: var(--cat-lifestyle-dark); }
.ticker-category.entertainment { background: var(--cat-entertainment); color: var(--cat-entertainment-dark); }
.ticker-category.travel { background: var(--cat-travel); color: var(--cat-travel-dark); }
.ticker-category.society { background: var(--cat-society); color: var(--cat-society-dark); }
.ticker-category.sport { background: var(--cat-sport); color: var(--cat-sport-dark); }
.ticker-title {
    font-size: 0.8rem;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ticker-title:hover {
    color: #fff;
}
.ticker-nav {
    display: flex;
    gap: 0.25rem;
}
.ticker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #444;
    cursor: pointer;
    transition: background 0.2s;
}
.ticker-dot.active {
    background: #dc2626;
}
.ticker-dot:hover {
    background: #666;
}

/* --- MAIN NAVIGATION --- */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.main-nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 0;
}
.logo {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    color: var(--text-main);
    text-transform: uppercase;
    padding: 1rem 0;
    margin-right: 2rem;
    white-space: nowrap;
}

.nav-categories {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}
.nav-item {
    position: relative;
}
.nav-item > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1rem 1rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.nav-item > a:hover {
    color: var(--text-main);
}
.nav-item.active > a {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

/* Category hover colors */
.nav-item.cat-news > a:hover,
.nav-item.cat-news.active > a { color: var(--cat-news-dark); border-bottom-color: var(--cat-news-dark); }
.nav-item.cat-business > a:hover,
.nav-item.cat-business.active > a { color: var(--cat-business-dark); border-bottom-color: var(--cat-business-dark); }
.nav-item.cat-finance > a:hover,
.nav-item.cat-finance.active > a { color: var(--cat-finance-dark); border-bottom-color: var(--cat-finance-dark); }
.nav-item.cat-technology > a:hover,
.nav-item.cat-technology.active > a { color: var(--cat-tech-dark); border-bottom-color: var(--cat-tech-dark); }
.nav-item.cat-lifestyle > a:hover,
.nav-item.cat-lifestyle.active > a { color: var(--cat-lifestyle-dark); border-bottom-color: var(--cat-lifestyle-dark); }
.nav-item.cat-entertainment > a:hover,
.nav-item.cat-entertainment.active > a { color: var(--cat-entertainment-dark); border-bottom-color: var(--cat-entertainment-dark); }
.nav-item.cat-travel > a:hover,
.nav-item.cat-travel.active > a { color: var(--cat-travel-dark); border-bottom-color: var(--cat-travel-dark); }
.nav-item.cat-society > a:hover,
.nav-item.cat-society.active > a { color: var(--cat-society-dark); border-bottom-color: var(--cat-society-dark); }
.nav-item.cat-sport > a:hover,
.nav-item.cat-sport.active > a { color: var(--cat-sport-dark); border-bottom-color: var(--cat-sport-dark); }

.cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cat-dot.news { background: var(--cat-news-dark); }
.cat-dot.business { background: var(--cat-business-dark); }
.cat-dot.finance { background: var(--cat-finance-dark); }
.cat-dot.technology { background: var(--cat-tech-dark); }
.cat-dot.lifestyle { background: var(--cat-lifestyle-dark); }
.cat-dot.entertainment { background: var(--cat-entertainment-dark); }
.cat-dot.travel { background: var(--cat-travel-dark); }
.cat-dot.society { background: var(--cat-society-dark); }
.cat-dot.sport { background: var(--cat-sport-dark); }

.nav-item > a .arrow {
    font-size: 0.6rem;
    color: #999;
    transition: transform 0.2s;
}
.nav-item:hover > a .arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 200;
}
.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown a {
    display: block;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.dropdown a:last-child {
    border-bottom: none;
}
.dropdown a:hover {
    background: var(--bg-color);
    color: var(--text-main);
}

/* Dropdown hover by category */
.nav-item.cat-news .dropdown a:hover { background: var(--cat-news); color: var(--cat-news-dark); }
.nav-item.cat-business .dropdown a:hover { background: var(--cat-business); color: var(--cat-business-dark); }
.nav-item.cat-finance .dropdown a:hover { background: var(--cat-finance); color: var(--cat-finance-dark); }
.nav-item.cat-technology .dropdown a:hover { background: var(--cat-tech); color: var(--cat-tech-dark); }
.nav-item.cat-lifestyle .dropdown a:hover { background: var(--cat-lifestyle); color: var(--cat-lifestyle-dark); }
.nav-item.cat-entertainment .dropdown a:hover { background: var(--cat-entertainment); color: var(--cat-entertainment-dark); }
.nav-item.cat-travel .dropdown a:hover { background: var(--cat-travel); color: var(--cat-travel-dark); }
.nav-item.cat-society .dropdown a:hover { background: var(--cat-society); color: var(--cat-society-dark); }
.nav-item.cat-sport .dropdown a:hover { background: var(--cat-sport); color: var(--cat-sport-dark); }

/* --- CATEGORY TAG --- */
.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0.2rem 0.45rem;
    border-radius: 2px;
}
.category-tag.news { background: var(--cat-news); color: var(--cat-news-dark); }
.category-tag.business { background: var(--cat-business); color: var(--cat-business-dark); }
.category-tag.finance { background: var(--cat-finance); color: var(--cat-finance-dark); }
.category-tag.technology { background: var(--cat-tech); color: var(--cat-tech-dark); }
.category-tag.lifestyle { background: var(--cat-lifestyle); color: var(--cat-lifestyle-dark); }
.category-tag.entertainment { background: var(--cat-entertainment); color: var(--cat-entertainment-dark); }
.category-tag.travel { background: var(--cat-travel); color: var(--cat-travel-dark); }
.category-tag.society { background: var(--cat-society); color: var(--cat-society-dark); }
.category-tag.sport { background: var(--cat-sport); color: var(--cat-sport-dark); }

/* --- PAGE/CATEGORY BACKGROUNDS --- */
.page-background,
.category-background {
    position: relative;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    padding: 2rem 0;
}
.page-background::before,
.category-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

/* --- CONTENT CONTAINERS --- */
.content-container,
.article-container {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.content-card,
.article-card {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.content-card-inner,
.article-card-inner {
    padding: 2.5rem 3rem;
}

/* --- HERO SLIDER (Homepage) --- */
.hero-slider {
    position: relative;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}
.hero-slider-container {
    position: relative;
    width: 100%;
    height: 450px;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: block;
}
.hero-slide.active {
    opacity: 1;
    visibility: visible;
}
.hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}
.hero-slide-content .category-tag {
    margin-bottom: 1rem;
}
.hero-slide-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero-slide-content p {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1rem;
    line-height: 1.5;
    max-width: 700px;
}
.hero-slide-content .meta {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}
.hero-slider-dots {
    position: absolute;
    bottom: 1.25rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.hero-dot:hover {
    background: rgba(255,255,255,0.7);
}
.hero-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* --- HOMEPAGE LAYOUT --- */
.homepage-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}
.main-content {
    min-width: 0;
}
.homepage-sidebar {
    position: sticky;
    top: 1rem;
    height: fit-content;
}

/* --- FEATURED GRID --- */
.featured-grid {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.featured-grid-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    height: 300px;
}
.featured-big {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    height: 100%;
}
.featured-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.featured-big:hover img {
    transform: scale(1.05);
}
.featured-big .featured-cat {
    height: 26px;
    min-width: 26px;
    font-size: 0.8rem;
    padding: 0 7px;
}
.featured-big .featured-cat::after {
    content: attr(data-full);
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.25s ease;
    font-size: 0.65rem;
    letter-spacing: 0.3px;
}
.featured-big:hover .featured-cat {
    padding: 0 12px;
}
.featured-big:hover .featured-cat span {
    display: none;
}
.featured-big:hover .featured-cat::after {
    max-width: 120px;
}
.featured-big-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 0.85rem 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.featured-big-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}
.featured-big-content .meta {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
}
.featured-side {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}
.featured-side-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    flex: 1;
}
.featured-side-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.4s ease;
}
.featured-side-card:hover img {
    transform: scale(1.08);
}
.featured-cat {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    min-width: 22px;
    border-radius: 0 0 6px 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    transition: all 0.25s ease;
    padding: 0 6px;
    overflow: hidden;
    z-index: 2;
}
.featured-side-card:hover .featured-cat {
    padding: 0 10px;
    border-radius: 0 0 8px 0;
}
.featured-side-card:hover .featured-cat span {
    display: none;
}
.featured-cat::after {
    content: attr(data-full);
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.25s ease;
    font-size: 0.6rem;
    letter-spacing: 0.3px;
}
.featured-side-card:hover .featured-cat::after {
    max-width: 120px;
}
/* Category colors for featured */
.featured-cat.news { background: var(--cat-news-dark); }
.featured-cat.business { background: var(--cat-business-dark); }
.featured-cat.finance { background: var(--cat-finance-dark); }
.featured-cat.technology { background: var(--cat-tech-dark); }
.featured-cat.lifestyle { background: var(--cat-lifestyle-dark); }
.featured-cat.entertainment { background: var(--cat-entertainment-dark); }
.featured-cat.travel { background: var(--cat-travel-dark); }
.featured-cat.society { background: var(--cat-society-dark); }
.featured-cat.sport { background: var(--cat-sport-dark); }

.featured-side-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 0.85rem 0.75rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    z-index: 1;
}
.featured-side-overlay h4 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.3rem;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-side-overlay .meta {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.7);
}
.featured-grid-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.featured-bottom-item {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.featured-bottom-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.featured-bottom-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.featured-bottom-content {
    padding: 0.75rem;
}
.featured-bottom-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}
.featured-bottom-content .meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.featured-bottom-content .category-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    margin-bottom: 0.4rem;
}

/* --- ARTICLE GRID 3 COLUMNS --- */
.article-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* --- CATEGORY TAG SMALL --- */
.category-tag-small {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    margin-bottom: 0.25rem;
}
.category-tag-small.news { background: var(--cat-news); color: var(--cat-news-dark); }
.category-tag-small.business { background: var(--cat-business); color: var(--cat-business-dark); }
.category-tag-small.technology { background: var(--cat-tech); color: var(--cat-tech-dark); }
.category-tag-small.lifestyle { background: var(--cat-lifestyle); color: var(--cat-lifestyle-dark); }
.category-tag-small.entertainment { background: var(--cat-entertainment); color: var(--cat-entertainment-dark); }
.category-tag-small.travel { background: var(--cat-travel); color: var(--cat-travel-dark); }
.category-tag-small.society { background: var(--cat-society); color: var(--cat-society-dark); }
.category-tag-small.sport { background: var(--cat-sport); color: var(--cat-sport-dark); }

/* --- HERO SECTION (Homepage) --- */
.hero {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}
.hero-featured {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}
.hero-featured-image {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: var(--radius);
}
.hero-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    border-radius: 0 0 var(--radius) var(--radius);
}
.hero-featured-content .category-tag {
    margin-bottom: 0.75rem;
}
.hero-featured-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.hero-featured-content p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.hero-featured-content .meta {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

.hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.hero-secondary-item {
    display: flex;
    gap: 1rem;
    padding: 0.9rem;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}
.hero-secondary-item:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: transparent;
}
.hero-secondary-item img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    flex-shrink: 0;
}
.hero-secondary-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-secondary-content .category-tag {
    margin-bottom: 0.35rem;
    font-size: 0.55rem;
    padding: 0.15rem 0.35rem;
}
.hero-secondary-content h3 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}
.hero-secondary-content .meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* --- CATEGORY SECTIONS --- */
.category-section {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}
.category-section:first-of-type {
    padding-top: 0;
}
.category-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.section-title .cat-dot {
    width: 10px;
    height: 10px;
}
.view-all {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.view-all:hover {
    color: var(--text-main);
}

/* --- CATEGORY HEADER --- */
.category-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.category-tag-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 0.35rem 0.7rem;
    border-radius: 2px;
    margin-bottom: 1rem;
}
.category-tag-large.news { background: var(--cat-news); color: var(--cat-news-dark); }
.category-tag-large.business { background: var(--cat-business); color: var(--cat-business-dark); }
.category-tag-large.technology { background: var(--cat-tech); color: var(--cat-tech-dark); }
.category-tag-large.lifestyle { background: var(--cat-lifestyle); color: var(--cat-lifestyle-dark); }
.category-tag-large.entertainment { background: var(--cat-entertainment); color: var(--cat-entertainment-dark); }
.category-tag-large.travel { background: var(--cat-travel); color: var(--cat-travel-dark); }
.category-tag-large.society { background: var(--cat-society); color: var(--cat-society-dark); }
.category-tag-large.sport { background: var(--cat-sport); color: var(--cat-sport-dark); }
.category-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}
.category-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    max-width: 700px;
}

/* Subcategory Pills */
.subcategory-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.subcategory-pill {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

/* --- ARTICLE GRID --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* --- ARTICLE CARD --- */
.article-card {
    background: #fafafa;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: transparent;
}
.article-card-image {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 0;
}
.article-card-content {
    padding: 0.9rem;
}
.article-card-content .category-tag {
    margin-bottom: 0.4rem;
}
.article-card-content h3 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}
.article-card-content .meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* --- ARTICLE PAGE --- */
header.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
    color: var(--text-main);
}
.meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.meta img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.meta-divider {
    color: #ccc;
}

.featured-image {
    margin: 0 0 2rem;
}
.featured-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border: 1px solid var(--border);
}

/* --- LAYOUT GRIDS --- */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}
.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

/* --- ARTICLE CONTENT --- */
article { font-size: 1.05rem; }
article p { margin-bottom: 1.5rem; color: #333; }
article h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
article h3 { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; font-weight: 600; }
article ul, article ol { margin-bottom: 1.5rem; padding-left: 1.25rem; }
article li { margin-bottom: 0.4rem; }
.lead {
    font-size: 1.15rem;
    font-weight: 400;
    color: #444;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    line-height: 1.6;
}
figure { margin: 2rem 0; }
figcaption { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; font-style: italic; }
blockquote {
    background: #fafafa;
    border-left: 3px solid #333;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #444;
}

/* --- SIDEBAR --- */
aside { position: relative; }
.sidebar-section {
    background: #fafafa;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.sidebar-section > .sidebar-title {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Homepage Ranking Sidebar - specific override */
.sidebar-ranking.sidebar-section {
    background: #fff;
    padding: 0;
    overflow: hidden;
}

/* Ranking Sidebar */
.sidebar-ranking {
    background: #fff;
}
.sidebar-title-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--text-main);
    color: #fff;
}
.sidebar-title {
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: inherit;
}
.ranking-list {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ranking-item {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.4rem;
    border-radius: var(--radius);
    background: #fafafa;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.ranking-item:hover {
    background: #fff;
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ranking-img-wrap {
    position: relative;
    flex-shrink: 0;
    width: 90px;
    height: 68px;
    border-radius: 3px;
    overflow: hidden;
}
.ranking-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.ranking-item:hover .ranking-img-wrap img {
    transform: scale(1.08);
}
.ranking-views {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 0.58rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 0.6rem 0.35rem 0.2rem;
    text-align: center;
}
.ranking-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.ranking-content h4 {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.ranking-cat {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    min-width: 20px;
    border-radius: 0 0 6px 0;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    transition: all 0.25s ease;
    padding: 0 5px;
    overflow: hidden;
}
.ranking-item:hover .ranking-cat {
    padding: 0 8px;
    border-radius: 0 0 8px 0;
}
.ranking-item:hover .ranking-cat span {
    display: none;
}
.ranking-cat::after {
    content: attr(data-full);
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.25s ease;
    font-size: 0.58rem;
    letter-spacing: 0.3px;
}
.ranking-item:hover .ranking-cat::after {
    max-width: 120px;
}
/* Category colors for ranking */
.ranking-cat.news { background: var(--cat-news-dark); }
.ranking-cat.business { background: var(--cat-business-dark); }
.ranking-cat.finance { background: var(--cat-finance-dark); }
.ranking-cat.technology { background: var(--cat-tech-dark); }
.ranking-cat.lifestyle { background: var(--cat-lifestyle-dark); }
.ranking-cat.entertainment { background: var(--cat-entertainment-dark); }
.ranking-cat.travel { background: var(--cat-travel-dark); }
.ranking-cat.society { background: var(--cat-society-dark); }
.ranking-cat.sport { background: var(--cat-sport-dark); }

/* Old popular article styles (kept for compatibility) */
.popular-article {
    display: flex;
    gap: 10px;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.popular-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.popular-article:first-of-type {
    padding-top: 0;
}
.popular-article-img {
    width: 60px;
    height: 45px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}
.popular-article-content h4 {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 3px;
}
.popular-article-content span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag {
    background: #fff;
    border: 1px solid var(--border);
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.tag:hover {
    background: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tag-pill {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.tag-pill:hover {
    background: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
    transform: translateY(-2px);
}

/* Tag Label */
.tag-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.35rem 0.7rem;
    border-radius: 2px;
    margin-bottom: 1rem;
    background: #f0f0f0;
    color: var(--text-muted);
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* --- ARTICLE NAVIGATION --- */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.article-nav-item {
    padding: 1rem;
    background: #fafafa;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.article-nav-item:hover {
    background: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
}
.article-nav-item:hover .nav-label,
.article-nav-item:hover .nav-title {
    color: #fff;
}
.nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.nav-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}
.article-nav-item.next {
    text-align: right;
}

/* --- ERROR PAGE --- */
.error-container {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.error-content {
    text-align: center;
    max-width: 500px;
}
.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    margin-bottom: 1rem;
}
.error-message {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}
.error-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.error-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--text-main);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s ease;
}
.error-button:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- FOOTER --- */
footer {
    background: #1a1a1a;
    color: #999;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.85rem;
    position: relative;
    z-index: 10;
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
    .homepage-layout {
        grid-template-columns: 1fr 250px;
    }
}

@media (max-width: 1024px) {
    .homepage-layout {
        grid-template-columns: 1fr;
    }
    .homepage-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .homepage-sidebar .sidebar-section {
        margin-bottom: 0;
    }
    .hero-slider-container {
        height: 350px;
    }
    .hero-slide-content h2 {
        font-size: 1.5rem;
    }
    .hero-slide-content p {
        display: none;
    }
    .featured-grid-top {
        grid-template-columns: 1fr;
        height: auto;
    }
    .featured-big {
        height: 250px;
    }
    .featured-side {
        height: auto;
    }
    .featured-side {
        flex-direction: row;
        gap: 1rem;
    }
    .featured-side-card {
        flex: 1;
        min-height: 160px;
    }
    .featured-grid-bottom {
        grid-template-columns: repeat(2, 1fr);
    }
    .article-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-featured-image {
        height: 280px;
    }
    .hero-secondary {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .hero-secondary-item {
        flex: 1;
        min-width: 280px;
    }
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .layout-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }
    aside {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-categories { overflow-x: auto; }
    .nav-item > a { padding: 0.75rem 0.75rem; font-size: 0.8rem; }
    .logo { font-size: 0.85rem; margin-right: 1rem; }
    .homepage-sidebar {
        grid-template-columns: 1fr;
    }
    .featured-grid-bottom {
        grid-template-columns: 1fr;
    }
    .featured-side {
        flex-direction: column;
    }
    .featured-side-card {
        flex: none;
        min-height: 140px;
    }
    .featured-big {
        height: 200px;
    }
    .article-grid-3 {
        grid-template-columns: 1fr;
    }
    .content-card-inner,
    .article-card-inner {
        padding: 1.5rem;
    }
    .hero-slider-container {
        height: 300px;
    }
    .hero-slide-content {
        padding: 1.5rem;
    }
    .hero-slide-content h2 {
        font-size: 1.2rem;
    }
    .hero-slide-content .meta {
        font-size: 0.75rem;
    }
    .hero-slider-dots {
        bottom: 1rem;
        right: 1rem;
    }
    .hero-dot {
        width: 8px;
        height: 8px;
    }
    .hero-featured-content h2 {
        font-size: 1.25rem;
    }
    .hero-featured-content p {
        display: none;
    }
    .hero-secondary {
        flex-direction: column;
    }
    .hero-secondary-item {
        min-width: 100%;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .featured-image {
        margin: 0 0 1.5rem;
    }
    h1 {
        font-size: 1.5rem;
    }
    .article-nav {
        grid-template-columns: 1fr;
    }
    .article-nav-item.next {
        text-align: left;
    }
    .category-title {
        font-size: 1.5rem;
    }
    .subcategory-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
    .subcategory-pill {
        white-space: nowrap;
    }
}
