/* ═══ study4maths: προσθήκες για το WordPress πάνω στο site.css ═══════════════ */

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }
.nav-dropdown-trigger.active { color: var(--primary); }
.recent-wrap { background: var(--surface); border-top: 1px solid var(--border); }
[data-theme="dark"] .recent-wrap { background: #0f172a; }

/* ── φόντο: το μοτίβο με τα μαθηματικά σχέδια του παλιού site, κάτω από γαλάζιο στρώμα ── */
.hero {
  background-color: #123f55;
  background-image: linear-gradient(160deg, rgba(31,106,138,.79) 0%, rgba(18,52,72,.84) 55%, rgba(15,23,42,.89) 100%), url('../images/math-pattern.jpg');
  background-size: auto, 520px auto;
  background-repeat: no-repeat, repeat;
  background-position: center, center top;
}
.hero-pattern { display: none; }

/* ── μπλε επικεφαλίδα λιστών (τάξη, θέμα, tag, αναζήτηση) ─────────────────── */
.list-hero {
  background-color: #1f6a8a;
  background-image: linear-gradient(135deg, rgba(31,106,138,.87), rgba(47,139,176,.84)), url('../images/math-pattern.jpg');
  background-size: auto, 520px auto;
  background-repeat: no-repeat, repeat;
  padding: 6rem 1.5rem 2.75rem; color: #fff;
}
.list-hero .breadcrumb { margin-bottom: 1rem; }
.list-hero .breadcrumb a, .list-hero .breadcrumb-item, .list-hero .breadcrumb-sep { color: rgba(255,255,255,.8); }
.list-hero .breadcrumb-item.current { color: #fff; }
.list-hero-title { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .5rem; color: #fff; }
.list-hero-sub { color: rgba(255,255,255,.78); font-size: 1rem; }
.list-intro { color: var(--text-secondary); margin: 0 0 1.75rem; max-width: 720px; }
.list-search {
  display: flex; align-items: center; gap: .6rem; max-width: 520px; margin-top: 1.25rem;
  padding: .7rem 1rem; border-radius: 12px; background: #fff; color: #64748b;
}
.list-search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: #0f172a; min-width: 0; }
.list-search--light { margin: 0 auto; border: 1.5px solid var(--border); }
[data-theme="dark"] .list-search { background: #1e293b; color: #94a3b8; }
[data-theme="dark"] .list-search input { color: #e2e8f0; }
a.ch-chip { text-decoration: none; }
a.ch-chip:hover { color: #fff; }
a.ch-chip.active, a.ch-chip.active:hover { color: var(--primary-dark, #1f6a8a); }

/* ── σελίδα άσκησης ──────────────────────────────────────────────────────── */
.article-crumbs { background: var(--surface); border-bottom: 1px solid var(--border); padding: .875rem 1.5rem; }
.badge-topic { background: #f1f5f9; color: #475569; }
a.badge { text-decoration: none; }
[data-theme="dark"] .badge-topic { background: #1e293b; color: #cbd5e1; }
.solution-reveal { transition: opacity .35s ease; }
.solution-reveal.hidden-sol { opacity: 0; pointer-events: none; max-height: 0; overflow: hidden; }
.solution-reveal.shown-sol { opacity: 1; max-height: none; }
.btn-reveal {
  display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.5rem; border-radius: 10px;
  background: var(--warm); color: #fff; font-weight: 700; font-size: .9375rem; cursor: pointer; border: none; font-family: inherit;
  transition: background .15s, transform .1s; margin-bottom: 1.25rem; box-shadow: 0 3px 10px rgba(217,119,6,.3);
}
.btn-reveal:hover { background: var(--warm-dark); transform: translateY(-1px); }
.solution-block { border-left: 4px solid var(--primary-light); }
.progress-bar { height: 3px; background: var(--border); position: relative; border-radius: 999px; overflow: hidden; }
.progress-bar-fill { position: absolute; left: 0; top: 0; height: 100%; width: 33%; background: linear-gradient(90deg, var(--primary-light), var(--primary)); border-radius: 999px; transition: width .4s; }
.btn-share {
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .875rem; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-secondary); font-size: .8125rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.btn-share:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-share.copied { background: #dcfce7; color: #166534; border-color: #86efac; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.article-nav-btn {
  display: flex; align-items: center; gap: .625rem; padding: .875rem 1.125rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.article-nav-btn:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,140,175,.12); }
.article-nav-btn--next { flex-direction: row-reverse; text-align: right; }
.article-nav-btn--empty { visibility: hidden; pointer-events: none; }
.article-nav-meta { font-size: .6875rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .15rem; }
.article-nav-title { font-size: .875rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-nav-icon { flex-shrink: 0; color: var(--primary); display: flex; }
@media (max-width: 540px) {
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-btn--next { flex-direction: row; text-align: left; }
}
.info-bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem;
}
.info-bar-label { font-size: .75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .25rem; }
.info-bar-value { font-weight: 700; color: var(--primary); text-decoration: none; }
.info-bar-sep { width: 1px; height: 32px; background: var(--border); }
.info-bar-btn { margin-left: auto; padding: .5rem 1.125rem; background: var(--primary); color: #fff; border-radius: 8px; font-size: .875rem; font-weight: 600; text-decoration: none; }
.info-bar-btn:hover { color: #fff; background: var(--primary-dark); }

/* ── κοινοποίηση ─────────────────────────────────────────────────────────── */
.share-wrap { position: relative; margin-left: auto; }
.share-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 300px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15,23,42,.18); padding: 1rem;
}
.share-menu[hidden] { display: none; }
.share-menu-title { font-size: .8125rem; font-weight: 700; color: var(--text-secondary); margin-bottom: .75rem; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem .25rem; margin-bottom: .875rem; }
.share-item {
  display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .4rem .2rem; border-radius: 10px;
  color: var(--c); text-decoration: none; background: none; border: 0; cursor: pointer; font: inherit;
}
.share-item[hidden] { display: none; }
.share-item span { font-size: .6875rem; font-weight: 600; color: var(--text-secondary); }
.share-item:hover { background: var(--bg); }
.share-copy { display: flex; gap: .4rem; }
.share-copy input {
  flex: 1; min-width: 0; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text-secondary); font: inherit; font-size: .8125rem;
}
.share-copy button {
  padding: .5rem .8rem; border: 0; border-radius: 8px; background: var(--primary); color: #fff;
  font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.share-copy button.copied { background: #16a34a; }
[data-theme="dark"] .share-item--x { --c: #e2e8f0; }
@media (max-width: 480px) {
  .share-menu { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; }
}

/* ── «Ακολούθησε το study4maths» ────────────────────────────────────────── */
.follow-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.5rem; padding: 1.1rem 1.25rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
}
.follow-title { font-weight: 800; color: var(--text); font-size: .9375rem; }
.follow-sub { font-size: .8125rem; color: var(--text-secondary); margin-top: .1rem; }
.follow-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.follow-link {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px;
  color: #fff; font-size: .8125rem; font-weight: 700; text-decoration: none; transition: transform .12s, opacity .12s;
}
.follow-link:hover { color: #fff; transform: translateY(-1px); opacity: .92; }
.follow-link--facebook { background: #1877f2; }
.follow-link--instagram { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af); }
.follow-link--youtube { background: #ff0000; }
.follow-link--youtube polygon { fill: #ff0000; }
.follow-link--x { background: #0f1419; }
[data-theme="dark"] .follow-link--x { background: #334155; }
.follow-bar--compact { margin: .75rem 0 .25rem; padding: .75rem 1rem; border: 0; background: var(--bg); }
.follow-bar--compact .follow-title { font-size: .8125rem; }
.follow-bar--compact .follow-link { padding: .5rem; }

/* ── περιεχόμενο WordPress (QuickLaTeX, εικόνες, πίνακες) ─────────────────── */
.wp-content img { max-width: 100%; height: auto; }
.wp-content iframe { display: block; max-width: 100%; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; margin: .5rem 0 1rem; }
.wp-content figure { max-width: 100% !important; margin: .75rem 0; }
.wp-content figcaption { font-size: .8125rem; color: var(--text-muted); text-align: center; }
.card-statement iframe { max-width: 100%; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.wp-content .ql-img-inline-formula { display: inline; vertical-align: middle; }
.wp-content .ql-center-displayed-equation, .wp-content .ql-center-picture { text-align: center; overflow-x: auto; overflow-y: hidden; margin: .75rem 0; }
.wp-content .ql-right-eqno, .wp-content .ql-left-eqno { display: none; }
.wp-content table { width: 100%; border-collapse: collapse; overflow-x: auto; display: block; }
.wp-content td, .wp-content th { border: 1px solid var(--border); padding: .4rem .6rem; }
.wp-content ul, .wp-content ol { padding-left: 1.4rem; margin: .5rem 0; }
.wp-content li { margin: .25rem 0; }
.wp-content p { margin: 0 0 .85rem; }
.wp-content .alignleft { float: left; margin: 0 1rem .5rem 0; }
.wp-content .alignright { float: right; margin: 0 0 .5rem 1rem; }
.wp-content .aligncenter { display: block; margin: .75rem auto; }
.card-statement img { max-width: 100%; height: auto; }
.card-statement .ql-right-eqno, .card-statement .ql-left-eqno { display: none; }
.card-statement .ql-center-displayed-equation, .card-statement .ql-center-picture { text-align: center; margin: .35rem 0; overflow: hidden; }
.card-statement p { margin: 0 0 .5rem; }
.page-content h2, .page-content h3 { margin: 1.5rem 0 .75rem; }

/* Οι τύποι του QuickLaTeX είναι μαύρες εικόνες: στο σκούρο θέμα τις αντιστρέφουμε για να φαίνονται */
[data-theme="dark"] .wp-content img[class*="ql-img"],
[data-theme="dark"] .card-statement img[class*="ql-img"] { filter: invert(1) hue-rotate(180deg); }

/* ── σχόλια WordPress ────────────────────────────────────────────────────── */
.wp-comments { list-style: none; padding: 0; margin: 0 0 2rem; }
.wp-comments .children { list-style: none; padding-left: 2.5rem; margin-top: 1rem; }
.wp-comments .comment-item { margin-bottom: 1rem; }
.comment-text p { margin: 0 0 .5rem; }
.comment-pending { font-size: .8125rem; color: var(--warm-dark); font-weight: 600; margin: .25rem 0; }
.comment-reply a { font-size: .8125rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.comment-form-wrap .comment-form { display: block; }
.comment-form-wrap .form-submit { margin-top: 1rem; }
.comment-form-wrap .form-group { margin-bottom: .875rem; }
.comment-form-wrap .btn-comment-submit { cursor: pointer; }
#cancel-comment-reply-link { font-size: .8125rem; margin-left: .75rem; color: var(--text-muted); }
.comments-section .comments-pagination { margin-bottom: 1.5rem; }

/* ── σελιδοποίηση ────────────────────────────────────────────────────────── */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.pagination .pg-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.pagination .dots { border: 0; background: none; }
