/*
Theme Name: Prosto24
Theme URI: https://prosto24.com
Author: Prosto24 Team
Description: Modern IT-portal theme inspired by prosto24.com - news, articles, reviews with dark/light mode support
Version: 1.0
Text Domain: prosto24
*/

:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --accent-color: #0284c7;
    --accent-hover: #0369a1;
    --accent-light: #e0f2fe;
    --header-bg: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --card-glow: rgba(2, 132, 199, 0.03);
    --container-max-width: 1280px;
    --header-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
    --fs-base: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
    --fs-h1: clamp(2rem, 1.5rem + 2vw, 3rem);
    --fs-h2: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --fs-h3: clamp(1.25rem, 1.1rem + 1vw, 1.75rem);
    --fs-h4: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
    --fs-sm: clamp(0.8rem, 0.75rem + 0.2vw, 0.875rem);
    --transition-speed: 0.3s;
    
    /* Status Colors */
    --color-con: #ef4444;
    --color-con-bg: #fef2f2;
    --color-pro: #22c55e;
    --color-pro-bg: #f0fdf4;
    --color-rating: #eab308;
    --color-rating-bg: #fef9c3;
}

[data-theme='dark'] {
    --bg-primary: #0b0f19;
    --bg-secondary: #121826;
    --bg-tertiary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --border-hover: #334155;
    --accent-color: #38bdf8;
    --accent-hover: #7dd3fc;
    --accent-light: rgba(56, 189, 248, 0.15);
    --header-bg: rgba(11, 15, 25, 0.8);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    --card-glow: rgba(56, 189, 248, 0.02);
    
    /* Status Colors (Dark Mode) */
    --color-con: #f87171;
    --color-con-bg: rgba(239, 68, 68, 0.15);
    --color-pro: #4ade80;
    --color-pro-bg: rgba(34, 197, 94, 0.15);
    --color-rating: #facc15;
    --color-rating-bg: rgba(234, 179, 8, 0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg-primary); color: var(--text-secondary); font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.6; transition: background-color var(--transition-speed), color var(--transition-speed); }
h1, h2, h3, h4, h5, h6 { color: var(--text-primary); font-family: var(--font-heading); font-weight: 700; line-height: 1.25; margin-bottom: 0.5em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
a { color: var(--accent-color); text-decoration: none; transition: color var(--transition-speed); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; border-radius: var(--border-radius-sm); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.container { width: 100%; max-width: var(--container-max-width); margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.flex-grow-1 { flex-grow: 1; }
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; width: 100%; }

/* Header */
.main-header { background-color: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; height: var(--header-height); transition: background-color var(--transition-speed), border-color var(--transition-speed); width: 100%; left: 0; right: 0; }
.header-container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.site-logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: var(--text-primary); flex-shrink: 0; white-space: nowrap; }
.site-logo span { color: var(--accent-color); }
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-menu li { position: relative; }
.nav-link, .nav-menu li a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; padding: 6px 12px; border-radius: var(--border-radius-sm); transition: all var(--transition-speed); display: block; white-space: nowrap; }
.nav-link:hover, .nav-link.active, .nav-menu li a:hover, .nav-menu li.current-menu-item > a, .nav-menu li.current-menu-parent > a, .nav-menu li.current-menu-ancestor > a { color: var(--text-primary); background-color: var(--bg-tertiary); }
/* Dropdown submenus */
.nav-menu li .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); box-shadow: var(--shadow-lg); z-index: 101; padding: 8px 0; list-style: none; margin: 4px 0 0; }
.nav-menu li .sub-menu li { width: 100%; }
.nav-menu li .sub-menu li a { padding: 8px 16px; border-radius: 0; font-size: 0.9rem; }
.nav-menu li .sub-menu li a:hover { background-color: var(--bg-tertiary); }
.nav-menu li:hover > .sub-menu { display: block; animation: p24FadeIn 0.15s ease; }
.nav-menu li .sub-menu::before { content: ''; position: absolute; top: -8px; left: 0; width: 100%; height: 8px; }
/* Nested sub-menus */
.nav-menu li .sub-menu .sub-menu { top: 0; left: 100%; margin: 0 0 0 4px; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.theme-toggle-btn { background: none; border: 1px solid var(--border-color); cursor: pointer; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--transition-speed); flex-shrink: 0; }
.theme-toggle-btn:hover { background-color: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-hover); }
.theme-toggle-btn svg { width: 20px; height: 20px; }
.theme-toggle-btn .sun-icon { display: none; }
[data-theme='dark'] .theme-toggle-btn .moon-icon { display: none; }
[data-theme='dark'] .theme-toggle-btn .sun-icon { display: block; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text-primary); flex-shrink: 0; }
.menu-toggle svg { width: 24px; height: 24px; }

/* Main Layout */
.main-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 32px 0; flex-grow: 1; }
.sidebar { display: flex; flex-direction: column; gap: 32px; }
.widget { background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 24px; box-shadow: var(--shadow-sm); transition: all var(--transition-speed); }
.widget-title, .widget h2 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; margin-bottom: 20px; position: relative; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); color: var(--text-primary); }
.widget-title::after, .widget h2::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 50px; height: 2px; background-color: var(--accent-color); }

/* Search Widget */
.widget_search .search-form,
.widget_search form { display: flex; flex-wrap: wrap; gap: 8px; }
.widget_search .search-form > label,
.widget_search form > label { width: 100%; font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; display: block; margin-bottom: 12px; position: relative; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); color: var(--text-primary); }
.widget_search .search-form > label::after,
.widget_search form > label::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 50px; height: 2px; background-color: var(--accent-color); }
.widget_search .search-form > label .screen-reader-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.widget_search .search-field,
.widget_search input[type='search'],
.widget_search .wp-block-search__input { flex: 1; min-width: 0; background-color: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); padding: 12px 16px; color: var(--text-primary); font-family: var(--font-body); font-size: 0.9rem; transition: all var(--transition-speed); outline: none; }
.widget_search .search-field:focus,
.widget_search input[type='search']:focus,
.widget_search .wp-block-search__input:focus { border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--accent-light); }
.widget_search .search-submit,
.widget_search input[type='submit'],
.widget_search button[type='submit'],
.widget_search .wp-block-search__button { background-color: var(--accent-color); color: #ffffff; font-weight: 600; padding: 12px 24px; border-radius: var(--border-radius-sm); border: none; cursor: pointer; font-family: var(--font-body); font-size: 0.9rem; transition: background-color var(--transition-speed); white-space: nowrap; }
.widget_search .search-submit:hover,
.widget_search input[type='submit']:hover,
.widget_search button[type='submit']:hover,
.widget_search .wp-block-search__button:hover { background-color: var(--accent-hover); }
.widget_search .wp-block-search__label { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; display: block; width: 100%; margin-bottom: 12px; position: relative; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); color: var(--text-primary); }
.widget_search .wp-block-search__label::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 50px; height: 2px; background-color: var(--accent-color); }
.widget_search .wp-block-search__inside-wrapper { display: flex; gap: 8px; width: 100%; }

/* Recent Posts & Recent Comments Widgets */
.widget_recent_entries h2, .widget_recent_comments h2 { font-family: var(--font-heading); }
.widget_recent_entries ul, .widget_recent_comments ul { list-style: none; padding: 0; margin: 0; }
.widget_recent_entries ul li { padding: 12px 0; border-bottom: 1px solid var(--border-color); transition: transform var(--transition-speed); }
.widget_recent_entries ul li:first-child { padding-top: 0; }
.widget_recent_entries ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget_recent_entries ul li:hover { transform: translateX(4px); }
.widget_recent_entries ul li a { color: var(--text-primary); font-weight: 600; font-size: 0.95rem; line-height: 1.4; display: block; font-family: var(--font-body); }
.widget_recent_entries ul li a:hover { color: var(--accent-color); }
.widget_recent_entries ul li .post-date { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.widget_recent_comments ul li { padding: 12px 0; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; font-family: var(--font-body); }
.widget_recent_comments ul li:first-child { padding-top: 0; }
.widget_recent_comments ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget_recent_comments ul li a { color: var(--accent-color); font-weight: 500; }
.widget_recent_comments ul li a:hover { color: var(--accent-hover); }

/* Footer */
.main-footer { background-color: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 48px 0 24px; margin-top: auto; transition: background-color var(--transition-speed), border-color var(--transition-speed); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-logo { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: var(--text-primary); margin-bottom: 16px; }
.footer-logo span { color: var(--accent-color); }
.footer-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; }
.footer-column h4 { font-size: 1.1rem; margin-bottom: 20px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: var(--text-secondary); font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent-color); padding-left: 4px; }
.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.85rem; }

/* News Cards */
.news-card { background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 20px; display: grid; grid-template-columns: 240px 1fr; gap: 24px; box-shadow: var(--shadow-sm); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color var(--transition-speed); position: relative; overflow: hidden; margin-bottom: 20px; }
.news-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background-color: transparent; transition: background-color var(--transition-speed); }
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-hover); background-color: var(--card-glow); }
.news-card:hover::before { background-color: var(--accent-color); }
.news-card-image { position: relative; border-radius: var(--border-radius-sm); overflow: hidden; aspect-ratio: 16/10; }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; border-radius: 0; }
.news-card:hover .news-card-image img { transform: scale(1.05); }
.category-tag { position: absolute; top: 10px; left: 10px; background-color: var(--accent-color); color: #ffffff; font-size: 0.75rem; font-weight: 600; padding: 4px 8px; border-radius: 4px; z-index: 1; text-transform: uppercase; letter-spacing: 0.5px; }
.news-card-content { display: flex; flex-direction: column; justify-content: center; }
.news-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.news-card-meta span { display: flex; align-items: center; gap: 4px; }
.news-card-meta svg { width: 14px; height: 14px; }
.news-card-title { font-size: 1.35rem; line-height: 1.3; margin-bottom: 12px; }
.news-card-title a { color: var(--text-primary); }
.news-card-title a:hover { color: var(--accent-color); }
.news-card-excerpt { font-size: 0.95rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 16px; }
.news-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.read-more-link { font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.read-more-link svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.read-more-link:hover svg { transform: translateX(4px); }

/* Article (single post) */
.article-container { background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 32px; box-shadow: var(--shadow-sm); }
.article-header { margin-bottom: 24px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 16px; }
.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-title { font-size: var(--fs-h1); color: var(--text-primary); margin-bottom: 20px; line-height: 1.2; }
.article-main-image { border-radius: var(--border-radius); overflow: hidden; margin-bottom: 32px; }
.article-main-image img { width: 100%; max-height: 500px; object-fit: cover; }
.article-body { font-size: 1.05rem; line-height: 1.7; color: var(--text-secondary); }
.article-body p { margin-bottom: 20px; }
.article-body h2, .article-body h3, .article-body h4 { margin-top: 36px; margin-bottom: 16px; }
.article-body ul, .article-body ol { margin-bottom: 20px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote { border-left: 4px solid var(--accent-color); padding: 16px 24px; background-color: var(--bg-tertiary); border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0; font-style: italic; font-size: 1.1rem; margin: 28px 0; color: var(--text-primary); }

/* Breadcrumbs */
.speedbar-container { background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); padding: 10px 20px; font-size: 0.85rem; margin-bottom: 24px; box-shadow: var(--shadow-sm); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-muted); }
.speedbar-container a { color: var(--text-secondary); }
.speedbar-container a:hover { color: var(--accent-color); }

/* Topnews sidebar cards */
.topnews-card { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); text-decoration: none; transition: transform var(--transition-speed); }
.topnews-card:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.topnews-card:hover { transform: translateX(4px); }
.topnews-img { width: 64px; height: 64px; border-radius: var(--border-radius-sm); overflow: hidden; flex-shrink: 0; border: 1px solid var(--border-color); }
.topnews-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.topnews-text { display: flex; flex-direction: column; gap: 4px; }
.topnews-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topnews-meta { font-size: 0.8rem; color: var(--text-muted); }

/* Pagination */
.wp-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; list-style: none; background-color: var(--bg-secondary); padding: 8px; border: 1px solid var(--border-color); border-radius: 50px; box-shadow: var(--shadow-sm); margin-top: 40px; }
.wp-pagination .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 50%; font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); transition: all var(--transition-speed); text-decoration: none; }
.wp-pagination .page-numbers:hover { background-color: var(--bg-tertiary); color: var(--text-primary); }
.wp-pagination .page-numbers.current { background-color: var(--accent-color); color: #ffffff; }

/* Comments */
.comments-section { margin-top: 48px; background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 32px; box-shadow: var(--shadow-sm); }
.comments-title { font-size: 1.35rem; margin-bottom: 24px; font-family: var(--font-heading); }
.comment-list { display: flex; flex-direction: column; gap: 24px; list-style: none; }
.comment-body { display: flex; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--border-color); }
.comment-author .avatar { width: 48px; height: 48px; border-radius: 50%; }
.comment-content { flex-grow: 1; }
.comment-content p { font-size: 0.95rem; line-height: 1.5; color: var(--text-secondary); }
.comment-metadata { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.comment-respond { margin-top: 40px; background-color: var(--bg-tertiary); padding: 24px; border-radius: var(--border-radius); border: 1px solid var(--border-color); }
.must-log-in { font-size: 1rem; color: var(--text-secondary); margin: 16px 0 0; line-height: 1.6; }
.must-log-in a { color: var(--accent-color); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--accent-color); transition: all var(--transition-speed); }
.must-log-in a:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }
.comment-form input[type='text'], .comment-form input[type='email'], .comment-form input[type='url'], .comment-form textarea { width: 100%; background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); padding: 12px 16px; transition: all var(--transition-speed); margin-bottom: 12px; font-family: inherit; font-size: inherit; color: inherit; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--accent-light); }
.comment-form .submit { background-color: var(--accent-color); color: #ffffff; font-weight: 600; padding: 12px 24px; border-radius: var(--border-radius-sm); border: none; cursor: pointer; transition: background-color var(--transition-speed); font-family: inherit; font-size: inherit; }
.comment-form .submit:hover { background-color: var(--accent-hover); }

/* Widgets */
.widget ul { list-style: none; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-secondary); font-size: 0.95rem; }
.widget ul li a:hover { color: var(--accent-color); }
.widget_tag_cloud .tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.widget_tag_cloud .tagcloud a { background-color: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 50px; padding: 6px 14px; font-size: 0.85rem !important; color: var(--text-secondary); transition: all var(--transition-speed); }
.widget_tag_cloud .tagcloud a:hover { background-color: var(--accent-color); color: #fff; border-color: var(--accent-color); }

/* Language Switcher */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 3px;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-speed);
}

.lang-switcher-item {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--border-radius-lg);
    line-height: 1;
    transition: all var(--transition-speed);
    text-decoration: none;
    cursor: pointer;
}

a.lang-switcher-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.lang-switcher-item.active {
    background-color: var(--accent-color);
    color: #ffffff !important;
    cursor: default;
    box-shadow: var(--shadow-sm);
}

/* Responsive */
/* Auth Button & User Panel */
.auth-btn { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--border-radius-sm); border: 1px solid var(--accent-color); color: var(--accent-color); font-weight: 600; font-size: 0.9rem; background: transparent; cursor: pointer; font-family: var(--font-body); transition: all var(--transition-speed); }
.auth-btn:hover { background-color: var(--accent-color); color: #ffffff; }
.user-panel-wrapper { position: relative; }
.user-panel-trigger { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--border-radius-sm); border: 1px solid var(--border-color); color: var(--text-primary); font-weight: 600; font-size: 0.85rem; background: transparent; cursor: pointer; font-family: var(--font-body); transition: all var(--transition-speed); }
.user-panel-trigger:hover { background-color: var(--bg-tertiary); border-color: var(--border-hover); }
.user-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; background-color: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); box-shadow: var(--shadow-lg); z-index: 101; overflow: hidden; }
.user-panel-wrapper:hover .user-dropdown, .user-dropdown.active { display: block; }
.user-dropdown::before { content: ''; position: absolute; top: -10px; left: 0; width: 100%; height: 10px; }
.user-dropdown-header { padding: 14px 16px; border-bottom: 1px solid var(--border-color); }
.user-dropdown-header strong { display: block; font-size: 0.95rem; color: var(--text-primary); font-family: var(--font-heading); }
.user-dropdown-login { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }
.user-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 0.9rem; color: var(--text-secondary); border: none; background: none; width: 100%; cursor: pointer; font-family: var(--font-body); text-align: left; transition: background-color var(--transition-speed); text-decoration: none; }
.user-dropdown-item:hover { background-color: var(--bg-tertiary); color: var(--text-primary); }
.user-dropdown-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.user-dropdown-danger { color: var(--color-con); }
.user-dropdown-danger:hover { background-color: var(--color-con-bg); color: var(--color-con); }

/* Modal Windows */
.p24-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.p24-modal-overlay.active { display: flex; animation: p24FadeIn 0.2s ease; }
.p24-modal { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius-lg); width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); position: relative; animation: p24SlideUp 0.3s ease; }
.p24-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all var(--transition-speed); }
.p24-modal-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.p24-modal-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; padding: 24px 24px 0; color: var(--text-primary); }
.p24-modal-body { padding: 20px 24px 24px; }
.p24-form-group { margin-bottom: 16px; }
.p24-form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.p24-input { width: 100%; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); padding: 12px 16px; color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem; transition: all var(--transition-speed); outline: none; box-sizing: border-box; }
.p24-input:focus { border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--accent-light); }
.p24-btn-primary { width: 100%; background: var(--accent-color); color: #fff; font-weight: 600; padding: 12px; border-radius: var(--border-radius-sm); border: none; cursor: pointer; font-family: var(--font-body); font-size: 0.95rem; transition: background var(--transition-speed); }
.p24-btn-primary:hover { background: var(--accent-hover); }
.p24-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.p24-btn-danger { width: 100%; background: var(--color-con); color: #fff; font-weight: 600; padding: 12px; border-radius: var(--border-radius-sm); border: none; cursor: pointer; font-family: var(--font-body); font-size: 0.95rem; transition: background var(--transition-speed); }
.p24-btn-danger:hover { background: #dc2626; }
.p24-modal-footer-text { text-align: center; margin-top: 16px; font-size: 0.85rem; color: var(--text-muted); }
.p24-modal-footer-text a { font-weight: 600; color: var(--accent-color); }
.p24-msg { padding: 10px 14px; border-radius: var(--border-radius-sm); font-size: 0.85rem; margin-bottom: 12px; display: none; }
.p24-msg.error { display: block; background: var(--color-con-bg); color: var(--color-con); border: 1px solid var(--color-con); }
.p24-msg.success { display: block; background: var(--color-pro-bg); color: var(--color-pro); border: 1px solid var(--color-pro); }

/* Warning Box */
.p24-warning-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--color-rating-bg); border: 1px solid var(--color-rating); border-radius: var(--border-radius-sm); margin-bottom: 20px; font-size: 0.85rem; color: var(--text-primary); line-height: 1.5; }

/* Credentials Card */
.p24-credentials-card { background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); padding: 16px; margin-bottom: 16px; }
.p24-cred-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.p24-cred-row:last-of-type { margin-bottom: 12px; }
.p24-cred-label { font-size: 0.85rem; color: var(--text-muted); min-width: 55px; }
.p24-cred-value { font-size: 1rem; font-weight: 700; color: var(--accent-color); background: var(--accent-light); padding: 4px 10px; border-radius: 4px; letter-spacing: 0.5px; }
.p24-btn-copy { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--accent-color); color: #fff; border: none; border-radius: var(--border-radius-sm); font-size: 0.8rem; font-weight: 600; cursor: pointer; font-family: var(--font-body); transition: background var(--transition-speed); margin-left: auto; }
.p24-btn-copy:hover { background: var(--accent-hover); }
.p24-btn-copy.copied { background: var(--color-pro); }

/* Modal Animations */
@keyframes p24FadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes p24SlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 1024px) {
    .main-layout { grid-template-columns: 1fr; gap: 32px; }
    .sidebar { margin-top: 16px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 768px) {
    :root { --header-height: 60px; }
    .container { padding: 0 16px; }
    .nav-menu { display: none !important; }
    .menu-toggle { display: block; }
    .nav-menu.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-secondary);
        padding: 24px;
        gap: 4px;
        z-index: 9999;
        overflow-y: auto;
        list-style: none;
        margin: 0;
        border-top: 1px solid var(--border-color);
    }
    .nav-menu.active li {
        list-style: none;
        width: 100%;
    }
    .nav-menu.active li a {
        font-size: 1.05rem;
        width: 100%;
        display: block;
        padding: 10px 12px;
        border-radius: var(--border-radius-sm);
        white-space: normal;
    }
    .nav-menu.active li a:hover {
        background-color: var(--bg-tertiary);
    }
    /* Sub-menus: show inline in mobile */
    .nav-menu.active .sub-menu,
    .nav-menu.active li .sub-menu,
    .nav-menu.active li ul {
        display: block !important;
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding: 0 0 0 16px !important;
        margin: 0 !important;
        min-width: auto !important;
        animation: none !important;
        list-style: none;
    }
    .nav-menu.active .sub-menu li a,
    .nav-menu.active li .sub-menu li a {
        font-size: 0.95rem;
        padding: 8px 12px;
        color: var(--text-muted);
    }
    .nav-menu.active .sub-menu .sub-menu {
        padding-left: 16px !important;
    }
    .header-actions { gap: 8px; }
    .news-card { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
    .news-card-image { aspect-ratio: 16/9; }
    .article-container { padding: 20px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .auth-btn span { display: none; }
    .p24-modal { max-width: 100%; border-radius: var(--border-radius); }
    .user-panel-trigger span { display: none; }
}

/* Sitemap Page Custom Styling */
.sitemap-categories-list,
.sitemap-articles-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2.5rem 0;
}

.sitemap-categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.sitemap-categories-list li {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-speed) ease;
}

.sitemap-categories-list li:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    background-color: var(--card-glow);
}

.sitemap-categories-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    color: var(--text-primary);
    font-weight: 500;
    font-family: var(--font-heading);
}

.category-name-text {
    flex-grow: 1;
}

.category-count-badge {
    background-color: var(--accent-light);
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 10px;
    transition: all var(--transition-speed) ease;
}

.sitemap-categories-list li:hover .category-count-badge {
    background-color: var(--accent-color);
    color: #ffffff;
}

.sitemap-articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sitemap-articles-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-speed) ease;
}

.sitemap-articles-list li:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-tertiary);
    transform: translateX(4px);
}

.sitemap-articles-list li a {
    color: var(--text-primary);
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    flex: 1;
    margin-right: 15px;
}

.sitemap-articles-list li:hover a {
    color: var(--accent-color);
}

.sitemap-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-body);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .sitemap-categories-list {
        grid-template-columns: 1fr;
    }
    .sitemap-articles-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .sitemap-articles-list li a {
        margin-right: 0;
    }
}

