/* ============================================
   HACK8HIDE - Tech News Blog Theme
   Dark cyber theme with neon accents
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #1a1a25;
    --border-color: #2a2a3a;
    --border-accent: #00ff88;
    
    --text-primary: #e8e8f0;
    --text-secondary: #9999aa;
    --text-muted: #666677;
    
    --accent-green: #00ff88;
    --accent-cyan: #00d4ff;
    --accent-red: #ff0040;
    --accent-orange: #ff8800;
    --accent-purple: #aa00ff;
    --accent-yellow: #ffdd00;
    
    --gradient-main: linear-gradient(135deg, #00ff88, #00d4ff);
    --gradient-hero: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 212, 255, 0.05));
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 40px rgba(0, 255, 136, 0.1);
    
    --container-width: 1280px;
    --header-height: 70px;
}

/* ─── Reset ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-green);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Breaking News Ticker ─── */
.breaking-ticker {
    background: var(--accent-red);
    color: #fff;
    display: flex;
    align-items: center;
    height: 36px;
    overflow: hidden;
    font-size: 0.85rem;
    font-weight: 500;
}

.ticker-label {
    background: #cc0033;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.ticker-wrap {
    overflow: hidden;
    flex: 1;
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
    padding-left: 100%;
}

.ticker-content a {
    color: #fff;
}

.ticker-content a:hover {
    text-decoration: underline;
}

.ticker-sep {
    color: rgba(255,255,255,0.5);
    font-size: 0.6rem;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ─── Header ─── */
.main-header {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 42px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 2px;
    line-height: 1.2;
}

.logo-name .accent {
    color: var(--accent-green);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.logo-tagline {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.05);
}

.nav-search {
    margin-left: 12px;
}

.nav-search form {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 0.85rem;
    width: 160px;
    outline: none;
    font-family: var(--font-main);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 12px;
    cursor: pointer;
    transition: color 0.2s;
}

.search-btn:hover {
    color: var(--accent-green);
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* ─── Main Content ─── */
.site-main {
    min-height: calc(100vh - var(--header-height) - 300px);
}

/* ─── Hero Section (Featured Articles) ─── */
.hero-section {
    padding: 30px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: 280px 280px;
    gap: 16px;
}

.hero-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero-card.main-hero {
    grid-row: 1 / 3;
}

.hero-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.hero-card:hover .hero-card-img {
    transform: scale(1.05);
}

.hero-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

.hero-card.main-hero .hero-card-overlay {
    padding: 40px 30px;
}

.hero-card-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #fff;
}

.hero-card-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-card.main-hero .hero-card-title {
    font-size: 1.6rem;
}

.hero-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

/* ─── Section Headers ─── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .accent-bar {
    width: 4px;
    height: 24px;
    background: var(--accent-green);
    border-radius: 2px;
}

.section-title .accent-dot {
    color: var(--accent-green);
}

.section-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

/* ─── Article Cards ─── */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.article-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover .article-card-img {
    transform: scale(1.05);
}

.article-card-img-wrap {
    overflow: hidden;
    position: relative;
}

.article-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #fff;
    width: fit-content;
}

.article-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.article-card:hover .article-card-title {
    color: var(--accent-green);
}

.article-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
    flex: 1;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.article-card-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-card-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ─── Sidebar ─── */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    padding: 30px 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--accent-green);
}

.trending-list {
    list-style: none;
}

.trending-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-green);
    opacity: 0.3;
    line-height: 1;
    min-width: 30px;
    font-family: var(--font-mono);
}

.trending-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.trending-info h4 a {
    color: var(--text-primary);
}

.trending-info h4 a:hover {
    color: var(--accent-green);
}

.trending-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.category-tag:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.05);
}

/* ─── Article Detail Page ─── */
.article-detail {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.article-detail-header {
    margin-bottom: 30px;
}

.article-detail-category {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 16px;
}

.article-detail-title {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 16px;
}

.article-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.article-detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-detail-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 10px;
}

.article-detail-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.image-attribution {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-style: italic;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: #b0c4de;
}

.article-content h3 {
    font-size: 1.25rem;
    margin: 25px 0 12px;
}

.article-content p {
    margin-bottom: 18px;
}

.article-content blockquote {
    border-left: 4px solid #7aa2cc;
    background: var(--bg-card);
    padding: 20px 24px;
    margin: 20px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content code {
    background: var(--bg-card);
    color: #a8d8ea;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.article-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content pre code {
    background: transparent;
    padding: 0;
}

.article-content ul, .article-content ol {
    padding-left: 24px;
    margin-bottom: 18px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content img {
    border-radius: var(--radius-md);
    margin: 20px 0;
}

/* ─── References Section ─── */
.references-section {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.references-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b0c4de;
}

.references-list {
    list-style: none;
    counter-reset: ref-counter;
}

.references-list li {
    counter-increment: ref-counter;
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.references-list li:last-child {
    border-bottom: none;
}

.references-list li::before {
    content: "[" counter(ref-counter) "]";
    position: absolute;
    left: 0;
    color: #7aa2cc;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
}

.references-list li a {
    word-break: break-all;
}

/* ─── Tags ─── */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.article-tag:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

/* ─── Related Articles ─── */
.related-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* ─── Horizontal Article Card ─── */
.article-card-horizontal {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}

.article-card-horizontal:hover {
    border-color: var(--accent-green);
    box-shadow: var(--shadow-hover);
}

.article-card-horizontal .article-card-img-wrap {
    width: 200px;
    min-height: 140px;
    flex-shrink: 0;
}

.article-card-horizontal .article-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-horizontal .article-card-body {
    padding: 16px;
}

/* ─── Category Page ─── */
.category-header {
    padding: 40px 0 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.category-header h1 {
    font-size: 2rem;
    font-weight: 900;
}

.category-header p {
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ─── Search page ─── */
.search-header {
    padding: 40px 0 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.search-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.search-header h1 span {
    color: var(--accent-green);
}

/* ─── Pagination ─── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 30px 0 50px;
}

.page-link {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
}

.page-link:hover, .page-link.active {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.05);
}

/* ─── No Content ─── */
.no-content {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.no-content i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent-green);
    opacity: 0.3;
}

.no-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* ─── Auto Generated Badge ─── */
.auto-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--accent-cyan);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Footer ─── */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-logo img {
    height: 36px;
}

.footer-logo h3 {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.footer-logo .accent {
    color: var(--accent-green);
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--accent-green);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.footer-social a:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.05);
}

.newsletter-form {
    display: flex;
    margin-top: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.newsletter-form input {
    flex: 1;
    background: var(--bg-input);
    border: none;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    font-family: var(--font-main);
}

.newsletter-form button {
    background: var(--accent-green);
    border: none;
    color: var(--bg-primary);
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-main);
}

.newsletter-form button:hover {
    background: #00cc6e;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent-green);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}

/* ─── Selection ─── */
::selection {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-green);
}

/* ─── Flash Messages ─── */
.flash-message {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.flash-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--accent-green);
}

.flash-error {
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid rgba(255, 0, 64, 0.3);
    color: var(--accent-red);
}

.flash-info {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--accent-cyan);
}

/* ─── Default Image Placeholder ─── */
.img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero-card.main-hero {
        grid-row: auto;
        grid-column: 1 / 3;
    }
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
    }
    .main-nav.active {
        display: flex;
    }
    .nav-search {
        margin: 10px 0 0;
    }
    .search-input {
        width: 100%;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .hero-card.main-hero {
        grid-column: auto;
        min-height: 300px;
    }
    .hero-card {
        min-height: 220px;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .article-detail-title {
        font-size: 1.6rem;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .article-card-horizontal {
        flex-direction: column;
    }
    .article-card-horizontal .article-card-img-wrap {
        width: 100%;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .logo-tagline {
        display: none;
    }
    .hero-card.main-hero .hero-card-title {
        font-size: 1.2rem;
    }
}

/* ─── Tag Cloud ─── */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    justify-content: center;
    padding: 10px 0;
}

.tag-cloud-item {
    color: var(--text-secondary);
    transition: all 0.2s;
    line-height: 1;
    text-transform: capitalize;
}

.tag-cloud-item:hover {
    color: var(--accent-green) !important;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* ─── Modals ─── */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-card);
    margin: 15% auto; 
    padding: 30px; 
    border: 1px solid var(--border-color);
    width: 90%; 
    max-width: 500px;
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { margin-top: 10%; opacity: 0; }
    to { margin-top: 15%; opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--accent-red);
}

.modal h2 {
    margin-bottom: 15px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.modal p {
    color: var(--text-secondary);
    line-height: 1.6;
}
