/*
Theme Name: Starthir Theme
Theme URI: https://starthir.hu
Author: rankwriter2020
Description: Custom theme for starthir.hu.
Version: 2.0.1
*/

:root {
    /* Deep Corporate Navy Palette */
    --bg-body: #e5e7eb;
    /* Solid Light Grey (Not White) */
    --bg-white: #ffffff;

    /* Header Gradients - Deep Navy */
    --grad-orange-start: #1e3a8a;
    /* Navy 800 */
    --grad-orange-end: #172554;
    /* Navy 950 */

    --grad-red-start: #b91c1c;
    /* Deep Red */
    --grad-red-end: #991b1b;
    /* Red 800 */

    --grad-blue-start: #374151;
    /* Grey 700 */
    --grad-blue-end: #1f2937;
    /* Grey 800 */

    /* Text Colors */
    --text-dark: #111827;
    /* Black */
    --text-link: #1e40af;
    /* Strong Blue */
    --text-link-std: #0f172a;
    --text-link-hover: #1e3a8a;

    --border-color: #9ca3af;
    /* Visible Grey Borders */

    /* Dimensions */
    --font-size-base: 13px;
    /* Slightly bigger font */
    --container-width: 1260px;
}

/* Category Page Layout */
.category-page-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    /* Wide Main + Narrow Sidebar */
    gap: 10px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 5px;
}

.cat-sub-grid {
    column-count: 2;
    column-gap: 5px;
    margin-top: 5px;
}

.cat-sub-grid .widget-box {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
}

@media (max-width: 768px) {
    .category-page-container {
        grid-template-columns: 1fr;
    }

    .cat-sub-grid {
        column-count: 1;
    }
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-dark);
    font-family: Verdana, Arial, sans-serif;
    /* Web safe font used by old portals */
    font-size: var(--font-size-base);
    line-height: 1.4;
}

a {
    text-decoration: none;
    color: var(--text-link-std);
}

a:hover {
    text-decoration: none;
    /* Clean modern hover */
    color: var(--text-link-hover);
}

/* Modern Polish */
.widget-box {
    background: #fff;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Subtle shadow depth */
    border-radius: 4px;
    /* Slight rounded corners */
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.widget-box:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Lift effect */
}

.w-head {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Typography Polish */
body {
    -webkit-font-smoothing: antialiased;
    /* Crisper text */
}


/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 5px;
}

/* Header Area */
.site-header {
    background: transparent;
    padding-top: 10px;
    margin-bottom: 5px;
}

.top-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.site-brand {
    font-family: 'Arial Black', Arial, sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #333;
    letter-spacing: -1px;
}

.site-brand span {
    font-weight: normal;
    font-size: 14px;
    color: #555;
    margin-left: 10px;
}

.header-search {
    display: flex;
    gap: 5px;
}

.header-search input {
    border: 1px solid #999;
    padding: 2px 5px;
    font-size: 12px;
}

.header-search button {
    background: #0044cc;
    color: #fff;
    border: 1px solid #003399;
    font-weight: bold;
    padding: 2px 8px;
    cursor: pointer;
}

/* Nav Tabs */
.nav-tabs {
    display: flex;
    border-bottom: 2px solid #1e3a8a;
    /* Navy border */
    background: #d1d5db;
    /* Grey 300 */
}

.nav-tab {
    padding: 4px 12px;
    font-weight: bold;
    color: #1f2937;
    border-right: 1px solid #9ca3af;
    background: #e5e7eb;
    font-size: 12px;
    text-transform: uppercase;
}

.nav-tab.active {
    background: #fff;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
    color: #1e3a8a;
}

.orange-bar {
    background: #111827;
    /* Near Black Bar */
    padding: 0;
    /* Reset padding for menu */
    border: none;
    display: block;
    /* Block to contain UL */
}

/* WP Menu Styling in Header */
ul.header-nav-list {
    list-style: none;
    margin: 0;
    padding: 5px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
}

ul.header-nav-list li {
    display: inline-block;
}

ul.header-nav-list li a {
    display: block;
    font-weight: bold;
    padding: 3px 10px;
    color: #e5e7eb;
    font-size: 12px;
    text-decoration: none;
}

ul.header-nav-list li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Legacy support if needed */
.cat-link {
    font-weight: bold;
    padding: 3px 10px;
    color: #e5e7eb;
    font-size: 12px;
}

.cat-link:hover {
    color: #fff;
}

/* Date/Info Bar */
.info-bar {
    display: flex;
    justify-content: flex-end;
    font-size: 10px;
    color: #666;
    padding: 2px 0;
    margin-bottom: 5px;
}

/* Main Grid */
.portal-grid {
    display: grid;
    grid-template-columns: 200px 1fr 240px;
    /* Specific widths: Left narrow (stream), Center wide (boxes), Right medium (top) */
    gap: 5px;
    align-items: start;
}

/* Widget General */
.widget-box {
    background: #fff;
    /* Some have white background */
    border: 1px solid #d4d0c8;
    margin-bottom: 5px;
    /* overflow: hidden; Not strictly necessary, old tables didn't */
}

/* Widget Header Types */
.w-head {
    padding: 5px 10px;
    /* Version bump for cache busting */
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    background: #333;
    /* Fallback Safety Color (Dark Grey) */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wh-orange {
    background: linear-gradient(to right, #1e3a8a, #172554);
    /* Navy Gradient */
    color: #fff;
    border-bottom: none;
}

.wh-red {
    background: linear-gradient(to right, #dc2626, #991b1b);
    /* Strong Red Gradient */
    color: #fff;
}

.wh-blue {
    background: #336699;
    color: #fff;
}

.wh-green {
    background: linear-gradient(to right, #047857, #065F46);
    /* Emerald Green */
    color: #fff;
}

.wh-fresh {
    background: #e99557;
    /* Salmon/Orange */
    color: #fff;
}

/* Content Lists */
.fresh-list li {
    padding: 3px 5px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    line-height: 1.4;
}

.fresh-list li:nth-child(odd) {
    background: #fafafa;
}

/* Striping */

.time-stamp {
    font-weight: bold;
    color: #555;
    margin-right: 4px;
}

.source-tag {
    color: #888;
    font-size: 10px;
}

/* Top News Items (Sidebar) */
.top-item {
    display: block;
    padding: 3px 5px;
    border-bottom: 1px dotted #ccc;
    font-size: 11px;
}

.top-item::before {
    content: "■ ";
    color: #993300;
    font-size: 8px;
    vertical-align: middle;
}

/* Center Box Grid (Inside center column) */
.center-masonry {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Feed Split Layout */
.feed-split-container {
    display: flex;
    gap: 10px;
}

.feed-sub-col {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 768px) {
    .feed-split-container {
        flex-direction: column;
    }

    .feed-sub-col {
        width: 100% !important;
        /* Override inline if present */
    }
}

.center-masonry .widget-box {
    width: 100%;
    margin-bottom: 5px;
}

@media (max-width: 800px) {
    .center-masonry {
        column-count: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .portal-grid {
        grid-template-columns: 180px 1fr 200px;
        /* Keep 3 columns, slightly tighter */
        gap: 5px;
    }

    .right-col {
        display: block;
        /* Force show */
    }
}

@media (max-width: 768px) {
    .portal-grid {
        grid-template-columns: 1fr;
        /* Safe stacking */
        gap: 10px;
    }

    .left-col,
    .center-col,
    .right-col {
        /* Let Grid handle width */
        width: auto;
    }

    .right-col {
        display: block;
        /* Show sidebar below content */
        margin-top: 20px;
    }

    .center-masonry {
        column-count: 1;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .top-bar-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-search {
        margin-top: 5px;
        width: 100%;
        display: flex;
    }

    .header-search input {
        flex-grow: 1;
    }
}

/* Footer Styles */
.site-footer {
    background: #f0f0f0;
    border-top: 3px solid #cc9933;
    /* Match nav border */
    padding: 20px 0;
    margin-top: 30px;
    text-align: center;
}

.footer-links a {
    color: #3f2e14;
    font-weight: bold;
    font-size: 11px;
    margin: 0 5px;
}

.footer-links a:hover {
    color: #cc0000;
    text-decoration: underline;
}

.footer-meta {
    margin-top: 15px;
    font-size: 11px;
    color: #666;
}