/*!
Theme Name: Artesh
Theme URI: https://artesh.com/
Author: Artesh Intelligence
Author URI: https://artesh.com/
Description: Iran Intelligence Platform - Comprehensive coverage of Iranian politics, economy, military affairs, and key figures. Translated news from 30+ sources.
Version: 3.0.2
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: artesh
*/

/* ==========================================================================
   CSS VARIABLES - Persian-inspired color palette
   ========================================================================== */

:root {
    /* Primary - Persian Blue (authority, trust) */
    --artesh-primary: #1A365D;
    --artesh-primary-dark: #0F2744;
    --artesh-primary-light: #2C5282;
    
    /* Accent - Saffron Gold (Iran, prosperity) */
    --artesh-accent: #C9A227;
    --artesh-accent-dark: #A88620;
    --artesh-accent-light: #DBB84A;
    
    /* Alert Colors */
    --artesh-critical: #DC2626;
    --artesh-high: #D97706;
    --artesh-moderate: #FBBF24;
    --artesh-low: #10B981;
    
    /* Neutrals */
    --artesh-dark: #0F172A;
    --artesh-text: #334155;
    --artesh-text-light: #64748B;
    --artesh-border: #E2E8F0;
    --artesh-bg-light: #F8FAFC;
    --artesh-white: #ffffff;
    
    /* Market Colors */
    --artesh-up: #10B981;
    --artesh-down: #EF4444;
    --artesh-neutral: #6B7280;
    
    /* Shadows */
    --artesh-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --artesh-shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --artesh-shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    
    /* Transitions */
    --artesh-transition: 0.2s ease;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--artesh-text);
    background: var(--artesh-bg-light);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--artesh-primary);
    text-decoration: none;
    transition: color var(--artesh-transition);
}

a:hover {
    color: var(--artesh-primary-light);
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn, 
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--artesh-transition);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--artesh-primary);
    color: var(--artesh-white) !important;
}

.btn-primary:hover {
    background: var(--artesh-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--artesh-shadow-md);
}

.btn-accent {
    background: var(--artesh-accent);
    color: var(--artesh-dark) !important;
}

.btn-accent:hover {
    background: var(--artesh-accent-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--artesh-primary);
    color: var(--artesh-primary) !important;
}

.btn-outline:hover {
    background: var(--artesh-primary);
    color: var(--artesh-white) !important;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 17px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    background: var(--artesh-primary-dark);
    border-bottom: 3px solid var(--artesh-accent);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.site-branding {
    flex-shrink: 0;
}

.site-branding a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    font-weight: 800;
    color: var(--artesh-white);
    letter-spacing: -0.5px;
    text-decoration: none;
}

.site-branding .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--artesh-accent) 0%, var(--artesh-accent-dark) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--artesh-dark);
    font-weight: 800;
    font-size: 20px;
}

.site-logo,
.custom-logo {
    height: 45px;
    width: auto;
    display: block;
}

/* Live Indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--artesh-white);
    margin-left: 15px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--artesh-critical);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 30px;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.header-search-form:focus-within {
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.5);
}

.header-search-input {
    flex: 1;
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    color: var(--artesh-dark);
    outline: none;
    border-radius: 8px 0 0 8px;
}

.header-search-input::placeholder {
    color: var(--artesh-text-light);
}

.header-search-btn {
    background: var(--artesh-accent);
    border: none;
    padding: 10px 15px;
    color: var(--artesh-dark);
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 0 8px 8px 0;
}

.header-search-btn:hover {
    background: var(--artesh-accent-light);
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 10px 16px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: background var(--artesh-transition), color var(--artesh-transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: rgba(255,255,255,0.1);
    color: var(--artesh-white);
}

/* CTA Button in Nav */
.main-navigation .menu-item-cta a {
    background: var(--artesh-accent);
    color: var(--artesh-dark) !important;
    font-weight: 600;
}

.main-navigation .menu-item-cta a:hover {
    background: var(--artesh-accent-light);
}

/* Dropdown Arrow */
.main-navigation li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    vertical-align: middle;
}

/* Flyout Dropdowns */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--artesh-white);
    border: 1px solid var(--artesh-border);
    border-radius: 12px;
    box-shadow: var(--artesh-shadow-lg);
    padding: 8px 0;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--artesh-transition), transform var(--artesh-transition), visibility var(--artesh-transition);
}

.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul a {
    padding: 12px 20px;
    border-radius: 0;
    font-weight: 400;
    color: var(--artesh-text);
}

.main-navigation ul ul a:hover {
    background: var(--artesh-bg-light);
    color: var(--artesh-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--artesh-white);
    position: relative;
    transition: background 0.2s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--artesh-white);
    left: 0;
    transition: transform 0.2s ease, top 0.2s ease, bottom 0.2s ease;
}

.hamburger::before { top: -7px; }
.hamburger::after { bottom: -7px; }

/* Hamburger X animation when menu is open */
.menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ==========================================================================
   HOMEPAGE - SITUATION ROOM DASHBOARD
   ========================================================================== */

.artesh-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--artesh-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-date {
    font-size: 14px;
    color: var(--artesh-text-light);
}

/* Pulse Cards Row */
.pulse-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.pulse-card {
    background: var(--artesh-white);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--artesh-border);
    transition: box-shadow var(--artesh-transition);
}

.pulse-card:hover {
    box-shadow: var(--artesh-shadow-md);
}

.pulse-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--artesh-text-light);
    margin-bottom: 8px;
}

.pulse-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--artesh-dark);
    line-height: 1;
}

.pulse-card-change {
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pulse-card-change.up { color: var(--artesh-up); }
.pulse-card-change.down { color: var(--artesh-down); }

/* Market Ticker */
.market-ticker-section {
    background: var(--artesh-primary-dark);
    padding: 12px 20px;
    overflow: hidden;
    position: relative;
}

.market-ticker {
    display: flex;
    gap: 50px;
    animation: ticker 40s linear infinite;
    white-space: nowrap;
}

.market-ticker:hover {
    animation-play-state: paused;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    color: var(--artesh-white);
    font-size: 14px;
    flex-shrink: 0;
}

.ticker-symbol {
    font-weight: 600;
    color: var(--artesh-accent);
}

.ticker-price {
    font-weight: 500;
}

.ticker-change {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.ticker-change.up {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.ticker-change.down {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Entity ticker items */
.ticker-item.entity-item {
    background: rgba(255,255,255,0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.ticker-item.entity-item .ticker-symbol {
    color: white;
}

.ticker-item.entity-item .ticker-mentions {
    font-size: 11px;
    opacity: 0.8;
}

/* Main Content Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* Breaking News Section */
.breaking-news {
    background: var(--artesh-white);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--artesh-border);
}

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

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--artesh-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .icon {
    font-size: 1.2rem;
}

.view-all {
    font-size: 13px;
    color: var(--artesh-primary);
    font-weight: 500;
}

/* News Item */
.news-item {
    display: flex;
    gap: 15px;
    padding: 18px 0;
    border-bottom: 1px solid var(--artesh-border);
    transition: background var(--artesh-transition);
}

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

.news-item:hover {
    background: var(--artesh-bg-light);
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
}

.news-importance {
    flex-shrink: 0;
    width: 4px;
    border-radius: 2px;
}

.news-importance.critical { background: var(--artesh-critical); }
.news-importance.high { background: var(--artesh-high); }
.news-importance.moderate { background: var(--artesh-moderate); }
.news-importance.low { background: var(--artesh-low); }

.news-content {
    flex: 1;
}

.news-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--artesh-text-light);
    margin-bottom: 6px;
}

.news-source {
    font-weight: 500;
}

.news-headline {
    font-size: 15px;
    font-weight: 600;
    color: var(--artesh-dark);
    line-height: 1.4;
    margin: 0 0 6px;
}

.news-headline a {
    color: inherit;
    text-decoration: none;
}

.news-headline a:hover {
    color: var(--artesh-primary);
}

.news-summary {
    font-size: 14px;
    color: var(--artesh-text-light);
    line-height: 1.5;
    margin: 0;
}

.news-entities {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.entity-tag {
    font-size: 11px;
    padding: 3px 8px;
    background: var(--artesh-bg-light);
    color: var(--artesh-primary);
    border-radius: 4px;
    font-weight: 500;
}

/* Sidebar Sections */
.sidebar-section {
    background: var(--artesh-white);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--artesh-border);
    margin-bottom: 20px;
}

/* Trending Entities */
.trending-entity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--artesh-border);
}

.trending-entity:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.trending-rank {
    font-size: 14px;
    font-weight: 700;
    color: var(--artesh-text-light);
    width: 24px;
}

.trending-info {
    flex: 1;
}

.trending-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--artesh-dark);
}

.trending-name a {
    color: inherit;
    text-decoration: none;
}

.trending-name a:hover {
    color: var(--artesh-primary);
}

.trending-mentions {
    font-size: 12px;
    color: var(--artesh-text-light);
}

.trending-direction {
    font-size: 16px;
}

.trending-direction.up { color: var(--artesh-up); }
.trending-direction.down { color: var(--artesh-down); }

/* Source Diversity Widget */
.source-bar {
    height: 8px;
    background: var(--artesh-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
}

.source-segment {
    height: 100%;
    transition: width var(--artesh-transition);
}

.source-segment.state { background: var(--artesh-critical); }
.source-segment.opposition { background: var(--artesh-primary); }
.source-segment.international { background: var(--artesh-accent); }

.source-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.source-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--artesh-text);
}

.source-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.source-dot.state { background: var(--artesh-critical); }
.source-dot.opposition { background: var(--artesh-primary); }
.source-dot.international { background: var(--artesh-accent); }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: var(--artesh-primary-dark);
    color: rgba(255, 255, 255, 0.7);
    margin-top: 60px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px 30px;
}

.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 h3 {
    color: var(--artesh-white);
    font-size: 24px;
    margin: 0 0 15px;
}

.footer-brand p {
    margin: 0;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--artesh-white);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 20px;
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: color var(--artesh-transition);
}

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

.footer-bottom {
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.footer-bottom a {
    color: var(--artesh-accent);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--artesh-white);
    transition: background var(--artesh-transition);
}

.footer-social a:hover {
    background: var(--artesh-accent);
    color: var(--artesh-dark);
}

/* ==========================================================================
   ARTICLE/NEWS SINGLE PAGE
   ========================================================================== */

main.single-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.article-header {
    margin-bottom: 30px;
}

.article-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.article-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--artesh-primary);
    color: var(--artesh-white);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.article-category-inline {
    color: var(--artesh-accent);
    font-weight: 600;
}

.article-importance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.article-importance.critical {
    background: rgba(220, 38, 38, 0.1);
    color: var(--artesh-critical);
}

.article-importance.high {
    background: rgba(217, 119, 6, 0.1);
    color: var(--artesh-high);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--artesh-dark);
    line-height: 1.2;
    margin: 0 0 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--artesh-text-light);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--artesh-bg-light);
    border-radius: 6px;
}

.source-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* Support both old and new class names */
.source-type.state, .source-type.source-state { background: rgba(220, 38, 38, 0.15); color: #dc2626; }
.source-type.opposition, .source-type.source-opposition { background: rgba(37, 99, 235, 0.15); color: #2563eb; }
.source-type.source-human-rights { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.source-type.international, .source-type.source-international { background: rgba(16, 185, 129, 0.15); color: #059669; }
.source-type.other, .source-type.source-other { background: rgba(107, 114, 128, 0.15); color: #6b7280; }

/* Article Featured Image */
.article-featured-image {
    margin: 0 0 30px;
    border-radius: 16px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--artesh-text);
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2.5em 0 0.75em;
    color: var(--artesh-dark);
}

.article-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2em 0 0.5em;
    color: var(--artesh-dark);
}

.article-content a {
    color: var(--artesh-primary);
    text-decoration: underline;
}

.article-content blockquote {
    margin: 2em 0;
    padding: 20px 25px;
    background: var(--artesh-bg-light);
    border-left: 4px solid var(--artesh-accent);
    font-style: italic;
}

/* Article Footer */
.article-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--artesh-border);
}

.article-entities {
    margin-bottom: 25px;
}

.article-entities h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--artesh-text-light);
    margin: 0 0 12px;
}

.entities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.entity-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--artesh-white);
    border: 1px solid var(--artesh-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--artesh-text);
    transition: all var(--artesh-transition);
}

.entity-link:hover {
    border-color: var(--artesh-primary);
    color: var(--artesh-primary);
}

.entity-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--artesh-text-light);
}

/* AI Translation Notice */
.ai-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    background: var(--artesh-bg-light);
    border-radius: 10px;
    font-size: 13px;
    color: var(--artesh-text-light);
    margin-top: 30px;
}

.ai-notice-icon {
    flex-shrink: 0;
    font-size: 18px;
}

.original-source-link {
    color: var(--artesh-primary);
    font-weight: 500;
}

/* ==========================================================================
   BLOG LISTING / ARCHIVE
   ========================================================================== */

main.news-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 70px;
}

.archive-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--artesh-border);
}

.archive-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--artesh-dark);
    margin: 0;
}

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

/* News Card */
.news-card {
    background: var(--artesh-white);
    border: 1px solid var(--artesh-border);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow var(--artesh-transition), transform var(--artesh-transition);
}

.news-card:hover {
    box-shadow: var(--artesh-shadow-lg);
    transform: translateY(-4px);
}

.news-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-importance {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}

.news-card-importance.critical { background: var(--artesh-critical); color: white; }
.news-card-importance.high { background: var(--artesh-high); color: white; }
.news-card-importance.moderate { background: var(--artesh-moderate); color: var(--artesh-dark); }

.news-card-content {
    padding: 20px;
}

.news-card-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--artesh-text-light);
    margin-bottom: 10px;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
}

.news-card-title a {
    color: var(--artesh-dark);
    text-decoration: none;
}

.news-card-title a:hover {
    color: var(--artesh-primary);
}

.news-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--artesh-text-light);
    margin: 0;
}

/* ==========================================================================
   ENTITY PAGE
   ========================================================================== */

main.entity-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.entity-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--artesh-border);
}

.entity-photo {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--artesh-bg-light);
}

.entity-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entity-info {
    flex: 1;
}

.entity-type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--artesh-primary);
    color: var(--artesh-white);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.entity-name {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--artesh-dark);
    margin: 0 0 5px;
}

.entity-name-farsi {
    font-size: 1.25rem;
    color: var(--artesh-text-light);
    margin: 0 0 15px;
}

.entity-role {
    font-size: 1.1rem;
    color: var(--artesh-text);
    margin: 0;
}

/* Entity Stats */
.entity-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.entity-stat {
    text-align: center;
}

.entity-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--artesh-dark);
}

.entity-stat-label {
    font-size: 12px;
    color: var(--artesh-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   MARKETS PAGE
   ========================================================================== */

.markets-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.market-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.market-card {
    background: var(--artesh-white);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--artesh-border);
    transition: box-shadow var(--artesh-transition);
}

.market-card:hover {
    box-shadow: var(--artesh-shadow-md);
}

.market-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.market-symbol {
    font-size: 14px;
    font-weight: 700;
    color: var(--artesh-dark);
}

.market-name {
    font-size: 12px;
    color: var(--artesh-text-light);
}

.rsi-badge {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.rsi-badge.oversold { background: rgba(16, 185, 129, 0.1); color: var(--artesh-up); }
.rsi-badge.neutral { background: var(--artesh-bg-light); color: var(--artesh-text-light); }
.rsi-badge.overbought { background: rgba(239, 68, 68, 0.1); color: var(--artesh-down); }

.market-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--artesh-dark);
    margin-bottom: 8px;
}

.market-change {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.market-change.up { color: var(--artesh-up); }
.market-change.down { color: var(--artesh-down); }

/* ==========================================================================
   404 PAGE
   ========================================================================== */

main.error-page {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 80px 20px;
}

main.error-page .error-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

main.error-page .error-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--artesh-dark);
}

main.error-page .error-message {
    font-size: 18px;
    color: var(--artesh-text-light);
    margin-bottom: 40px;
}

/* ==========================================================================
   FORMS
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid var(--artesh-border);
    border-radius: 10px;
    background: var(--artesh-white);
    transition: border-color var(--artesh-transition), box-shadow var(--artesh-transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--artesh-primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="search"] {
    flex: 1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {
    .pulse-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .market-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile Header */
    .header-inner {
        height: 60px;
    }
    
    .menu-toggle {
        display: block;
        z-index: 10001;
        position: relative;
    }
    
    .header-search {
        display: none;
    }
    
    .main-navigation {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--artesh-primary-dark);
        padding: 80px 20px 20px;
        z-index: 10000;
        overflow-y: auto;
    }
    
    .main-navigation.toggled {
        display: block !important;
    }
    
    .main-navigation.toggled ul {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .main-navigation a {
        padding: 15px 10px;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Mobile Search in Menu */
    .mobile-search-item {
        border-bottom: none !important;
        padding: 0 0 15px 0;
        margin-bottom: 10px;
    }
    
    .mobile-search-form {
        display: flex;
        gap: 10px;
    }
    
    .mobile-search-form input {
        flex: 1;
        padding: 12px 16px;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        background: rgba(255,255,255,0.95);
        color: var(--artesh-dark);
    }
    
    .mobile-search-form input::placeholder {
        color: var(--artesh-text-light);
    }
    
    .mobile-search-form button {
        padding: 12px 16px;
        background: var(--artesh-accent);
        border: none;
        border-radius: 8px;
        font-size: 16px;
        cursor: pointer;
    }
    
    /* Hide mobile search on desktop */
    .mobile-search-item {
        display: block;
    }
    
    /* Dropdown submenus - hidden by default on mobile */
    .main-navigation ul ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
        background: rgba(0,0,0,0.2);
        border-radius: 8px;
        margin: 5px 0 10px;
        display: none;
    }
    
    .main-navigation li.submenu-open > ul {
        display: block;
    }
    
    .main-navigation ul ul li {
        border-bottom: none;
    }
    
    .main-navigation ul ul a {
        color: rgba(255,255,255,0.85);
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .main-navigation ul ul a:hover {
        background: rgba(255,255,255,0.1);
        color: var(--artesh-white);
    }
    
    /* Dropdown arrow rotation */
    .main-navigation li.menu-item-has-children > a::after {
        transition: transform 0.2s ease;
    }
    
    .main-navigation li.menu-item-has-children.submenu-open > a::after {
        transform: rotate(180deg);
    }
    
    /* CTA button on mobile */
    .main-navigation .menu-item-cta {
        margin-top: 15px;
        border-bottom: none;
    }
    
    .main-navigation .menu-item-cta a {
        justify-content: center;
        border-radius: 8px;
    }
    
    .live-indicator {
        display: none;
    }
    
    /* Pulse */
    .pulse-row {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .pulse-card {
        padding: 15px;
    }
    
    .pulse-card-value {
        font-size: 1.5rem;
    }
    
    /* Footer */
    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    /* Content */
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .entity-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .entity-stats {
        justify-content: center;
    }
    
    .market-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .pulse-row {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .entity-name {
        font-size: 1.75rem;
    }
    
    .news-card-title {
        font-size: 1rem;
    }
    
    /* Mobile ticker */
    .market-ticker-section {
        padding: 10px 15px;
    }
    
    .ticker-item {
        font-size: 12px;
        gap: 6px;
    }
    
    .ticker-item.entity-item {
        padding: 3px 10px;
    }
}

/* Hide mobile search on desktop */
.mobile-search-item {
    display: none;
}

/* Chart container fix */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.chart-container canvas {
    max-height: 100%;
}

/* Rial page responsive */
@media (max-width: 768px) {
    .rate-hero > div {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .rate-hero > div > div:first-child > div:first-child + div {
        font-size: 2.5rem !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
