/*
Theme Name: 4news
Theme URI: https://4news.mk
Author: 4news
Description: Модерен минималистички дизајн за вести портал. Inferno Red бренд.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: fournews
*/

:root {
  --primary: #A80600;
  --primary-foreground: #FFFFFF;
  --foreground: #000000;
  --background: #FFFFFF;
  --card: #FFFFFF;
  --muted: #F5F5F5;
  --muted-foreground: #595959;
  --border: #E6E6E6;
  --accent: #F0F0F0;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: 'PT Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; padding: 0; margin: 0; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 1rem; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--card);
}
.site-header__bar { border-bottom: 1px solid var(--border); }
.site-header__inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  height: 56px; padding: 0 1rem;
}
.site-header__inner--narrow { padding: 12px 1rem; height: auto; }

/* Logo with red angled background */
.site-logo {
  position: relative; display: flex; align-items: center;
  align-self: stretch; padding-left: 0.5rem; padding-right: 2rem;
  flex-shrink: 0;
}
.site-logo__bg {
  position: absolute; top: 0; bottom: 0; left: -1rem; right: 0;
  background: var(--primary);
  clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
}
.site-logo__img,
.site-logo .custom-logo {
  position: relative; z-index: 1; height: 40px; width: auto; display: block;
}

/* Nav menu */
.site-nav { display: none; flex: 1; }
@media (min-width: 1024px) { .site-nav { display: block; } }
.site-nav__list,
.site-nav ul,
.site-nav .menu {
  display: flex !important; align-items: center; gap: 0;
  list-style: none !important; padding: 0 !important; margin: 0;
}
.site-nav__list li,
.site-nav ul li,
.site-nav .menu li {
  list-style: none !important; padding: 0; margin: 0;
}
.site-nav a,
.site-nav__list a {
  display: inline-block; padding: 1rem 0.75rem;
  font-size: 0.875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted-foreground);
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.site-nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }

.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.icon-btn {
  background: transparent; border: 0; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--accent); color: var(--foreground); }
.icon-btn--menu { display: inline-flex; }
@media (min-width: 1024px) { .icon-btn--menu { display: none; } }

/* Search panel */
.site-header__search { border-bottom: 1px solid var(--border); background: var(--card); }
.site-search-form { display: flex; gap: 0.5rem; }
.site-search-form input {
  flex: 1; border: 1px solid var(--border); background: var(--background);
  padding: 0.55rem 0.85rem; font-size: 0.875rem; border-radius: 4px; outline: none;
}
.site-search-form input:focus { border-color: var(--primary); }
.site-search-form button {
  background: var(--primary); color: var(--primary-foreground);
  border: 0; padding: 0.55rem 1.25rem; font-size: 0.875rem; font-weight: 800;
  border-radius: 4px; cursor: pointer;
}

/* Mobile menu */
.site-mobile-nav { border-bottom: 1px solid var(--border); background: var(--card); }
.site-mobile-nav ul { padding: 0.5rem 1rem; max-width: 1320px; margin: 0 auto; }
.site-mobile-nav li { list-style: none; }
.site-mobile-nav a {
  display: block; padding: 0.65rem 0.75rem; border-radius: 4px;
  font-size: 0.875rem; font-weight: 700; text-transform: uppercase;
  color: var(--muted-foreground);
}
.site-mobile-nav a:hover { background: var(--accent); color: var(--primary); }

/* ===== Front page ===== */
.fp { padding: 1.5rem 1rem; }
.fp__title {
  font-size: 1.5rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.025em; margin: 0 0 1.5rem;
}
@media (min-width: 768px) { .fp__title { font-size: 1.875rem; } }

/* Hero */
.fp__hero {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2rem;
}
@media (min-width: 1024px) {
  .fp__hero { grid-template-columns: minmax(0, 1fr) 320px; }
}
.hero-card {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 10; background: var(--muted);
}
.hero-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.hero-card:hover img { transform: scale(1.04); }
.hero-card__overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, transparent 60%, rgba(0,0,0,0.4));
}
.hero-card__panel {
  position: absolute; right: 0; bottom: 0; width: 100%;
  background: var(--primary); padding: 1.25rem 1.5rem;
}
@media (min-width: 640px) { .hero-card__panel { width: 55%; } }
.hero-card__panel h2 {
  margin: 0; color: var(--primary-foreground);
  font-size: 1.125rem; font-weight: 800; line-height: 1.25;
}
@media (min-width: 768px) { .hero-card__panel h2 { font-size: 1.5rem; } }

.fp__hero-side { display: flex; flex-direction: column; gap: 1.25rem; }
.side-card { display: block; }
.side-card__image { overflow: hidden; aspect-ratio: 16 / 9; background: var(--muted); }
.side-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.side-card:hover .side-card__image img { transform: scale(1.03); }
.side-card__title {
  margin: 0.75rem 0 0; font-size: 1rem; font-weight: 700; line-height: 1.3;
}
.side-card:hover .side-card__title { color: var(--primary); }

/* Contact CTA */
.contact-cta {
  position: relative; display: flex; flex-direction: column; gap: 1rem;
  align-items: flex-start; justify-content: space-between;
  background: var(--primary); padding: 1.25rem 1.5rem;
  margin-bottom: 2rem; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08); transition: box-shadow .3s;
}
@media (min-width: 640px) { .contact-cta { flex-direction: row; align-items: center; padding: 1.5rem 2rem; } }
.contact-cta:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.18); }
.contact-cta__text {
  color: var(--primary-foreground);
  font-size: 1.125rem; font-weight: 900;
  text-transform: uppercase; font-style: italic; letter-spacing: -0.01em;
}
@media (min-width: 768px) { .contact-cta__text { font-size: 1.5rem; } }
.contact-cta__text strong { font-weight: 900; }
.contact-cta__btn {
  display: inline-flex; flex-shrink: 0;
  background: var(--background); color: var(--primary);
  padding: 0.75rem 1.5rem; font-size: 0.875rem;
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.15em;
  font-style: italic;
}

/* Main grid */
.fp__main-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 1rem;
}
@media (min-width: 1024px) {
  .fp__main-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* Cards grid */
.cards-grid { display: grid; gap: 1.25rem 1.25rem; grid-template-columns: 1fr; }
.cards-grid--3 { grid-template-columns: 1fr; }
.cards-grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .cards-grid--3, .cards-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.news-card { display: block; }
.news-card__image {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--muted);
}
.news-card__image img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .3s;
}
.news-card:hover .news-card__image img { transform: scale(1.03); }
.news-card__title {
  margin: 0.75rem 0 1rem; font-size: 0.9rem; font-weight: 800; line-height: 1.35;
  color: var(--foreground);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card:hover .news-card__title { color: var(--primary); }
.news-card__cat {
  position: absolute; top: 0.5rem; left: 0.5rem;
  background: var(--primary); color: var(--primary-foreground);
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  padding: 0.25rem 0.5rem;
}

/* ===== Latest sidebar ===== */
.latest-sidebar { display: block; }
.latest-sidebar__head { display: flex; border-bottom: 1px solid var(--border); }
.latest-sidebar__label {
  position: relative; padding: 0.75rem 1.25rem 0.75rem 0;
  font-size: 0.875rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--foreground);
}
.latest-sidebar__label::after {
  content: ""; position: absolute; left: 0; right: 1.25rem; bottom: -1px;
  height: 3px; background: var(--primary);
}
.latest-sidebar__list { display: flex; flex-direction: column; }
.latest-item {
  display: flex; gap: 1rem; padding: 1rem 0;
  border-bottom: 1px solid var(--border); align-items: flex-start;
}
.latest-item__time { flex-shrink: 0; width: 64px; text-align: center; }
.latest-item__v {
  display: block; font-size: 1.5rem; font-weight: 900;
  line-height: 1; color: var(--primary);
}
.latest-item__u {
  display: block; margin-top: 2px; font-size: 0.7rem;
  font-weight: 700; color: rgba(168, 6, 0, 0.7);
}
.latest-item__title {
  flex: 1; margin: 0; font-size: 0.875rem; font-weight: 700; line-height: 1.35;
  color: var(--foreground);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.latest-item:hover .latest-item__title { color: var(--primary); }
.latest-sidebar__more {
  display: flex; align-items: center; justify-content: center;
  margin-top: 0.5rem; padding: 0.85rem;
  border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted-foreground);
}
.latest-sidebar__more:hover { border-color: var(--primary); color: var(--primary); }

/* Revive ad container */
.revive-ad { display: flex; justify-content: center; margin-bottom: 1rem; min-height: 50px; }
.revive-ad.mt { margin-bottom: 0; margin-top: 1rem; }

/* ===== Category section ===== */
.cat-section { margin-top: 3rem; }
.cat-section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 2px solid var(--foreground); padding-bottom: 0.5rem; margin-bottom: 1.25rem;
}
.cat-section__title-wrap { display: inline-flex; align-items: center; gap: 0.75rem; }
.cat-section__bar { width: 6px; height: 24px; background: var(--primary); }
.cat-section__title {
  margin: 0; font-size: 1.25rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.02em;
}
@media (min-width: 768px) { .cat-section__title { font-size: 1.5rem; } }
.cat-section__title-wrap:hover .cat-section__title { color: var(--primary); }
.cat-section__more {
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted-foreground);
}
.cat-section__more:hover { color: var(--primary); }

/* ===== Single post ===== */
.single-post .post-categories { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.single-post .post-categories a {
  background: var(--accent); color: var(--foreground);
  font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.75rem; border-radius: 999px;
}
.single-post .post-categories a:hover { background: var(--primary); color: var(--primary-foreground); }
.single-post .post-title {
  font-size: 1.5rem; font-weight: 800; line-height: 1.25; margin: 0 0 1rem;
}
@media (min-width: 768px) { .single-post .post-title { font-size: 2rem; } }
.single-post .post-meta {
  display: flex; flex-wrap: wrap; gap: 1rem;
  font-size: 0.875rem; color: var(--muted-foreground); margin-bottom: 1.5rem;
}
.single-post .post-meta strong { color: var(--foreground); font-weight: 700; }
.single-post .post-thumb { margin-bottom: 1.5rem; }
.single-post .post-content { font-size: 1.0625rem; line-height: 1.75; }
.single-post .post-content p { margin: 0 0 1.25rem; }
.single-post .post-content a { color: var(--primary); text-decoration: underline; }
.single-post .post-content img { margin: 1.5rem 0; }
.single-post .post-content h2,
.single-post .post-content h3 { font-weight: 900; margin: 2rem 0 1rem; line-height: 1.3; }
.single-post .post-content h2 { font-size: 1.5rem; }
.single-post .post-content h3 { font-size: 1.25rem; }
.single-post .post-content blockquote {
  position: relative; margin: 2rem 0; padding: 0.5rem 1rem 0.5rem 4.5rem;
  font-size: 1.25rem; line-height: 1.55; font-weight: 500; border: none;
}
.single-post .post-content blockquote::before {
  content: "\201C"; position: absolute; top: -1.25rem; left: 0.25rem;
  font-family: Georgia, serif; font-size: 6rem; line-height: 1; font-weight: 700;
  color: var(--primary);
}

/* Share */
.share { margin-top: 2rem; display: flex; gap: 0.5rem; align-items: center; }
.share__label { font-size: 0.875rem; font-weight: 700; margin-right: 0.5rem; }
.share a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--accent); color: var(--foreground);
}
.share a:hover { background: var(--primary); color: var(--primary-foreground); }

/* Pagination */
.pagination, .nav-links {
  display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0;
}
.pagination a, .pagination span,
.nav-links a, .nav-links span {
  padding: 0.5rem 0.85rem; border: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 700; color: var(--foreground);
}
.pagination a:hover, .nav-links a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current, .nav-links .current {
  background: var(--primary); color: var(--primary-foreground); border-color: var(--primary);
}

/* Footer */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--border); background: var(--background); }
.site-footer__top { display: flex; flex-direction: column; }
@media (min-width: 1024px) { .site-footer__top { flex-direction: row; align-items: stretch; } }
.footer-products {
  flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 1.5rem; padding: 1.5rem 1rem;
}
@media (min-width: 1024px) { .footer-products { justify-content: flex-start; } }
.footer-products a { font-weight: 700; color: var(--muted-foreground); }
.footer-products a:hover { color: var(--primary); }
.footer-socials {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  background: var(--primary); color: var(--primary-foreground); padding: 1.25rem 2rem;
}
.footer-socials .label { font-size: 0.875rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-socials a { display: inline-flex; transition: opacity .15s; }
.footer-socials a:hover { opacity: 0.8; }
.footer-socials svg { width: 22px; height: 22px; }

.footer-pages { border-top: 1px solid var(--border); padding: 1.25rem 0; }
.footer-pages ul {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.5rem 1.25rem; padding: 0 1rem;
}
.footer-pages a { font-size: 0.875rem; color: var(--foreground); }
.footer-pages a:hover { color: var(--primary); }
.site-footer__copyright {
  border-top: 1px solid var(--border); text-align: center;
  padding: 1.25rem 1rem; font-size: 0.75rem; color: var(--muted-foreground);
}

/* 404 */
.error-page { text-align: center; padding: 5rem 1rem; }
.error-page h1 { font-size: 4rem; font-weight: 900; color: var(--primary); margin: 0 0 0.5rem; }
.error-page p { color: var(--muted-foreground); margin-bottom: 1.5rem; }
.error-page a {
  display: inline-block; background: var(--primary); color: var(--primary-foreground);
  font-weight: 800; padding: 0.75rem 1.5rem; text-transform: uppercase; letter-spacing: 0.05em;
}

/* Page (static) */
.page-content { font-size: 1.0625rem; line-height: 1.7; }
.page-content h1 {
  font-size: 1.875rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.025em; margin: 0 0 1.5rem;
}

.archive-header h1 {
  font-size: 1.5rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.025em; margin: 0 0 0.5rem;
}
@media (min-width: 768px) { .archive-header h1 { font-size: 1.875rem; } }
.archive-header p { color: var(--muted-foreground); margin: 0 0 1.5rem; }

/* Layout grid for index/archive */
.main-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem 0; }
@media (min-width: 1024px) { .main-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.section-title {
  font-size: 1.5rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.025em; margin: 0 0 1.25rem;
}
@media (min-width: 768px) { .section-title { font-size: 1.875rem; } }
.section-title--inline { display: inline-block; border-bottom: 3px solid var(--primary); padding-bottom: 0.25rem; }

/* ===== Footer products (logos) ===== */
.footer-products a { display: inline-flex; transition: opacity .2s; }
.footer-products a img {
  height: 40px; width: auto; object-fit: contain;
  filter: grayscale(100%); transition: filter .2s, opacity .2s;
}
.footer-products a:hover img { filter: grayscale(0%); }

/* ===== YouTube section (НОЌНО СТУДИО) ===== */
.yt-section {
  margin: 2.5rem -1rem 0;
  background: #000;
  padding: 2rem 1rem;
}
.yt-section__inner { max-width: 1320px; margin: 0 auto; }
.yt-section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.75rem; margin-bottom: 1.5rem;
}
.yt-section__title-wrap { display: inline-flex; align-items: center; gap: 0.75rem; }
.yt-section__bar { width: 6px; height: 24px; background: var(--primary); }
.yt-section__title {
  margin: 0; color: #fff; font-size: 1.5rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.02em;
}
@media (min-width: 768px) { .yt-section__title { font-size: 1.875rem; } }
.yt-section__more {
  display: none; font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
}
.yt-section__more:hover { color: var(--primary); }
@media (min-width: 768px) { .yt-section__more { display: inline-block; } }
.yt-player {
  position: relative; width: 100%; padding-top: 56.25%;
  background: #000; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.yt-player iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
