/* Copyright (c) 2026 Glipco Srl Deva (Lucian Canacheu <lcanacheu@gmail.com>)
 * SPDX-License-Identifier: BSD-2-Clause */

/* Pișcolt look (instance/LocalPRD.md, "Look and feel"): deep greens, light greys, Nunito, and watermelon red
   only on thin or small things (underlines, rules, focus outlines, the card label square), never as a fill. */

/* Nunito (SIL OFL 1.1, fonts/nunito-OFL.txt), self-hosted: latin, and latin-ext for ă, â, î, ș, ț. */
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("../fonts/nunito-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("../fonts/nunito-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("../fonts/nunito-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("../fonts/nunito-latin-ext-700.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    --pis-green: #1F6F43;        /* main: links, active states, buttons (5.9:1 on white) */
    --pis-green-dark: #14402A;   /* card panels, footer */
    --pis-red: #C8323A;          /* watermelon: thin or small things only */
    --pis-grey: #F5F5F5;         /* bands */
    --pis-rule: #E4E4E4;         /* rules and borders */
    --pis-text: #2B2B2B;         /* body text, 14.4:1 on white, 13.2:1 on the grey band */
    --pis-muted: #5C5C5C;        /* dates and small print, 6.7:1 on white */
    --pis-footer-text: #DCE7E0;  /* on the dark green, 9.6:1 */
    --pis-section-y: 75px;       /* the model site's vertical rhythm; 30px on phones */
    --bs-body-font-family: "Nunito", system-ui, sans-serif;
    --bs-body-color: var(--pis-text);
    --bs-link-color-rgb: 31, 111, 67;
    --bs-link-hover-color-rgb: 20, 64, 42;
    --bs-primary: var(--pis-green);
    --bs-primary-rgb: 31, 111, 67;
}

body { background: #fff; line-height: 1.6; overflow-wrap: anywhere; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--pis-green-dark); }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--pis-red); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--pis-red); outline-offset: 2px; }

.site-width { max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.band { padding-top: var(--pis-section-y); padding-bottom: var(--pis-section-y); }
.band-grey { background: var(--pis-grey); }

/* A heading with a short red rule under it */
.rule-heading { position: relative; padding-bottom: 12px; margin-bottom: 24px; }
.rule-heading::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; background: var(--pis-red); }

/* Top bar */
.top-bar { background: var(--pis-green-dark); color: var(--pis-footer-text); font-size: .875rem; padding: 6px 0; }
.top-bar a { color: #fff; }
.top-bar .bi { margin-right: 6px; }
.top-bar-items { display: flex; flex-wrap: wrap; gap: 4px 24px; }

/* Menu: one line on desktop; Contact pinned right, and outside the collapse on phones */
.main-nav { background: #fff; border-bottom: 1px solid var(--pis-rule); padding: 0; }
.main-nav .site-width { display: flex; flex-wrap: wrap; align-items: center; width: 100%; }
.wordmark { display: flex; flex-direction: column; line-height: 1.1; color: var(--pis-green-dark); padding: 12px 0; margin-right: 16px; }
.wordmark-small { font-size: .8rem; font-weight: 400; text-transform: uppercase; letter-spacing: .06em; }
.wordmark-name { font-size: 1.6rem; font-weight: 700; }
.wordmark:hover { text-decoration: none; color: var(--pis-green); }
.main-nav .navbar-nav { flex-wrap: nowrap; }
.main-nav .nav-link { color: var(--pis-text); font-weight: 700; font-size: .95rem; padding: 24px 8px !important; white-space: nowrap; border-bottom: 3px solid transparent; }
.main-nav .nav-link:hover, .main-nav .nav-link:focus-visible, .main-nav .show > .nav-link { color: var(--pis-green); text-decoration: none; }
.main-nav .nav-link.active { color: var(--pis-green); border-bottom-color: var(--pis-red); }
.main-nav .dropdown-menu { border-radius: 0; border: 1px solid var(--pis-rule); border-top: 3px solid var(--pis-green); padding: 0; }
.main-nav .dropdown-item { padding: 10px 18px; border-bottom: 1px solid var(--pis-grey); }
.main-nav .dropdown-item.active, .main-nav .dropdown-item:active { background: var(--pis-grey); color: var(--pis-green); border-left: 3px solid var(--pis-red); }
.nav-contact {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    background: var(--pis-green); color: #fff; font-weight: 700; padding: 8px 16px; border-radius: 4px;
}
.nav-contact:hover, .nav-contact:focus-visible, .nav-contact.active { background: var(--pis-green-dark); color: #fff; text-decoration: none; }
.main-nav .navbar-toggler { border: 1px solid var(--pis-rule); padding: 6px 10px; margin-left: 8px; }
.main-nav .navbar-toggler:focus { box-shadow: none; }

/* Content */
.site-main { padding-top: 40px; padding-bottom: var(--pis-section-y); }
.entry-title { margin-bottom: .25rem; }
.entry-meta { font-size: .875rem; color: var(--pis-muted); margin-bottom: 1.5rem; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content td, .entry-content th { border: 1px solid var(--pis-rule); padding: 6px 8px; vertical-align: top; }
.entry-content h2, .entry-content h3 { margin-top: 1.5rem; }
.entry-content .file-link::before { font-family: bootstrap-icons; content: "\F38B"; margin-right: 6px; color: var(--pis-green); }
.draft-badge { font-size: .75rem; vertical-align: middle; }
.attachment-icon { color: var(--pis-green); margin-left: 4px; vertical-align: -2px; }

/* Plain listings (Anunțuri, MOL, Tags) */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 12px 0; border-bottom: 1px solid var(--pis-rule); }
.post-list a { font-weight: 700; color: var(--pis-text); }
.post-list a:hover { color: var(--pis-green); }
.post-list time, .post-list .post-date { display: block; font-size: .85rem; color: var(--pis-muted); }
.mol-category { margin-bottom: 40px; }
.mol-empty { color: var(--pis-muted); padding: 12px 0; border-bottom: 1px solid var(--pis-rule); }

/* Buttons: green, never red */
.btn-pis {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--pis-green); color: #fff; font-weight: 700; border-radius: 4px; padding: 10px 22px;
}
.btn-pis:hover, .btn-pis:focus-visible { background: var(--pis-green-dark); color: #fff; text-decoration: none; }

/* Footer */
.site-footer { background: var(--pis-green-dark); color: var(--pis-footer-text); font-size: .925rem; padding: 50px 0 20px; }
.site-footer h2 { color: #fff; font-size: 1.1rem; }
.site-footer a { color: var(--pis-footer-text); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer address { font-style: normal; line-height: 1.8; }
.site-credit { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 30px; padding-top: 16px; font-size: .8rem; }

@media (max-width: 1199.98px) {
    .wordmark { margin-right: auto; }
    .main-nav .nav-link { padding: 10px 4px !important; border-bottom: 0; border-left: 3px solid transparent; }
    .main-nav .nav-link.active { border-left-color: var(--pis-red); padding-left: 10px !important; }
    .main-nav .navbar-nav { flex-wrap: wrap; padding-bottom: 12px; }
}
@media (max-width: 991.98px) {
    :root { --pis-section-y: 30px; }
    .site-main { padding-top: 24px; }
}
@media (max-width: 400px) {
    .wordmark-small { font-size: .68rem; letter-spacing: .02em; }
    .wordmark-name { font-size: 1.3rem; }
    .nav-contact { padding: 8px 12px; }
}

/* Homepage */
.hero { position: relative; background: var(--pis-green-dark); }
.hero img { display: block; width: 100%; height: 420px; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 64, 42, .85), rgba(20, 64, 42, 0) 60%); }
.hero-text { position: absolute; left: 0; right: 0; bottom: 36px; z-index: 1; color: #fff; }
.hero-text h1 { color: #fff; font-size: 3rem; margin: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.hero-text p { font-size: 1.15rem; margin: 4px 0 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.tile {
    display: flex; align-items: center; gap: 14px; height: 100%; min-height: 88px; padding: 18px 20px;
    border: 1px solid var(--pis-rule); border-bottom: 3px solid var(--pis-green); background: #fff;
    color: var(--pis-green-dark); font-weight: 700; font-size: 1.1rem;
}
.tile .bi { font-size: 1.8rem; color: var(--pis-green); }
.tile:hover, .tile:focus-visible { text-decoration: none; border-bottom-color: var(--pis-red); }

/* Știri cards (after instance/card_styling.png): the photo fades into the panel before any text starts */
.stire-card { display: flex; flex-direction: column; height: 100%; border-radius: 12px; overflow: hidden; background: var(--pis-green-dark); color: #fff; }
.stire-card:hover, .stire-card:focus-visible { text-decoration: none; color: #fff; }
.stire-card:hover .card-title { text-decoration: underline; text-decoration-color: var(--pis-red); text-underline-offset: 3px; }
.card-image { position: relative; display: block; aspect-ratio: 16 / 10; }
.card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(20, 64, 42, 0) 45%, #14402A 100%); }
.card-panel { display: block; flex: 1; height: 190px; padding: 6px 20px 20px; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; margin-bottom: 10px; }
.card-label { display: inline-flex; align-items: center; gap: 8px; }
.card-label::before { content: ""; width: 10px; height: 10px; background: var(--pis-red); }
.card-rule { flex: 1; height: 1px; background: rgba(255, 255, 255, .35); }
.card-title {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
    font-weight: 700; font-size: 1.1rem; line-height: 1.35;
}

@media (max-width: 767.98px) {
    .hero img { height: 300px; }
    .hero-text h1 { font-size: 2.2rem; }
    .card-panel { height: auto; min-height: 150px; }
}
