/*
Theme Name: ViralPulse
Theme URI: https://example.com/viralpulse
Author: ViralPulse Team
Author URI: https://example.com
Description: A premium, clean and professional news & viral article-sharing WordPress theme. Modern digital-newspaper layout with featured story, trending, latest posts, category grids, popular content, related articles, social share and a polished footer. Fully responsive and optimized for readers on desktop and mobile.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: viralpulse
Tags: news, magazine, blog, two-columns, right-sidebar, custom-menu, featured-images, block-styles, translation-ready
*/

/* Reset & base */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;font-size:16px;line-height:1.65;color:#1a1a1a;background:#f7f7f9;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:#c8102e;text-decoration:none;transition:color .2s}
a:hover{color:#8f0b20}
h1,h2,h3,h4,h5,h6{font-family:'Playfair Display','Georgia',serif;font-weight:700;line-height:1.25;margin:0 0 .6em;color:#111}
p{margin:0 0 1em}
button{cursor:pointer;font:inherit}

/* Layout */
.container{max-width:1240px;margin:0 auto;padding:0 20px}
.site-main{padding:32px 0 64px}
.grid{display:grid;gap:24px}

/* Top bar */
.topbar{background:#111;color:#ddd;font-size:13px}
.topbar .container{display:flex;justify-content:space-between;align-items:center;height:38px}
.topbar a{color:#ddd}
.topbar a:hover{color:#fff}
.topbar .date{opacity:.75}
.topbar .social a{margin-left:14px}

/* Header */
.site-header{background:#fff;border-bottom:1px solid #e8e8ee;position:sticky;top:0;z-index:50}
.site-header .container{display:flex;align-items:center;justify-content:space-between;padding:18px 20px}
.site-branding{display:flex;align-items:center;gap:10px}
.site-title{font-family:'Playfair Display',serif;font-weight:900;font-size:28px;margin:0;letter-spacing:-.5px;color:#111}
.site-title a{color:inherit}
.site-title .dot{color:#c8102e}
.site-description{display:none}
.header-actions{display:flex;align-items:center;gap:14px}
.search-toggle,.menu-toggle{background:none;border:0;font-size:20px;color:#111;padding:6px}

/* Nav */
.main-nav{background:#fff;border-bottom:1px solid #e8e8ee}
.main-nav .container{display:flex;align-items:center;justify-content:space-between}
.main-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap}
.main-nav li{position:relative}
.main-nav a{display:block;padding:14px 16px;color:#222;font-weight:600;font-size:14px;letter-spacing:.3px;text-transform:uppercase}
.main-nav a:hover,.main-nav .current-menu-item>a{color:#c8102e}
.main-nav ul ul{display:none;position:absolute;top:100%;left:0;background:#fff;min-width:200px;box-shadow:0 10px 30px rgba(0,0,0,.08);border:1px solid #eee;z-index:60}
.main-nav li:hover>ul{display:block}
.main-nav ul ul a{text-transform:none;font-weight:500}

/* Featured hero */
.hero{display:grid;grid-template-columns:2fr 1fr;gap:20px;margin-bottom:36px}
.hero-main{position:relative;border-radius:12px;overflow:hidden;min-height:460px;background:#111;color:#fff}
.hero-main .thumb{position:absolute;inset:0}
.hero-main .thumb img{width:100%;height:100%;object-fit:cover;opacity:.75}
.hero-main .overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.1) 30%,rgba(0,0,0,.85) 100%)}
.hero-main .content{position:absolute;left:0;right:0;bottom:0;padding:32px}
.hero-main h2{font-size:34px;color:#fff;margin:8px 0 10px}
.hero-main h2 a{color:#fff}
.hero-main .meta{color:#ddd;font-size:13px}
.hero-side{display:flex;flex-direction:column;gap:16px}
.hero-side .card{position:relative;border-radius:10px;overflow:hidden;min-height:140px;background:#222;color:#fff;flex:1}
.hero-side .card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.7}
.hero-side .card .content{position:absolute;inset:auto 0 0 0;padding:14px;background:linear-gradient(180deg,transparent,rgba(0,0,0,.85))}
.hero-side .card h3{font-size:17px;color:#fff;margin:6px 0 0}
.hero-side .card h3 a{color:#fff}

/* Category tag */
.cat-tag{display:inline-block;background:#c8102e;color:#fff;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;padding:4px 10px;border-radius:3px}
.cat-tag.alt{background:#111}

/* Section headings */
.section-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 20px;border-bottom:2px solid #111;padding-bottom:8px}
.section-head h2{font-size:22px;margin:0}
.section-head a.more{font-size:13px;font-weight:600;text-transform:uppercase;color:#c8102e}

/* Content + Sidebar layout */
.content-area{display:grid;grid-template-columns:2.2fr 1fr;gap:36px}
@media (max-width:960px){.content-area{grid-template-columns:1fr}.hero{grid-template-columns:1fr}.hero-main{min-height:340px}}

/* Article cards */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.cards.cols-2{grid-template-columns:repeat(2,1fr)}
@media (max-width:820px){.cards{grid-template-columns:repeat(2,1fr)}}
@media (max-width:520px){.cards,.cards.cols-2{grid-template-columns:1fr}}
.card-article{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 10px rgba(20,20,40,.05);transition:transform .2s,box-shadow .2s;display:flex;flex-direction:column}
.card-article:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(20,20,40,.08)}
.card-article .thumb{position:relative;aspect-ratio:16/10;overflow:hidden;background:#eee}
.card-article .thumb img{width:100%;height:100%;object-fit:cover;transition:transform .5s}
.card-article:hover .thumb img{transform:scale(1.05)}
.card-article .thumb .cat-tag{position:absolute;top:12px;left:12px}
.card-article .body{padding:16px 18px 18px}
.card-article h3{font-size:18px;margin:0 0 8px;line-height:1.3}
.card-article h3 a{color:#111}
.card-article h3 a:hover{color:#c8102e}
.card-article .meta{color:#777;font-size:12px}
.card-article .excerpt{color:#444;font-size:14px;margin-top:8px}

/* Horizontal list (latest) */
.post-list{display:flex;flex-direction:column;gap:18px}
.post-row{display:grid;grid-template-columns:180px 1fr;gap:16px;background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 10px rgba(20,20,40,.04)}
.post-row .thumb{aspect-ratio:4/3}
.post-row .thumb img{width:100%;height:100%;object-fit:cover}
.post-row .body{padding:14px 16px}
.post-row h3{font-size:18px;margin:6px 0 6px}
.post-row h3 a{color:#111}
@media (max-width:520px){.post-row{grid-template-columns:120px 1fr}.post-row h3{font-size:15px}}

/* Sidebar */
.sidebar .widget{background:#fff;border-radius:10px;padding:18px;margin-bottom:22px;box-shadow:0 2px 10px rgba(20,20,40,.04)}
.sidebar h3.widget-title{font-size:14px;text-transform:uppercase;letter-spacing:.6px;margin:0 0 14px;border-left:3px solid #c8102e;padding-left:8px}
.popular-list{list-style:none;margin:0;padding:0}
.popular-list li{display:grid;grid-template-columns:32px 1fr;gap:10px;padding:10px 0;border-bottom:1px dashed #eee}
.popular-list li:last-child{border:0}
.popular-list .num{font-family:'Playfair Display',serif;font-size:26px;font-weight:900;color:#c8102e;line-height:1}
.popular-list a{color:#111;font-weight:600;font-size:14px}
.popular-list a:hover{color:#c8102e}
.newsletter{background:linear-gradient(135deg,#c8102e,#7d0a1d);color:#fff}
.newsletter h3.widget-title{color:#fff;border-color:#fff}
.newsletter p{font-size:14px;opacity:.9}
.newsletter form{display:flex;gap:8px;margin-top:10px}
.newsletter input[type=email]{flex:1;padding:10px 12px;border:0;border-radius:6px;font-size:14px}
.newsletter button{background:#111;color:#fff;border:0;padding:10px 14px;border-radius:6px;font-weight:700}

/* Category strip */
.cat-strip{margin:36px 0}
.cat-strip .head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;border-bottom:2px solid #111;padding-bottom:8px}
.cat-strip .head h2{margin:0;font-size:22px}
.cat-strip .head h2 span{color:#c8102e}

/* Single */
.single-hero{background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 4px 20px rgba(20,20,40,.06);margin-bottom:24px}
.single-hero .featured{aspect-ratio:16/8;overflow:hidden;background:#eee}
.single-hero .featured img{width:100%;height:100%;object-fit:cover}
.single-hero .head{padding:26px 30px 8px}
.single-hero h1{font-size:38px;margin:12px 0 10px;line-height:1.15}
.single-hero .meta{color:#666;font-size:13px}
.single-hero .meta .author{color:#111;font-weight:700}
.article-body{background:#fff;padding:26px 30px 32px;border-radius:12px;box-shadow:0 2px 10px rgba(20,20,40,.05);font-size:17px;line-height:1.8;color:#222}
.article-body p{margin:0 0 1.1em}
.article-body h2{font-size:26px;margin-top:1.6em}
.article-body h3{font-size:20px;margin-top:1.4em}
.article-body img{border-radius:8px;margin:1em 0}
.article-body blockquote{border-left:4px solid #c8102e;background:#faf1f2;margin:1.4em 0;padding:14px 18px;color:#333;font-style:italic}
@media (max-width:640px){.single-hero h1{font-size:26px}.single-hero .head,.article-body{padding:18px}}

/* Share */
.share{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:18px 30px;border-top:1px solid #eee;background:#fff;border-radius:0 0 12px 12px}
.share strong{margin-right:6px;font-size:13px;text-transform:uppercase;letter-spacing:.5px}
.share a{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:6px;color:#fff;font-size:13px;font-weight:600}
.share a.fb{background:#1877f2}
.share a.tw{background:#111}
.share a.wa{background:#25d366}
.share a.li{background:#0a66c2}
.share a.cp{background:#555}

/* Related */
.related{margin-top:36px}
.related h2.section-title{font-size:22px;margin:0 0 16px;border-bottom:2px solid #111;padding-bottom:8px}

/* Pagination */
.pagination{margin:26px 0;text-align:center}
.pagination .page-numbers{display:inline-block;padding:8px 14px;margin:0 3px;background:#fff;border-radius:6px;color:#111;font-weight:600;box-shadow:0 2px 6px rgba(0,0,0,.05)}
.pagination .page-numbers.current{background:#c8102e;color:#fff}

/* Footer */
.site-footer{background:#0d0d10;color:#c9c9d0;margin-top:60px}
.site-footer .top{padding:50px 0 30px}
.site-footer .cols{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:34px}
@media (max-width:820px){.site-footer .cols{grid-template-columns:1fr 1fr}}
@media (max-width:520px){.site-footer .cols{grid-template-columns:1fr}}
.site-footer h4{color:#fff;font-family:'Inter',sans-serif;font-size:14px;text-transform:uppercase;letter-spacing:.8px;margin:0 0 14px}
.site-footer .brand-title{font-family:'Playfair Display',serif;font-size:28px;font-weight:900;color:#fff;margin:0 0 10px}
.site-footer ul{list-style:none;padding:0;margin:0}
.site-footer li{padding:5px 0}
.site-footer a{color:#c9c9d0}
.site-footer a:hover{color:#fff}
.site-footer .bottom{border-top:1px solid #1e1e24;padding:18px 0;font-size:13px;color:#888;text-align:center}
.site-footer .social a{display:inline-block;margin-right:12px;font-size:16px}

/* Screen reader */
.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;width:1px;word-wrap:normal!important}

/* WP alignment */
.alignleft{float:left;margin:.5em 1.5em 1em 0}
.alignright{float:right;margin:.5em 0 1em 1.5em}
.aligncenter{margin-left:auto;margin-right:auto;display:block}
.wp-caption{max-width:100%}
.wp-caption-text{font-size:13px;color:#666;text-align:center;margin-top:6px}
.sticky{}
.bypostauthor{}
.gallery-caption{}
