/*
Theme Name: Imathia24
Theme URI: https://imathia24.gr
Author: Imathia24.gr
Description: Ειδησεογραφικό theme για το Imathia24.gr – ειδήσεις από τη Βέροια, τη Νάουσα, την Αλεξάνδρεια και όλη την Ημαθία.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: imathia24
*/

/* ---------- Tokens ---------- */
:root {
	--navy: #0F1E30;
	--red: #C3151B;
	--red-dark: #9E1015;
	--ink: #0F1E30;
	--ink-soft: #3D4249;
	--muted: #5A5F66;
	--line: #DCD9D3;
	--line-soft: #E6E3DD;
	--paper: #FFFFFF;
	--placeholder: #EEEBE5;
	--tint: #FCEDED;
	--on-navy: #C9CFDA;
	--serif: 'Literata', Georgia, 'Times New Roman', serif;
	--sans: 'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	--wrap: 1240px;
	--gutter: 24px;
	--radius: 8px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover, a:focus-visible { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0; }
.container { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.screen-reader-text:focus {
	clip: auto; width: auto; height: auto; z-index: 1000; top: 8px; left: 8px;
	background: var(--paper); padding: 12px 16px; color: var(--ink);
}

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #E8E6E1; font-size: 13px; }
.topbar .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #E8E6E1; }
.topbar a:hover { color: #FFFFFF; text-decoration: underline; }
.topbar-date { font-weight: 600; }
.topbar-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.social-link { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; }
.social-link svg { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header .container {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 16px 24px; padding-top: 22px; padding-bottom: 18px;
}
.site-header-inner { border-bottom: 3px solid var(--navy); }
.site-logo img, .site-logo .custom-logo { height: 84px; width: auto; }
.header-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.header-tagline { font-size: 14px; color: var(--muted); margin: 0; }
.search-form { display: flex; }
.search-form .search-field {
	font: inherit; font-size: 15px; padding: 10px 14px; min-height: 44px; width: 240px;
	border: 1.5px solid var(--navy); border-right: 0; border-radius: 6px 0 0 6px; background: #fff; color: var(--ink);
}
.search-form .search-submit {
	display: inline-flex; align-items: center; justify-content: center; width: 48px; min-height: 44px;
	background: var(--navy); color: #fff; border: 0; border-radius: 0 6px 6px 0; cursor: pointer;
}
.search-form .search-submit:hover { background: var(--red); }

/* ---------- Navigation ---------- */
.main-nav { border-bottom: 1px solid var(--line); }
.main-nav .container { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
	display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
	font: inherit; font-weight: 600; background: none; border: 1.5px solid var(--navy); border-radius: 6px; color: var(--ink); cursor: pointer;
}
.main-nav ul { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.main-nav li { position: relative; }
.main-nav a { display: inline-block; padding: 6px 0; font-weight: 600; font-size: 15px; }
.main-nav .current-menu-item > a, .main-nav .current-cat > a, .main-nav .current-post-ancestor > a { color: var(--red); box-shadow: inset 0 -2px 0 var(--red); }
.main-nav .sub-menu { display: none; }

/* ---------- Breaking ---------- */
.breaking { padding-top: 16px; }
.breaking-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--tint); border-radius: var(--radius); padding: 10px 14px; }
.breaking-label { background: var(--red); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: 1px; padding: 5px 10px; border-radius: 4px; }
.breaking a { font-weight: 600; }

/* ---------- Shared pieces ---------- */
.kicker { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--red); }
.meta { font-size: 13px; color: var(--muted); }
.thumb { position: relative; display: block; background: var(--placeholder); border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
a:hover .thumb img { transform: scale(1.03); }
.thumb--wide { aspect-ratio: 16 / 9; border-radius: 10px; }
.thumb--town { aspect-ratio: 16 / 10; }
.thumb--small { aspect-ratio: 4 / 3; width: 120px; flex: 0 0 120px; border-radius: 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 3px solid var(--navy); padding-bottom: 10px; margin-bottom: 24px; }
.section-head h2 { font-weight: 800; font-size: 28px; }
.section-head .more { font-size: 14px; font-weight: 600; color: var(--muted); font-family: var(--sans); }
.section-head .more:hover { color: var(--red); }
.section { margin-top: 56px; }
.ad-slot { margin-top: 28px; }
.ad-slot .widget { margin: 0; }
.ad-placeholder { background: #F2F0EB; border-radius: var(--radius); min-height: 250px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); letter-spacing: 1px; text-align: center; padding: 16px; }
.btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 22px;
	border-radius: 6px; font-weight: 700; font-size: 15px; background: var(--red); color: #fff; border: 0; cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--red-dark); color: #fff; }
.btn--outline { background: none; color: var(--ink); border: 1.5px solid var(--navy); width: 100%; }
.btn--outline:hover { background: var(--navy); color: #fff; }

/* ---------- Home: top area ---------- */
.home-top { display: flex; flex-wrap: wrap; gap: 36px; padding-top: 28px; }
.home-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.home-aside { flex: 1 1 320px; min-width: 0; }
.hero { display: flex; flex-direction: column; gap: 14px; }
.hero h1, .hero h2.hero-title { font-weight: 800; font-size: 40px; line-height: 1.12; letter-spacing: -.5px; }
.hero p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-soft); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.home-main .card-grid { border-top: 1px solid var(--line); padding-top: 24px; }
.card { display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-weight: 700; font-size: 20px; line-height: 1.25; }

/* ---------- Feed ---------- */
.feed-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid var(--navy); padding-bottom: 10px; }
.feed-head h2 { font-weight: 800; font-size: 24px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #1F6B45; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #1F8A55; }
.feed { list-style: none; margin: 0 0 16px; padding: 0; }
.feed li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.feed-time { font-weight: 700; font-size: 14px; color: var(--red); min-width: 44px; }
.feed a { display: flex; flex-direction: column; gap: 4px; }
.feed-cat { font-size: 12px; font-weight: 600; color: var(--muted); }
.feed-title { font-size: 15px; font-weight: 600; line-height: 1.4; }

/* ---------- Towns ---------- */
.towns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.town { display: flex; flex-direction: column; gap: 14px; }
.town-head { display: flex; align-items: center; justify-content: space-between; }
.town-head h3 { font-family: var(--sans); font-size: 18px; font-weight: 700; }
.town-head a.more { font-size: 13px; font-weight: 600; color: var(--muted); }
.town-lead { display: flex; flex-direction: column; gap: 10px; }
.town-lead span { font-family: var(--serif); font-weight: 700; font-size: 19px; line-height: 1.3; }
.town-list { list-style: none; margin: 0; padding: 0; }
.town-list a { display: block; font-size: 15px; font-weight: 500; line-height: 1.45; padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--line-soft); }

/* ---------- Band (Αγροτικά) + Sports ---------- */
.split { display: flex; flex-wrap: wrap; gap: 36px; }
.band { flex: 1 1 520px; min-width: 0; background: var(--navy); color: #F3F1EC; border-radius: 12px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.band .kicker { color: #F58A8E; letter-spacing: 1.5px; font-size: 13px; }
.band h2 { font-weight: 800; font-size: 30px; }
.band h2 a { color: #fff; }
.band p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--on-navy); }
.band ul { list-style: none; margin: 0; padding: 0; }
.band li a { display: block; color: #F3F1EC; font-size: 16px; font-weight: 600; line-height: 1.4; padding: 14px 0; border-top: 1px solid #2F3E5E; }
.band li a:hover { color: #fff; text-decoration: underline; }
.sports { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.sports .section-head { margin-bottom: 0; }
.media-row { display: flex; gap: 16px; align-items: flex-start; }
.media-row span.text { display: flex; flex-direction: column; gap: 6px; }
.media-row .title { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.3; }

/* ---------- CTA ---------- */
.cta { margin-top: 56px; border: 2px solid var(--navy); border-radius: 12px; padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta div { flex: 1 1 400px; }
.cta h2 { font-weight: 800; font-size: 24px; margin-bottom: 6px; }
.cta p { margin: 0; color: var(--ink-soft); }

/* ---------- Single article ---------- */
.article-wrap { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 32px; }
.article { flex: 999 1 640px; min-width: 0; max-width: 820px; }
.article-aside { flex: 1 1 300px; min-width: 0; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--red); }
.article-header { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.article-header h1 { font-weight: 800; font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -.5px; }
.article-excerpt { font-size: 20px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.article-meta strong { color: var(--ink); }
.share { display: flex; gap: 8px; }
.share a, .share button {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
	border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--red); color: var(--red); }
.share svg { width: 18px; height: 18px; }
.article-figure { margin: 0 0 28px; }
.article-figure img { width: 100%; border-radius: 10px; }
.article-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.entry-content { font-size: 19px; line-height: 1.7; }
.entry-content > * { margin: 0 0 1.1em; }
.entry-content h2 { font-size: 28px; margin-top: 1.6em; }
.entry-content h3 { font-size: 23px; margin-top: 1.4em; }
.entry-content a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.entry-content blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--red); font-family: var(--serif); font-size: 22px; color: var(--ink); }
.entry-content img { border-radius: 8px; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption { font-size: 14px; color: var(--muted); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.entry-content iframe, .entry-content video { max-width: 100%; }
.source-box { margin: 28px 0; padding: 14px 18px; background: #F6F5F2; border-radius: var(--radius); font-size: 15px; color: var(--ink-soft); }
.source-box a { color: var(--red); text-decoration: underline; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tags a { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: #F2F0EB; }
.tags a:hover { background: var(--navy); color: #fff; }
.author-box { display: flex; gap: 16px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.author-box img { border-radius: 50%; width: 56px; height: 56px; }
.author-box p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.related { margin-top: 40px; }

/* ---------- Archive / search ---------- */
.archive-head { padding: 32px 0 8px; }
.archive-head h1 { font-weight: 800; font-size: 36px; }
.archive-head .archive-description { color: var(--ink-soft); margin-top: 8px; }
.archive-list { display: flex; flex-direction: column; }
.archive-item { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.archive-item .thumb { width: 260px; flex: 0 0 260px; }
.archive-item .text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.archive-item h2 { font-size: 22px; font-weight: 700; line-height: 1.25; }
.archive-item p { margin: 0; color: var(--ink-soft); }
.pagination { margin: 32px 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 6px; font-weight: 600; }
.pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.empty { padding: 40px 0; }

/* ---------- Pages ---------- */
.page-wrap { max-width: 820px; padding-top: 32px; padding-bottom: 32px; }
.page-wrap h1 { font-weight: 800; font-size: 38px; margin-bottom: 20px; }

/* ---------- Comments ---------- */
.comments { margin-top: 40px; }
.comments h2 { font-size: 24px; margin-bottom: 16px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
	width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 6px; min-height: 44px;
}
.comment-form .submit { font: inherit; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 64px; background: var(--navy); color: var(--on-navy); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 28px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.6; }
.footer-col h2 { font-family: var(--sans); font-size: 14px; font-weight: 700; color: #fff; }
.footer-col a { color: var(--on-navy); }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-logo img { height: 52px; width: auto; }
.footer-bottom { border-top: 1px solid #263552; }
.footer-bottom .container { padding-top: 18px; padding-bottom: 28px; font-size: 13px; color: #9AA3B5; }

/* ---------- Widgets ---------- */
.widget { margin-bottom: 28px; }
.widget-title { font-size: 20px; font-weight: 800; border-bottom: 3px solid var(--navy); padding-bottom: 8px; margin-bottom: 12px; }

/* ---------- WordPress core ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 14px; color: var(--muted); }
.sticky, .bypostauthor, .gallery-caption { }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.site-logo img, .site-logo .custom-logo { height: 60px; }
	.header-side { align-items: stretch; width: 100%; }
	.header-tagline { display: none; }
	.search-form .search-field { width: 100%; flex: 1; }
	.nav-toggle { display: inline-flex; margin: 10px 0; }
	.main-nav .container { flex-direction: column; align-items: flex-start; }
	.main-nav ul { display: none; flex-direction: column; gap: 0; width: 100%; padding: 0 0 10px; }
	.main-nav.is-open ul { display: flex; }
	.main-nav a { padding: 10px 0; display: block; }
	.hero h1, .hero h2.hero-title { font-size: 30px; }
	.archive-item .thumb { width: 120px; flex-basis: 120px; aspect-ratio: 4 / 3; }
	.archive-item h2 { font-size: 18px; }
	.archive-item p { display: none; }
	.band { padding: 24px; }
	.cta { padding: 22px; }
	.entry-content { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* Top bar menu */
.topbar-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* Header rule aligned with the content edges */
.site-header .site-header-inner {
	border-bottom: 0;
	background: linear-gradient(var(--navy), var(--navy)) center bottom / calc(100% - 2 * var(--gutter)) 3px no-repeat;
}

/* Story without a photo: show the i24 mark instead of an empty box */
.thumb--empty { background: #F3F1EC url("assets/img/placeholder-mark.svg") center / auto 34% no-repeat; }
.thumb--small.thumb--empty { background-size: auto 44%; }

/* Footer bottom: copyright + legal links */
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; }
.footer-legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-legal a { color: #C9CFDA; }
.footer-legal a:hover { color: #fff; text-decoration: underline; }
