/* ==========================================================================
   Nezw Magazine – main stylesheet
   Colors come from CSS variables set in Customizer.
   ========================================================================== */

:root {
	--nz-accent: #da334a;
	--nz-topbar-bg: #000;
	--nz-nav-bg: #000;
	--nz-footer-bg: #0c0c0c;
	--nz-heading: #161616;
	--nz-text: #444;
	--nz-border: #e8e8e8;
	--nz-muted: #8a8a8a;
	--nz-logo-size: 52px;
	--nz-logo-h: 60px;
	--nz-wrap: 1200px;
	--nz-gap: 30px;
	--nz-font: "Public Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--nz-head-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--nz-font);
	font-size: 15px;
	line-height: 1.7;
	color: var(--nz-text);
	background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--nz-accent); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--nz-head-font);
	color: var(--nz-heading);
	line-height: 1.35;
	margin: 0 0 .5em;
	font-weight: 600;
}

.wrap { max-width: var(--nz-wrap); margin: 0 auto; padding: 0 20px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { clip: auto; width: auto; height: auto; background: #fff; padding: 10px; z-index: 999; top: 5px; left: 5px; }

/* ---------- Top bar ---------- */
.top-bar { background: var(--nz-topbar-bg); color: #fff; font-size: 12px; }
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 38px; }
.top-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.top-nav a { color: #fff; font-weight: 500; }
.top-nav a:hover { color: var(--nz-accent); }

.social-icons { display: flex; gap: 6px; }
.social-icons a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 3px; color: #fff;
}
.social-icons svg { width: 12px; height: 12px; fill: currentColor; }
.social-facebook { background: #1877f2; }
.social-x { background: #3a8ee6; }
.social-instagram { background: #d6249f; }
.social-youtube { background: #ff0000; }
.social-linkedin { background: #0a66c2; }
.social-icons a:hover { color: #fff; opacity: .85; }

/* ---------- Logo ---------- */
.logo-bar { background: #fff; }
.logo-bar .wrap { display: flex; justify-content: center; align-items: center; min-height: 96px; }
.site-logo .text-logo {
	font-family: var(--nz-head-font);
	font-size: var(--nz-logo-size);
	font-weight: 700;
	letter-spacing: 3px;
	color: #111;
	line-height: 1;
}
.site-logo .accent { color: var(--nz-accent); }
.site-logo .custom-logo { max-height: var(--nz-logo-h); width: auto; }

/* ---------- Main nav ---------- */
.main-nav-bar { background: var(--nz-nav-bg); position: relative; }
.main-nav-inner { display: flex; align-items: center; min-height: 48px; }
.main-nav { flex: 1; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; flex-wrap: wrap; }
.main-nav li { position: relative; }
.main-nav a {
	display: block; padding: 0 16px; line-height: 48px;
	color: #fff; font-family: var(--nz-head-font);
	font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}
.main-nav .current-menu-item > a,
.main-nav .current-cat > a,
.main-nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.main-nav ul ul {
	position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff;
	box-shadow: 0 6px 20px rgba(0,0,0,.12); display: none; z-index: 50;
}
.main-nav ul ul a { color: #222; line-height: 1.4; padding: 10px 16px; text-transform: none; font-weight: 500; }
.main-nav ul ul a:hover { background: #f5f5f5; color: var(--nz-accent); }
.main-nav li:hover > ul { display: block; }

.search-toggle, .menu-toggle { background: none; border: 0; color: #fff; cursor: pointer; padding: 10px; }
.menu-toggle { display: none; width: 44px; }
.menu-toggle span:not(.screen-reader-text) { display: block; height: 2px; background: #fff; margin: 5px 0; }
.search-drop { display: none; background: #111; padding: 15px 0; }
.search-drop.is-open { display: block; }

.search-form { display: flex; gap: 8px; }
.search-form .search-field { flex: 1; padding: 10px 14px; border: 1px solid var(--nz-border); font: inherit; border-radius: 3px; }
.search-form .search-submit { background: var(--nz-accent); color: #fff; border: 0; padding: 0 18px; font-weight: 600; border-radius: 3px; cursor: pointer; }

/* ---------- Layout ---------- */
.site-main { padding: 30px 0 50px; }
.nz-full-width .site-main,
.elementor-template-full-width .site-main,
.elementor-template-canvas .site-main { padding: 0; }
.has-sidebar, .home-row.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--nz-gap); }
.page-wrap .content-main { max-width: 860px; margin: 0 auto; }
.sticky-inner { position: sticky; top: 20px; }

.grid { display: grid; gap: 20px; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.block { margin-bottom: 35px; }
.block-title, .widget-title {
	font-size: 13px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
	border-bottom: 2px solid var(--nz-heading); margin-bottom: 20px; padding-bottom: 0;
}
.block-title span, .widget-title span {
	display: inline-block; background: var(--nz-heading); color: #fff; padding: 6px 12px 4px;
}

/* ---------- Cards ---------- */
.card { position: relative; }
.media { display: block; overflow: hidden; background: #eee; position: relative; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s, transform .4s; }
.card:hover .media img { opacity: .9; }
.no-thumb { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #e5e5e5, #cfcfcf); }

.cat-label {
	display: inline-block; background: var(--nz-accent); color: #fff !important;
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
	padding: 3px 7px; line-height: 1.5; border-radius: 2px;
}
.post-title { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.post-meta { font-size: 11px; color: var(--nz-muted); text-transform: uppercase; display: flex; flex-wrap: wrap; gap: 0 10px; }
.post-meta a { color: var(--nz-heading); font-weight: 600; }
.excerpt { font-size: 14px; margin-top: 10px; color: var(--nz-text); }

/* overlay */
.card-overlay .media { aspect-ratio: 16 / 9.5; }
.card-overlay .media::after {
	content: ""; position: absolute; inset: 40% 0 0;
	background: linear-gradient(to bottom, transparent, rgba(0,0,0,.85));
	pointer-events: none;
}
.card-overlay .overlay-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; color: #fff; z-index: 2; }
.card-overlay .post-title { color: #fff; font-size: 28px; line-height: 1.3; margin: 10px 0 8px; }
.card-overlay .post-title a:hover { color: #fff; text-decoration: underline; }
.card-overlay .post-meta, .card-overlay .post-meta a { color: #fff; }
.overlay-sm .post-title { font-size: 17px; }
.overlay-sm .media { aspect-ratio: 16 / 11; }

/* grid card */
.card-grid .media-wrap { position: relative; margin-bottom: 12px; }
.card-grid .media { aspect-ratio: 16 / 10.5; }
.card-grid .media-wrap .cat-label { position: absolute; left: 10px; bottom: 10px; z-index: 2; }

/* list card */
.card-list { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--nz-border); }
.card-list:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.card-list .media { flex: 0 0 105px; aspect-ratio: 16 / 11; }
.card-list.thumb-right { flex-direction: row-reverse; }
.card-list .content { flex: 1; min-width: 0; }
.card-list .post-title { font-size: 14px; margin-bottom: 4px; }

/* ---------- Homepage blocks ---------- */
.block-hero .hero-main { margin-bottom: 20px; }
.hero-small .post-title { font-size: 13px; }
.hero-small .post-meta { display: none; }

.big-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--nz-gap); }
.big-list .card-grid .post-title { font-size: 18px; }

.block-grid { border-top: 1px solid var(--nz-border); padding-top: 35px; }

/* ---------- Sidebar & widgets ---------- */
.sidebar .widget { margin-bottom: 35px; }
.nezw-posts.style-card .card-grid { margin-bottom: 20px; }
.nezw-posts.style-card .post-title { font-size: 17px; }
.widget ul { padding-left: 18px; }

/* ---------- Single / page ---------- */
.archive-header { margin-bottom: 25px; }
.archive-title { font-size: 26px; }
.archive-title span { color: var(--nz-accent); }
.archive-grid .post-title { font-size: 18px; }

.entry-header { margin-bottom: 20px; }
.entry-title { font-size: 34px; line-height: 1.25; margin: 10px 0; }
.entry-featured { margin: 0 0 25px; }
.entry-featured figcaption { font-size: 12px; color: var(--nz-muted); margin-top: 6px; }
.entry-content { font-size: 16px; line-height: 1.8; }
.entry-content h2 { font-size: 24px; margin-top: 1.4em; }
.entry-content h3 { font-size: 20px; margin-top: 1.3em; }
.entry-content a { color: var(--nz-accent); text-decoration: underline; }
.entry-content { overflow-wrap: break-word; }
.entry-content img, .entry-content video, .entry-content iframe { max-width: 100%; height: auto; }
.entry-content .wp-caption, .entry-content figure { max-width: 100% !important; margin-left: 0; margin-right: 0; }
.entry-content .wp-caption-text, .entry-content figcaption { font-size: 13px; color: var(--nz-muted); margin-top: 6px; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.entry-content blockquote { border-left: 4px solid var(--nz-accent); margin: 1.5em 0; padding: 4px 20px; font-style: italic; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content td, .entry-content th { border: 1px solid var(--nz-border); padding: 8px 12px; }
.entry-tags { margin: 25px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.entry-tags a { background: #f2f2f2; padding: 3px 10px; font-size: 12px; }
.post-navigation { border-top: 1px solid var(--nz-border); border-bottom: 1px solid var(--nz-border); padding: 20px 0; margin: 30px 0; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 20px; }
.post-navigation .nav-next { text-align: right; margin-left: auto; }
.post-navigation .nav-sub { display: block; font-size: 11px; text-transform: uppercase; color: var(--nz-muted); }
.post-navigation .nav-title { font-family: var(--nz-head-font); font-weight: 600; color: var(--nz-heading); }
.related { margin-top: 30px; }

.pagination .nav-links { display: flex; gap: 6px; margin-top: 30px; }
.pagination .page-numbers { padding: 6px 13px; border: 1px solid var(--nz-border); }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--nz-accent); border-color: var(--nz-accent); color: #fff; }

.comments-area, #comments, .comment-respond { margin-top: 45px; }
.comment-reply-title, .comments-title { font-size: 20px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--nz-border); padding: 18px 0; }
.comment-list .children { list-style: none; padding-left: 30px; }
.comment-author .avatar { float: left; margin-right: 12px; border-radius: 50%; }
.comment-metadata { font-size: 12px; color: var(--nz-muted); }
.comment-form p { margin: 0 0 15px; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-form textarea { min-height: 150px; }

/* Sticky footer on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }

.archive-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--nz-accent); font-weight: 700; }
.archive-header { border-bottom: 1px solid var(--nz-border); padding-bottom: 15px; }
.page-wrap .entry-header { border-bottom: 1px solid var(--nz-border); padding-bottom: 15px; }

.nz-button { display: inline-block; background: var(--nz-heading); color: #fff; padding: 10px 22px; font-weight: 600; border-radius: 3px; margin-top: 15px; }
.nz-button:hover { background: var(--nz-accent); color: #fff; }

/* 404 */
.error-404-box { max-width: 600px; margin: 30px auto 60px; text-align: center; }
.error-code { font-family: var(--nz-head-font); font-size: 120px; font-weight: 800; line-height: 1; color: var(--nz-accent); }
.error-404-box .search-form { margin-top: 20px; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; padding: 10px; border: 1px solid var(--nz-border); font: inherit; }
.comment-form .submit, .wpcf7-submit { background: var(--nz-accent); color: #fff; border: 0; padding: 10px 22px; font-weight: 600; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { background: var(--nz-footer-bg); color: #cfcfcf; font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 50px; padding-top: 55px; padding-bottom: 45px; }
.site-footer .site-logo { margin-bottom: 15px; }
.site-footer .text-logo { color: #fff; font-size: calc(var(--nz-logo-size) * .8); }
.site-footer .widget-title { border: 0; color: #fff; }
.site-footer .widget-title span { background: none; padding: 0; }
.site-footer .card-list { border-color: rgba(255,255,255,.08); }
.site-footer .post-title, .site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4 { color: #fff; }
.site-footer .post-meta { color: #9a9a9a; }
.site-footer .media { background: #1c1c1c; }
.site-footer .widget { margin-bottom: 25px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; min-height: 54px; flex-wrap: wrap; gap: 10px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }
.footer-nav a { color: #fff; }
.footer-nav a:hover { color: var(--nz-accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.has-sidebar, .home-row.has-sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
	.grid-5, .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.has-sidebar, .home-row.has-sidebar { grid-template-columns: minmax(0, 1fr); }
	.footer-cols { grid-template-columns: 1fr; gap: 30px; }
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.menu-toggle { display: block; }
	.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--nz-nav-bg); z-index: 60; }
	.main-nav.is-open { display: block; }
	.main-nav > ul { flex-direction: column; }
	.main-nav ul ul { position: static; display: block; box-shadow: none; background: transparent; }
	.main-nav ul ul a { color: #ddd; padding-left: 30px; }
	.main-nav-inner { justify-content: space-between; }
}

@media (max-width: 640px) {
	.grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-2, .big-list { grid-template-columns: 1fr; }
	.card-overlay .post-title { font-size: 20px; }
	.entry-title { font-size: 26px; }
	.logo-bar .wrap { min-height: 80px; }
	.site-logo .text-logo { font-size: calc(var(--nz-logo-size) * .75); }
	.top-nav ul { gap: 4px 12px; flex-wrap: wrap; }
	.top-nav a { white-space: nowrap; font-size: 11px; }
	.top-bar-inner { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; gap: 6px; }
	.top-bar .social-icons { display: none; }
	.error-code { font-size: 80px; }
	.hero-main .media { aspect-ratio: 4 / 3.6; }
	.card-overlay .overlay-content { padding: 16px; }
	.related .grid-3 > .card:nth-child(3) { display: none; }
	.site-main { padding-top: 20px; }
	.archive-title { font-size: 22px; }
	.post-navigation .nav-links { flex-direction: column; }
	.post-navigation .nav-next { text-align: left; margin-left: 0; }
	.search-form .search-submit { padding: 0 12px; }
}
