/* Heritage look for every page except the homepage.
   legacy.css keeps the layout of the inherited templates; this file carries
   the homepage design language over: PT Serif headings, navy/red/green/paper
   palette, the folk ribbon under each hero, flat cards with a hairline border.
   Inline template styles are overridden with !important where unavoidable. */

body.nt-heritage:not(.home) {
    --hx-shadow:0 9px 23px #15354a12;
    --hx-radius:5px;
    background:#fffefd; font-size:17px; line-height:1.6; -webkit-font-smoothing:antialiased;
}
.nt-heritage #main h1,.nt-heritage #main h2,.nt-heritage #main h3,.nt-heritage #main h4 { font-family:var(--serif); letter-spacing:-.015em; }
.nt-heritage #main p,.nt-heritage #main li { font-family:var(--sans); }

/* ---------- Page heroes ---------- */
.nt-heritage .hero:not(.heritage-hero),.nt-heritage .page-hero,.nt-heritage .page-hero-vesti,.nt-heritage .ntmm-vesti-hero {
    position:relative; isolation:isolate; overflow:hidden;
    display:flex; flex-direction:column; align-items:stretch; justify-content:center;
    min-height:330px; padding:62px 0 102px!important; margin:0;
    text-align:left!important; color:#fff!important;
    background-color:var(--navy); background-size:cover!important; background-position:center 42%!important;
    background-attachment:scroll!important;
}
/* Gradient-only heroes get the footer's navy instead of the old bright blue/orange. */
.nt-heritage .hero[style*="background: linear-gradient"],.nt-heritage .page-hero[style*="background: linear-gradient"],
.nt-heritage .hero.ns-hero,.nt-heritage .page-hero-vesti,.nt-heritage .ntmm-vesti-hero,
.nt-heritage .hero:not(.heritage-hero):not([style*="url("]) {
    background:linear-gradient(105deg,#18384e,#1c3e56 65%,#17364d)!important;
}
.nt-heritage .hero-kids { background-image:var(--hero-img,none)!important; }
/* Photo overlay: same left-to-right fade as the homepage carousel. */
.nt-heritage .hero[style*="url("]::after,.nt-heritage .hero-kids::after,.nt-heritage .hero .hero-overlay {
    content:""; position:absolute; inset:0; z-index:-1;
    background:linear-gradient(90deg,rgba(7,30,46,.89) 0%,rgba(7,30,46,.74) 32%,rgba(7,30,46,.38) 62%,rgba(7,30,46,.12) 100%)!important;
}
.nt-heritage .hero .hero-background { z-index:-2!important; }
.nt-heritage .hero .hero-overlay { z-index:-1!important; }
/* Serbian/Hungarian ribbon along the bottom edge, as under the homepage carousel. */
.nt-heritage .hero:not(.heritage-hero)::before,.nt-heritage .page-hero::before,.nt-heritage .page-hero-vesti::before,.nt-heritage .ntmm-vesti-hero::before {
    content:""; position:absolute; top:auto; left:0; right:0; bottom:0; height:40px; z-index:2;
    background:#fff var(--heritage-ribbon-image) repeat-x center/288px 108px;
    border-top:1px solid #e7e4de; border-bottom:1px solid #e7e4de;
}
.nt-heritage .hero:not(.heritage-hero) .container,.nt-heritage .page-hero .container,.nt-heritage .page-hero-vesti .container,.nt-heritage .ntmm-vesti-hero .container {
    position:relative; z-index:1; width:min(1280px,calc(100% - 11.6%)); max-width:none; padding:0!important; margin-inline:auto; text-align:left!important;
}
.nt-heritage .hero:not(.heritage-hero) h1,.nt-heritage .page-hero h1,.nt-heritage .page-hero-vesti h1,.nt-heritage .ntmm-vesti-hero h1 {
    max-width:930px; margin:0 0 14px!important; color:#fff!important;
    font:700 clamp(34px,3.6vw,50px)/1.18 var(--serif)!important; letter-spacing:-.03em; text-transform:none;
    text-shadow:0 2px 14px #061b2b16!important; text-align:left!important; text-wrap:balance;
}
.nt-heritage .hero:not(.heritage-hero) h1>i,.nt-heritage .page-hero h1>i { display:none; }
.nt-heritage .hero:not(.heritage-hero) p,.nt-heritage .page-hero p,.nt-heritage .page-hero-vesti p,.nt-heritage .ntmm-vesti-hero p {
    max-width:780px; margin:0 0 6px!important; color:#fff!important; opacity:.94!important;
    font:400 20px/1.5 var(--serif)!important; text-align:left!important;
}
.nt-heritage .hero:not(.heritage-hero) p+p,.nt-heritage .page-hero p+p { font-size:17px!important; opacity:.85!important; }
.nt-heritage .hero-content { text-align:left; }

/* ---------- Breadcrumb ---------- */
.nt-heritage .breadcrumb-section { padding-block:14px 0; }
.nt-heritage .breadcrumb { font:400 14px/1.5 var(--sans); color:var(--muted); }
.nt-heritage .breadcrumb a { color:var(--navy)!important; font-weight:700; }
.nt-heritage .breadcrumb a:hover { color:var(--red)!important; }

/* ---------- Section titles ---------- */
.nt-heritage #main .section-title {
    font:700 clamp(28px,2.7vw,38px)/1.2 var(--serif); letter-spacing:-.03em; color:var(--ink);
    text-transform:none; margin:56px 0 30px;
}
.nt-heritage #main .section-title::before { display:none; }
.nt-heritage #main .section-title::after { width:56px; height:2px; margin-top:14px; background:var(--red); }

/* ---------- Cards: flat, hairline border, small radius ---------- */
.nt-heritage :is(.info-card,.content-card,.school-card,.contact-card,.nasa-skola-card,.timeline-box-left,.timeline-box-right,
    .doc-item,.tab-header,.employee-card,.featured-post,.ustanove-card,.izdanje-card,.post-card,.no-posts,.download-btn,
    .doc-archive-toggle,.doc-archive-content,.doc-history-year,.ntmm-vest-card,.ntmm-single-body,.card,.news-item,.map-info-box,
    .library-panel,.institution-vision,.tab-button) {
    border:1px solid var(--line); border-radius:var(--hx-radius)!important; box-shadow:0 1px 4px #142c4103!important;
}
.nt-heritage :is(.info-card,.content-card,.school-card,.contact-card,.timeline-box-left,.timeline-box-right,.employee-card,.post-card,.card) { background:#fff; }
.nt-heritage :is(a.info-card,.school-card,.contact-card,.nasa-skola-card,.timeline-box-left,.timeline-box-right,.doc-item,.featured-post,
    .ustanove-card,.izdanje-card,.post-card,.download-btn,.ntmm-vest-card,.card,.news-item):hover {
    transform:translateY(-2px)!important; box-shadow:var(--hx-shadow)!important; border-color:#c5cec9;
}
.nt-heritage .info-card--cta { background:var(--paper)!important; border-color:#e8e0d4; }
.nt-heritage :is(.gallery-img,.school-card-image,.timeline-image,.gallery-thumb-link,.post-video,.ntmm-video-wrap) {
    border-radius:var(--hx-radius)!important; box-shadow:none!important;
}
.nt-heritage .post-content img,.nt-heritage .post-content .post-image img { border-radius:var(--hx-radius); }
.nt-heritage .card-img img,.nt-heritage .school-card-image img { border-radius:0; }

/* Icon tiles: solid heritage colours instead of glossy gradients. */
.nt-heritage :is(.school-card-icon,.doc-section-icon,.tab-icon,.timeline-dot) {
    background:var(--navy)!important; border-radius:var(--hx-radius)!important; box-shadow:none!important;
}
.nt-heritage .timeline-dot { border-radius:50%!important; border:4px solid var(--paper); }
.nt-heritage .timeline-section::before,.nt-heritage .timeline-center::before { background:#d8d3c8!important; }
.nt-heritage .card-icon-badge { box-shadow:none; border:1px solid var(--line); }
.nt-heritage .card-icon-badge i { color:var(--navy)!important; }
.nt-heritage .card-badge { border-radius:3px; font:700 12px/1.3 var(--sans); letter-spacing:.08em; text-transform:uppercase; padding:6px 11px; }
.nt-heritage .card-badge--accent { background:var(--red); }

/* Component colours are mapped by their role in heritage-pages.css.
   A colour used in inline text must not accidentally colour its background. */

/* Inline boxes from the templates. */
.nt-heritage #main [style*="border-radius: 12px"],.nt-heritage #main [style*="border-radius: 15px"],
.nt-heritage #main [style*="border-radius:12px"],.nt-heritage #main [style*="border-radius: 10px"],.nt-heritage #main [style*="border-radius: 8px"] {
    border-radius:var(--hx-radius)!important;
}
.nt-heritage #main [style*="box-shadow"] { box-shadow:0 1px 4px #142c4103!important; }
.nt-heritage #main [style*="background: white"][style*="box-shadow"] { border:1px solid var(--line); }
.nt-heritage #main [style*="linear-gradient(135deg, var(--accent-color)"] { background:var(--red)!important; }
.nt-heritage #main [style*="background: #e8f4f8"] { background:var(--paper)!important; border-left-color:var(--green)!important; }
.nt-heritage #main [style*="font-family: 'Segoe UI'"] { font-family:var(--sans)!important; color:var(--ink)!important; }

/* Coloured feature blocks. */
.nt-heritage .grade-section { background:var(--navy); border-radius:var(--hx-radius); box-shadow:none; }
.nt-heritage .grade-card { border-radius:var(--hx-radius); border:1px solid #ffffff1f; }
.nt-heritage .kids-intro-card { background:var(--navy)!important; border-radius:var(--hx-radius)!important; box-shadow:none!important; }
.nt-heritage .kids-intro-card p { font-family:var(--serif)!important; font-size:20px; }
.nt-heritage .info-box { border-radius:var(--hx-radius); box-shadow:none; border:1px solid var(--line); }
.nt-heritage .info-box-primary,.nt-heritage .ns-help,.nt-heritage .doc-item-current { background:var(--paper)!important; }
.nt-heritage .warn-box { border-radius:var(--hx-radius); background:var(--paper); border-color:#e8e0d4; border-left:3px solid var(--red); }
.nt-heritage .nasa-skola-card .nasa-skola-card-header { background:var(--ns-from,var(--navy)); }
.nt-heritage .fa-check-circle,.nt-heritage .fa-check { color:var(--green); }
.nt-heritage .kids-intro-card .fa-check-circle,.nt-heritage .grade-section .fa-check-circle,
.nt-heritage [style*="color: white"] .fa-check-circle { color:inherit; }

/* Tabs */
.nt-heritage .tab-button { background:#fff; }
.nt-heritage .tab-button.active,.nt-heritage .tab-btn.active { background:var(--navy)!important; color:#fff; border-color:var(--navy); box-shadow:none!important; }
.nt-heritage .tab-btn { border-radius:var(--hx-radius) var(--hx-radius) 0 0; font-family:var(--sans); }

/* ---------- Buttons & links ---------- */
.nt-heritage #main :is(.btn,.btn-accent,.ns-btn,.dd-btn,.btn-primary) {
    display:inline-flex; align-items:center; justify-content:center; gap:12px;
    border-radius:var(--hx-radius)!important; padding:13px 25px; text-transform:none; letter-spacing:0;
    font:700 15px/1.4 var(--sans); box-shadow:inset 0 1px 0 #ffffff22!important; animation:none;
}
.nt-heritage #main :is(.btn-accent,.btn-primary) { background:linear-gradient(#bc3b4d,#ae293d)!important; border:1px solid #a42c3f; color:#fff!important; }
.nt-heritage #main :is(.btn-accent,.btn-primary):hover { background:#a9293d!important; transform:translateY(-1px); }
.nt-heritage .school-card-link,.nt-heritage .card-link,.nt-heritage .post-back-link,.nt-heritage .map-link {
    color:var(--navy)!important; font:700 15px/1.5 var(--sans); text-transform:none; letter-spacing:0;
}
.nt-heritage .school-card-link:hover,.nt-heritage .card-link:hover,.nt-heritage .post-back-link:hover { color:var(--red)!important; }
.nt-heritage .pagination .page-numbers { border-radius:var(--hx-radius); box-shadow:none!important; }
.nt-heritage .pagination .page-numbers.current { background:var(--navy); }
.nt-heritage .ntmm-kat-btn,.nt-heritage .doc-badge { border-radius:3px; }

/* ---------- Text content ---------- */
.nt-heritage .post-content { font-size:17px; line-height:1.75; }
.nt-heritage .post-content a { color:var(--red); text-decoration:underline; text-underline-offset:.2em; }
.nt-heritage .post-content blockquote { border-left:3px solid var(--red); background:var(--paper); padding:16px 22px; font-family:var(--serif); font-size:19px; }

@media(max-width:880px) {
    .nt-heritage .hero:not(.heritage-hero),.nt-heritage .page-hero,.nt-heritage .page-hero-vesti,.nt-heritage .ntmm-vesti-hero { min-height:280px; padding:48px 0 86px!important; }
    .nt-heritage .hero:not(.heritage-hero) .container,.nt-heritage .page-hero .container { width:calc(100% - 44px); }
    .nt-heritage .hero[style*="url("]::after,.nt-heritage .hero-kids::after { background:linear-gradient(90deg,rgba(7,30,46,.88),rgba(7,30,46,.55))!important; }
}
@media(max-width:580px) {
    .nt-heritage .hero:not(.heritage-hero),.nt-heritage .page-hero,.nt-heritage .page-hero-vesti,.nt-heritage .ntmm-vesti-hero { min-height:240px; padding:40px 0 76px!important; }
    .nt-heritage .hero:not(.heritage-hero) .container,.nt-heritage .page-hero .container { width:calc(100% - 36px); }
    .nt-heritage .hero:not(.heritage-hero) h1,.nt-heritage .page-hero h1 { font-size:31px!important; }
    .nt-heritage .hero:not(.heritage-hero) p,.nt-heritage .page-hero p { font-size:17px!important; }
    .nt-heritage .hero:not(.heritage-hero)::before,.nt-heritage .page-hero::before { height:34px; background-size:240px 90px; }
    .nt-heritage #main .section-title { font-size:27px; margin:40px 0 24px; }
}
@media(prefers-reduced-motion:reduce) { .nt-heritage #main *:hover { transform:none!important; } }
@media print { .nt-heritage .hero::before,.nt-heritage .page-hero::before { display:none; } }

/* "Naša škola" card modifiers: heritage palette instead of flat-UI colours. */
.nt-heritage .nasa-skola-card--blue   { --ns-from:var(--navy);  --ns-link:var(--navy); }
.nt-heritage .nasa-skola-card--sky    { --ns-from:#2f5878;      --ns-link:#2f5878; }
.nt-heritage .nasa-skola-card--green  { --ns-from:var(--green); --ns-link:var(--green); }
.nt-heritage .nasa-skola-card--orange,.nt-heritage .nasa-skola-card--warm { --ns-from:var(--red); --ns-link:var(--red); }
.nt-heritage .nasa-skola-card--purple { --ns-from:#5a3d55;      --ns-link:#5a3d55; }
.nt-heritage .nasa-skola-card .nasa-skola-card-header { background:var(--ns-from)!important; }
.nt-heritage #news-filter-controls { background:var(--paper)!important; border-bottom:1px solid #e8e0d4!important; }
.nt-heritage #news-filter-controls select { border:1px solid #d6dadb!important; border-radius:var(--hx-radius)!important; font-family:var(--sans); }
