/*
Theme Name: Babits Gimnázium
Theme URI: https://babits.hu
Description: Egyedi child theme az Education Hub sablon alapján, az Újpesti Babits Mihály Gimnázium megújult főoldalával (bento hírrács, diagonális hero, jubileumi motívum).
Author: Babits Gimnázium
Template: education-hub
Version: 1.0.0
Text Domain: babits-child
*/

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --ink: #15305B;
  --ink-2: #666666;
  --ink-3: #8A93A3;
  --line: #E2E6EC;
  --line-strong: #D3D9E2;
  --accent: #294A70;
  --accent-soft: #294A7014;
  --accent-2: #49688E;
  --accent-2-soft: #49688E14;
  --gold: #FFAB1F;
  --gold-soft: #FFAB1F1A;
  --shadow: 0 1px 2px rgba(21,48,91,0.05), 0 16px 36px -20px rgba(21,48,91,0.28);
  --font-display: 'Merriweather Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: 'Open Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.bx-page { margin: 0; background: var(--bg); font-family: var(--font-body); color: var(--ink); }
.bx-page * { box-sizing: border-box; }
.bx-page a { color: var(--accent-2); text-decoration: none; }
.bx-page a:hover { color: var(--accent); }
.bx-wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.bx-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

/* Compound .bx-btn.bx-btn-X selectors deliberately outrank the generic
   ".bx-page a" link-color rule (same specificity as ".bx-btn-X" alone
   would tie with it and lose on source order in some template combos). */
.bx-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; font-family: var(--font-body); font-weight: 600; font-size: 14.5px; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; }
.bx-btn.bx-btn-primary { background: var(--accent); color: #FFFFFF; }
.bx-btn.bx-btn-gold { background: var(--gold); color: #2A1D08; }
.bx-btn.bx-btn-outline { background: transparent; border-color: rgba(255,255,255,0.6); color: #FFFFFF; }
.bx-btn.bx-btn-line { background: var(--surface); border-color: var(--line-strong); color: var(--ink); border-style: solid; border-width: 1.5px; }
.bx-btn.bx-btn-outline:hover { background: rgba(255,255,255,0.12); color: #FFFFFF; }
.bx-btn.bx-btn-primary:hover { background: #1E3F66; color: #FFFFFF; }
.bx-btn.bx-btn-line:hover { background: var(--surface-2); color: var(--ink); }

.bx-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.bx-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }

/* Utility bar */
.bx-utility { height: 40px; background: var(--ink); display: flex; align-items: center; }
.bx-utility .bx-wrap { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.bx-utility-left { display: flex; align-items: center; gap: 22px; }
.bx-utility-left a { display: flex; align-items: center; gap: 7px; color: #D8D4C8; font-size: 13px; }
.bx-utility-right { display: flex; align-items: center; gap: 18px; }
.bx-utility-right a { color: #D8D4C8; display: flex; align-items: center; }

/* Header — two rows: brand+actions, then a dedicated full-width nav row
   (a single flex row here would squeeze the 5 nav links, given a long
   site name plus header actions, into an unreadably narrow, wrapped column). */
.bx-header { background: var(--surface); }
.bx-header-top { border-bottom: 1px solid var(--line); }
.bx-header-top .bx-wrap { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.bx-brand { display: flex; align-items: center; gap: 14px; }
.bx-brand img { display: block; border-radius: 4px; flex-shrink: 0; }
.bx-brand-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.1; color: var(--ink); }
.bx-brand-address { font-size: 12.5px; color: var(--ink-3); }
.bx-header-actions { display: flex; align-items: center; gap: 12px; }
.bx-header-actions > a:not(.bx-btn) { font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.bx-header-nav { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.bx-header-nav .bx-wrap { display: flex; }
.bx-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; }
.bx-nav a { color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.bx-nav a:hover { color: var(--accent); background: rgba(41,74,112,0.06); }
.bx-nav a.is-current { color: var(--accent); font-weight: 700; background: var(--accent-soft); }

/* Hero */
.bx-hero { position: relative; background: linear-gradient(120deg,#15305B 0%,#1E3F66 42%,#294A70 100%); overflow: hidden; }
.bx-hero-ghost40 { position: absolute; right: -70px; top: -140px; font-family: var(--font-display); font-weight: 700; font-size: 520px; line-height: 1; letter-spacing: -24px; color: rgba(255,171,31,0.09); pointer-events: none; user-select: none; }
.bx-hero-rings { position: absolute; right: 0; top: 0; opacity: 0.5; }
.bx-hero-inner { position: relative; display: flex; align-items: center; min-height: 640px; padding: 70px 20px; flex-wrap: wrap; gap: 40px; }
.bx-hero-copy { flex: 1 1 480px; display: flex; flex-direction: column; gap: 22px; }
.bx-hero-title { font-family: var(--font-display); font-weight: 700; font-size: 56px; line-height: 1.04; color: #FFFFFF; margin: 0; max-width: 620px; }
.bx-hero-title .bx-underline { position: relative; white-space: nowrap; }
.bx-hero-title .bx-underline::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 14px; background: var(--gold); opacity: 0.35; z-index: -1; }
.bx-hero-lede { font-size: 17px; line-height: 1.6; color: #D6E0EC; max-width: 540px; margin: 0; }
.bx-hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.bx-hero-media { flex: 1 1 340px; display: flex; justify-content: center; position: relative; }
.bx-hero-media-accent { position: absolute; width: 320px; height: 380px; background: var(--gold); border-radius: 18px; transform: rotate(6deg) translate(18px,10px); opacity: 0.9; }
.bx-hero-photo { position: relative; width: 340px; height: 400px; overflow: hidden; background: #0E2444; clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%); box-shadow: 0 24px 60px -20px rgba(0,0,0,0.5); }
.bx-hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bx-hero-photo-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,36,68,0.8), rgba(14,36,68,0) 45%); }
.bx-hero-photo-caption { position: absolute; left: 36px; bottom: 20px; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,0.92); color: var(--accent); font-size: 12px; font-weight: 700; }

/* Jubilee band */
.bx-jubilee { position: relative; background: linear-gradient(100deg,#294A70,#15305B); margin-top: -28px; clip-path: polygon(0 28px, 100% 0, 100% 100%, 0 100%); padding-top: 56px; }
.bx-jubilee .bx-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding-top: 20px; padding-bottom: 40px; }
.bx-jubilee-left { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.bx-jubilee-num { display: flex; flex-direction: column; align-items: center; line-height: 0.85; }
.bx-jubilee-num strong { font-family: var(--font-display); font-weight: 700; font-size: 64px; color: var(--gold); }
.bx-jubilee-divider { width: 1px; height: 56px; background: rgba(255,255,255,0.25); }
.bx-jubilee-copy { display: flex; flex-direction: column; gap: 6px; max-width: 600px; }
.bx-jubilee-copy .bx-title { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: #FFFFFF; }
.bx-jubilee-copy .bx-desc { font-size: 14.5px; color: #C7D3E2; line-height: 1.5; }

/* News */
.bx-news { padding: 26px 20px 56px; }
.bx-news-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 16px; }
.bx-news-title { font-family: var(--font-display); font-weight: 600; font-size: 30px; margin: 4px 0 0; color: var(--ink); }
.bx-news-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.bx-news-filters .bx-tag { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-2); }
.bx-news-filters .bx-tag.is-active { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

.bx-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 292px 292px auto; gap: 20px; grid-template-areas: "a a b" "a a c" "d e f"; }
.bx-news-card { overflow: hidden; display: flex; flex-direction: column; }
.bx-news-card-img { position: relative; overflow: hidden; background: var(--surface-2); }
.bx-news-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bx-news-card-icon { display: flex; align-items: center; justify-content: center; height: 100%; }
.bx-news-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.bx-news-card-body .bx-title { font-family: var(--font-display); font-weight: 600; font-size: 17.5px; line-height: 1.3; color: var(--ink); }
.bx-news-card-body .bx-excerpt { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin: 0; }
.bx-news-card-body .bx-more { font-size: 13.5px; font-weight: 700; margin-top: 4px; }
.bx-news-card-meta { display: flex; align-items: center; gap: 10px; }
.bx-news-card-date { font-size: 12.5px; color: var(--ink-3); }

.bx-card-a { grid-area: a; }
.bx-card-a .bx-news-card-img { height: 56%; }
.bx-card-a .bx-news-card-img .bx-tag { position: absolute; left: 16px; top: 16px; background: rgba(255,255,255,0.95); color: var(--accent); }
.bx-card-a .bx-news-card-body { flex: 1; gap: 8px; }
.bx-card-a .bx-title { font-size: 22px; line-height: 1.25; font-weight: 700; }
.bx-card-a .bx-excerpt { font-size: 14px; }
.bx-card-a .bx-more { margin-top: auto; }

.bx-card-b, .bx-card-c { display: flex; flex-direction: column; }
.bx-card-b { grid-area: b; }
.bx-card-c { grid-area: c; }
.bx-card-b .bx-news-card-img, .bx-card-c .bx-news-card-img { width: 100%; height: 128px; flex-shrink: 0; }
.bx-card-compact-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.bx-card-compact-body .bx-tag { align-self: flex-start; }
.bx-card-compact-body .bx-title { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; line-height: 1.25; color: var(--ink); }

.bx-card-d { grid-area: d; }
.bx-card-e { grid-area: e; }
.bx-card-f { grid-area: f; }
.bx-card-d .bx-news-card-img, .bx-card-e .bx-news-card-img, .bx-card-f .bx-news-card-img { height: 150px; }

.bx-news-footer { display: flex; justify-content: center; margin-top: 34px; }

@media (max-width: 900px) {
  .bx-news-grid { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "a" "b" "c" "d" "e" "f"; }
  .bx-card-a .bx-news-card-img { height: 220px; }
  .bx-card-b, .bx-card-c { flex-direction: column; }
  .bx-card-b .bx-news-card-img, .bx-card-c .bx-news-card-img { height: 180px; }
}

/* Stats */
.bx-stats { background: var(--ink); }
.bx-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); padding: 44px 20px 30px; gap: 20px; }
.bx-stat { display: flex; flex-direction: column; gap: 4px; padding: 0 20px; border-left: 1px solid rgba(255,255,255,0.12); }
.bx-stat strong { font-family: var(--font-display); font-weight: 600; font-size: 36px; color: var(--gold); }
.bx-stat span { font-size: 13.5px; color: #AEBBCC; }
.bx-stats-note { padding: 0 20px 26px; max-width: 1280px; margin: 0 auto; }
.bx-stats-note span { font-size: 12px; color: #8D9BB0; }

@media (max-width: 700px) {
  .bx-stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Community */
.bx-community { padding: 72px 20px; display: flex; flex-direction: column; gap: 38px; max-width: 1280px; margin: 0 auto; }
.bx-community-copy { max-width: 780px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.bx-community-copy .bx-title { font-family: var(--font-display); font-weight: 600; font-size: 34px; margin: 0; color: var(--ink); line-height: 1.2; }
.bx-community-copy .bx-desc { font-size: 15px; line-height: 1.7; color: var(--ink-2); margin: 0; }
.bx-community-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.bx-community-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow-soft); }
.bx-community-card-media { position: relative; display: block; height: 220px; overflow: hidden; background: var(--surface-2); }
.bx-community-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.bx-community-card-media.is-crest { padding: 30px; background: linear-gradient(145deg, #fff, var(--surface-2)); }
.bx-community-card-media.is-crest img { object-fit: contain; }
.bx-community-card-body { min-height: 220px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.bx-community-card-label { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.bx-community-card-title { font-family: var(--font-display); font-size: 24px; line-height: 1.16; }
.bx-community-card-desc { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.bx-community-card-link { margin-top: auto; color: var(--accent); font-size: 13px; font-weight: 800; }
.bx-community-card:hover .bx-community-card-media img { transform: scale(1.045); }
.bx-community-card:hover .bx-community-card-link { text-decoration: underline; text-underline-offset: 3px; }
.bx-community-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

@media (max-width: 900px) {
  .bx-community-grid { grid-template-columns: 1fr; }
  .bx-community-card { max-width: 640px; width: 100%; margin-inline: auto; }
}

/* Footer */
.bx-footer { background: #15305B; }
.bx-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 56px 20px 36px; max-width: 1280px; margin: 0 auto; }
.bx-footer-col { display: flex; flex-direction: column; gap: 12px; }
.bx-footer-brand { display: flex; align-items: center; gap: 12px; }
.bx-footer-brand img { display: block; border-radius: 4px; }
.bx-footer-brand span { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: #FFFFFF; }
.bx-footer-col .bx-heading { font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #8D9BB0; }
.bx-footer-col a, .bx-footer-col span.bx-line { color: #DCE4EE; font-size: 14px; }
.bx-footer-address { font-size: 13.5px; color: #A9B7C9; line-height: 1.7; }
.bx-footer-contact { font-size: 13.5px; color: #A9B7C9; display: flex; flex-direction: column; gap: 6px; }
.bx-footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; max-width: 1280px; margin: 0 auto; }
.bx-footer-bottom span, .bx-footer-bottom a { font-size: 12.5px; color: #8D9BB0; }

@media (max-width: 900px) {
  .bx-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .bx-footer-grid { grid-template-columns: 1fr; }
  .bx-hero-title { font-size: 40px; }
}

/* Widgets — the original sidebar's badges, partner logos and campaign
   boxes, carried into the new layout so nothing from it gets lost. */
.bx-widgets { background: var(--surface-2); padding: 56px 20px; border-top: 1px solid var(--line); }
.bx-widgets-head { max-width: 1280px; margin: 0 auto 24px; }
.bx-widgets-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; align-items: start; }
.bx-widgets-grid aside.widget { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.bx-widgets-grid aside.widget .widget-title { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--ink); margin: 0; }
.bx-widgets-grid aside.widget img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 0 auto; }
.bx-widgets-grid aside.widget select { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-strong); font-family: var(--font-body); }
.bx-widgets-grid aside.widget p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }

/* Sidebar variant — same widget look, used in the single-post two-column layout */
.bx-sidebar { display: flex; flex-direction: column; gap: 18px; }
.bx-sidebar aside.widget { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.bx-sidebar aside.widget .widget-title { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); margin: 0 0 10px; }
.bx-sidebar aside.widget img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 0 auto; }
.bx-sidebar aside.widget select { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-strong); }
.bx-sidebar aside.widget p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* Single post */
.bx-single-hero { background: linear-gradient(120deg,#15305B 0%,#294A70 100%); padding: 40px 20px 48px; }
.bx-single-hero .bx-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.bx-single-back { color: #D6E0EC; font-size: 13.5px; font-weight: 600; }
.bx-single-back:hover { color: #FFFFFF; }
.bx-single-title { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.2; color: #FFFFFF; margin: 0; max-width: 820px; }
.bx-single-byline { display: flex; gap: 6px; }
.bx-single-date, .bx-single-author { font-size: 13px; color: #AEBBCC; }
.bx-single-footer { padding-top: 8px; }
.bx-single { padding: 48px 20px 72px; }
.bx-single-wrap { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.bx-single-main { display: flex; flex-direction: column; gap: 32px; max-width: 760px; }
.bx-single-thumb { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.bx-single-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bx-single-body { font-size: 16.5px; line-height: 1.75; color: var(--ink-2); }
.bx-single-body p { margin: 0 0 1.2em; }
.bx-single-body h2, .bx-single-body h3, .bx-single-body h4 { font-family: var(--font-display); font-weight: 600; color: var(--ink); margin: 1.6em 0 0.6em; }
.bx-single-body a { color: var(--accent-2); text-decoration: underline; }
.bx-single-body ul, .bx-single-body ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.bx-single-body img { max-width: 100%; height: auto; border-radius: 12px; }
.bx-single-body blockquote { border-left: 3px solid var(--gold); margin: 1.4em 0; padding: 0.2em 0 0.2em 1.2em; color: var(--ink); font-style: italic; }
.bx-single-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; }
.bx-single-body table td, .bx-single-body table th { border: 1px solid var(--line); padding: 8px 10px; }

@media (max-width: 860px) {
  .bx-single-wrap { grid-template-columns: 1fr; }
  .bx-header-top .bx-wrap { justify-content: center; text-align: center; }
  .bx-nav { justify-content: center; }
}
