/*
Theme Name: Thessaloniki Future
Description: Θέμα για την πύλη ψηφιακών υπηρεσιών του Δήμου Θεσσαλονίκης. Καθαρή δομή, γρήγορη εύρεση υπηρεσιών, προσβασιμότητα.
Version: 1.0.2
Requires PHP: 8.0
Text Domain: thess-future
*/

:root {
  --c-bg: #f5f7fa;
  --c-surface: #ffffff;
  --c-surface-2: #eef2f7;
  --c-text: #17212e;
  --c-muted: #556274;
  --c-border: #dce3eb;
  --c-border-strong: #b9c4d1;
  --c-primary: #196f8f;
  --c-primary-strong: #0f5470;
  --c-primary-soft: #e5f0f4;
  --c-on-primary: #ffffff;
  --c-accent: #0e3fa0;
  --c-focus: #f2b705;
  --c-danger: #b42318;
  --c-danger-soft: #fdecea;
  --c-hero-1: #052c54;
  --c-hero-2: #196f8f;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .06);
  --shadow-md: 0 10px 28px rgb(16 24 40 / .12);
  --container: 1200px;
  --font: "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; }
img, svg, video, iframe { max-width: 100%; height: auto; }
a { color: var(--c-primary); text-underline-offset: .18em; }
a:hover { color: var(--c-primary-strong); }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-top: 0; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }
table { border-collapse: collapse; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: .5rem; left: .5rem; z-index: 1000; width: auto; height: auto; clip: auto; padding: .75rem 1rem; background: var(--c-surface); border-radius: var(--radius); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .container { padding: 0 24px; } }

/* ---------- Header ---------- */
.topbar { background: var(--c-hero-1); color: #d6e4f3; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 2.25rem; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .35em; }
.topbar a:hover { text-decoration: underline; }
.topbar__links { display: flex; gap: 1.25rem; }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.site-header .container { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--c-text); text-decoration: none; margin-right: auto; min-width: 0; }
.brand__logo { display: block; height: 3rem; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; padding-left: .85rem; border-left: 1px solid var(--c-border); }
.brand__name { font-weight: 700; font-size: .98rem; color: var(--c-primary-strong); }
.brand__sub { font-size: .78rem; color: var(--c-muted); }
@media (max-width: 520px) { .brand__logo { height: 2.4rem; } .brand__text { display: none; } }
.footer-logo { display: block; width: 180px; height: auto; margin-bottom: 1rem; }
.header-search { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius); color: var(--c-text); }
.header-search:hover { background: var(--c-surface-2); color: var(--c-primary); }

/* Κύριο μενού */
.nav-toggle { display: none; align-items: center; gap: .4rem; padding: .55rem .8rem; border: 1.5px solid var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface); color: var(--c-text); font: inherit; font-weight: 600; cursor: pointer; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav > ul { display: flex; gap: .15rem; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: .6rem .8rem; border-radius: 8px; color: var(--c-text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.primary-nav > ul > li > a { white-space: nowrap; }
.brand { flex-shrink: 0; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { color: var(--c-primary); background: var(--c-primary-soft); }
.primary-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: .4em; height: .4em; margin-left: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.2em) rotate(45deg); }
.primary-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 270px; padding: .5rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(6px); transition: .15s; }
.primary-nav .sub-menu a { font-weight: 500; }
.primary-nav .sub-menu .sub-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 .75rem; opacity: 1; visibility: inherit; pointer-events: inherit; transform: none; min-width: 0; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.primary-nav > ul > li:last-child > .sub-menu { left: auto; right: 0; }

/* Το πλήρες μενού χρειάζεται όλο το πλάτος του container (1200px): κάτω από 1200px γίνεται κουμπί «Μενού»
   (ισχύει και με zoom του browser), και με το πλήρες μενού φαίνεται μόνο το λογότυπο. */
@media (min-width: 1200px) {
  .brand__text { display: none; }
  .primary-nav > ul > li > a { padding: .6rem .6rem; }
}
@media (max-width: 1199px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - 6.5rem); overflow: auto; background: var(--c-surface); border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow-md); padding: .5rem 16px 1rem; }
  .primary-nav.is-open { display: block; }
  .primary-nav > ul { flex-direction: column; }
  .primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; pointer-events: auto; transform: none; box-shadow: none; border: 0; padding: 0 0 .25rem .9rem; min-width: 0; }
  .primary-nav .menu-item-has-children > a::after { display: none; }
  .brand__sub { display: none; }
}

/* ---------- Hero / αρχική ---------- */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgb(25 111 143 / .55), transparent 60%), linear-gradient(160deg, var(--c-hero-1), var(--c-hero-2)); color: #fff; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(5rem, 9vw, 6.5rem); }
.hero h1 { color: #fff; max-width: 20ch; margin-bottom: .4em; font-size: clamp(1.9rem, 4.5vw, 3rem); }
.hero p { color: #d6e4f3; font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 60ch; margin: 0; }
.home-finder { margin-top: clamp(-4.5rem, -6vw, -3.5rem); }
.home-finder .fx-finder__form { background: var(--c-surface); padding: .6rem; border-radius: 16px; box-shadow: var(--shadow-md); }
.home-finder .fx-finder__form input { border-color: transparent; }
.home-section { margin: 3rem 0; }
.home-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.home-section__head h2 { margin: 0; }

/* ---------- Σελίδες ---------- */
.site-main { padding: 2rem 0 4rem; min-height: 50vh; }
.breadcrumbs { font-size: .88rem; color: var(--c-muted); margin: 0 0 1rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: .35rem; color: var(--c-border-strong); }
.breadcrumbs a { color: var(--c-muted); }
.page-layout { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .page-layout--nav { grid-template-columns: 260px minmax(0, 1fr); } }
.entry { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 16px; padding: clamp(1.25rem, 4vw, 2.5rem); min-width: 0; }
.entry--wide { background: none; border: 0; padding: 0; }
.entry__lead { font-size: 1.15rem; color: var(--c-muted); margin-top: -.2rem; }
.entry-content > :first-child { margin-top: 0; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote { margin: 1.5rem 0; padding: .5rem 1.25rem; border-left: 4px solid var(--c-accent); background: var(--c-surface-2); border-radius: 0 var(--radius) var(--radius) 0; }
.entry-content table:not(.fx-table) { width: 100%; margin: 1rem 0; }
.entry-content table:not(.fx-table) td, .entry-content table:not(.fx-table) th { border: 1px solid var(--c-border); padding: .5rem .75rem; }
.wp-block-embed, .entry-content iframe { border-radius: var(--radius); }

.section-nav { align-self: start; position: sticky; top: 5.5rem; }
.section-nav__title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); margin: 0 0 .5rem; font-weight: 700; }
.section-nav ul { list-style: none; margin: 0; padding: 0; }
.section-nav ul ul { padding-left: .9rem; }
.section-nav a { display: block; padding: .45rem .75rem; border-radius: 8px; color: var(--c-text); text-decoration: none; font-size: .95rem; }
.section-nav a:hover { background: var(--c-surface-2); }
.section-nav .current_page_item > a { background: var(--c-primary-soft); color: var(--c-primary-strong); font-weight: 700; }
@media (max-width: 1023px) {
  .section-nav { position: static; }
  .section-nav details:not([open]) ul { display: none; }
}
.section-nav summary { cursor: pointer; padding: .7rem .9rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); font-weight: 700; }
@media (min-width: 1024px) { .section-nav summary { display: none; } }

.child-cards { margin-top: 2rem; }

/* ---------- Λίστες / αναζήτηση ---------- */
.post-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.post-card { display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; overflow: hidden; }
.post-card__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.post-card__body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .4rem; }
.post-card__date { font-size: .82rem; color: var(--c-muted); }
.post-card__title { font-size: 1.1rem; margin: 0; }
.post-card__title a { color: var(--c-text); text-decoration: none; }
.post-card__title a:hover { color: var(--c-primary); }
.post-card__excerpt { color: var(--c-muted); font-size: .95rem; margin: 0; }
.search-result { padding: 1rem 0; border-bottom: 1px solid var(--c-border); }
.search-result h3 { margin: 0 0 .25rem; }
.search-result p { margin: 0; color: var(--c-muted); }
.search-result__path { font-size: .82rem; color: var(--c-accent); }
.nav-links { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; }
.nav-links .page-numbers { padding: .5rem .85rem; border: 1px solid var(--c-border); border-radius: 8px; text-decoration: none; }
/* ---------- Οδηγός / Wizard Stepper με Tabs & Next-Previous ---------- */
.wizard-container { margin: 1.5rem 0 3rem; }
.wizard-nav-wrap { position: relative; margin-bottom: 1rem; }
.wizard-nav { display: flex; gap: .5rem; overflow-x: auto; padding: .4rem .2rem .9rem; scrollbar-width: thin; scrollbar-color: var(--c-primary) var(--c-surface-2); -webkit-overflow-scrolling: touch; }
.wizard-nav::-webkit-scrollbar { height: 6px; }
.wizard-nav::-webkit-scrollbar-track { background: var(--c-surface-2); border-radius: 999px; }
.wizard-nav::-webkit-scrollbar-thumb { background: var(--c-border-strong); border-radius: 999px; }
.wizard-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem .95rem; background: var(--c-surface); border: 1.5px solid var(--c-border); border-radius: 999px; font-family: inherit; font-size: .88rem; font-weight: 600; color: var(--c-muted); white-space: nowrap; cursor: pointer; transition: all .15s ease; flex-shrink: 0; line-height: 1.2; text-decoration: none; }
.wizard-tab:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
.wizard-tab.is-active, .wizard-tab[aria-selected="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; box-shadow: 0 2px 8px rgba(25, 111, 143, .3); }
.wizard-tab__num { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--c-surface-2); color: var(--c-text); font-size: .78rem; font-weight: 700; line-height: 1; flex-shrink: 0; }
.wizard-tab.is-active .wizard-tab__num, .wizard-tab[aria-selected="true"] .wizard-tab__num { background: #fff; color: var(--c-primary); }
.wizard-tab.is-done { border-color: var(--c-primary); color: var(--c-primary-strong); }
.wizard-tab.is-done .wizard-tab__num { background: var(--c-primary-soft); color: var(--c-primary); }

.wizard-progress { height: 6px; background: var(--c-surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 1.5rem; }
.wizard-progress__bar { height: 100%; width: 8.33%; background: linear-gradient(90deg, var(--c-primary), #0f8a7e); transition: width .3s ease; border-radius: 999px; }

.wizard-panel { display: none; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 1.75rem 2rem; }
.wizard-panel.is-active { display: block; animation: wizardFadeIn .2s ease; }
@keyframes wizardFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.wizard-panel__head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--c-border); padding-bottom: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; gap: .5rem; }
.wizard-panel__badge { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; color: var(--c-primary); background: var(--c-primary-soft); padding: .35rem .8rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.wizard-panel__counter { font-size: .9rem; font-weight: 600; color: var(--c-muted); }
.wizard-panel__title { font-size: 1.35rem; font-weight: 700; color: var(--c-primary-strong); margin: 0 0 1rem; line-height: 1.3; }
.wizard-panel__body { font-size: 1.02rem; line-height: 1.6; color: var(--c-text); }
.wizard-panel__body p { margin: 0 0 .85rem; }
.wizard-panel__body p:last-child { margin-bottom: 0; }
.wizard-panel__body ol, .wizard-panel__body ul { margin: 0 0 .85rem; padding-left: 1.4rem; }

.guide-step__media { margin-top: 1.1rem; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 10px; padding: 10px; text-align: center; }
.guide-step__media img { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 2px 8px rgb(16 24 40 / .08); display: block; margin: 0 auto; }
.guide-step__caption { font-size: .85rem; color: var(--c-muted); margin-top: .5rem; font-style: italic; }
.guide-quick-links { background: var(--c-primary-soft); border-left: 4px solid var(--c-primary); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1rem 0 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.guide-warning { background: #fff8eb; border-left: 4px solid var(--c-focus); padding: .9rem 1.1rem; border-radius: 0 8px 8px 0; margin: 1rem 0; color: #7a4f01; font-size: .95rem; }

.wizard-controls { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--c-border); padding-top: 1.5rem; margin-top: 2rem; gap: 1rem; flex-wrap: wrap; }
.wizard-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem 1.35rem; font-family: inherit; font-size: .95rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all .15s ease; text-decoration: none; border: 1.5px solid transparent; }
.wizard-btn--prev { background: var(--c-surface-2); border-color: var(--c-border); color: var(--c-text); }
.wizard-btn--prev:hover:not(:disabled) { background: var(--c-border); color: var(--c-primary-strong); }
.wizard-btn--prev:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.wizard-btn--next { background: var(--c-primary); border-color: var(--c-primary); color: #fff; box-shadow: 0 2px 6px rgba(25, 111, 143, .25); }
.wizard-btn--next:hover { background: var(--c-primary-strong); border-color: var(--c-primary-strong); box-shadow: 0 4px 10px rgba(25, 111, 143, .35); }
.wizard-btn--finish { background: #0f8a7e; border-color: #0f8a7e; color: #fff; box-shadow: 0 2px 6px rgba(15, 138, 126, .25); }
.wizard-btn--finish:hover { background: #09635a; border-color: #09635a; }

@media (max-width: 640px) {
  .wizard-panel { padding: 1.25rem 1.25rem; }
  .wizard-controls { flex-direction: column-reverse; align-items: stretch; }
  .wizard-btn { justify-content: center; width: 100%; }
}

/* ---------- Feedback banner (πάνω από το footer) ---------- */
.site-feedback { background: var(--c-surface-2); border-top: 1px solid var(--c-border); padding: 1.75rem 0; color: var(--c-text); }
.site-feedback__content { max-width: 820px; }
.site-feedback__title { font-size: 1.25rem; font-weight: 700; margin: 0 0 .4rem; color: var(--c-primary-strong); line-height: 1.3; }
.site-feedback__text { font-size: 1rem; line-height: 1.55; margin: 0 0 .35rem; color: var(--c-text); }
.site-feedback__link { display: inline-block; font-weight: 600; color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; margin-left: .25rem; white-space: nowrap; }
.site-feedback__link:hover { color: var(--c-primary-strong); }
.site-feedback__hint { font-size: .85rem; color: var(--c-muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #0d1b2a; color: #b8c6d6; padding: 3rem 0 1.5rem; font-size: .93rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35rem 0; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .12); margin-top: 2.5rem; padding-top: 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

.fx-past { margin-top: 1.5rem; }
.fx-past summary { cursor: pointer; font-weight: 600; margin-bottom: .75rem; }
.fx-results-title { font-size: 1.2rem; margin: 0 0 .5rem; }
.fx-budget-totals { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1rem; }
