/* ==========================================================
   Maflex 2026 - stilovi novih komponenti
   (pretraga, EU projekat, interaktivna mapa, newsletter, kontakt forma)
   Boja akcenta po jeziku dolazi iz --mf-accent (postavlja header.php).
   ========================================================== */
:root {
    --mf-accent: #73bd83;
    --mf-dark: #141d25;
    --mf-dark-2: #1a2530;
    --mf-text: #e8eef7;
    --mf-muted: #8b9dc3;
}

/* honeypot polje: van ekrana, ali ne display:none (botovi to detektuju) */
.mf-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0;
}

/* opsti status forme */
.mf-status { display: none; margin-top: 12px; padding: 10px 14px; border-radius: 3px; font-size: 13px; line-height: 1.5; }
.mf-status.is-ok { display: block; background: rgba(115, 189, 131, .15); border: 1px solid rgba(115, 189, 131, .5); color: #2f7a41; }
.mf-status.is-err { display: block; background: rgba(245, 32, 34, .08); border: 1px solid rgba(245, 32, 34, .4); color: #b3161a; }
.mf-status.is-info { display: block; background: rgba(0, 90, 170, .08); border: 1px solid rgba(0, 90, 170, .35); color: #004a8c; }
.text-light .mf-status.is-ok { color: #a9e2b4; }
.text-light .mf-status.is-err { color: #ff9a9b; }
.mf-field-err { border-color: #f52022 !important; }
.mf-btn[disabled] { opacity: .6; cursor: default; }

/* ---------- Kontakt forma ---------- */
.mf-contact .mf-field { margin-bottom: 10px; }
.mf-contact .mf-err { display: none; color: #f52022; font-size: 12px; margin: 4px 0 0 2px; }
.mf-contact .mf-err:not(:empty) { display: block; }
.mf-contact .mf-privacy { font-size: 12px; color: #888; margin: 6px 0 12px; }
.mf-contact textarea.form-control { min-height: 120px; }

/* ---------- Pretraga u headeru ---------- */
#mainmenu li.nav-search > a { padding-left: 20px; padding-right: 0; }
#mainmenu li.nav-search .mf-search-results a:after { display: none; }
#mainmenu li.nav-search .mf-search { display: none; position: absolute; right: 0; top: 100%; width: 340px; padding: 10px; background: rgba(20, 29, 37, .98); border: 1px solid rgba(255, 255, 255, .12); border-top: 2px solid var(--mf-accent); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); z-index: 1050; }
#mainmenu li.nav-search.open .mf-search { display: block; }
.mf-search input[type="search"] { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #3a4652; background: #0f161c; color: #fff; font-size: 14px; font-weight: 400; line-height: 40px; border-radius: 2px; -webkit-appearance: none; }
.mf-search input[type="search"]:focus { outline: none; border-color: var(--mf-accent); }
.mf-search-results { max-height: 60vh; overflow: auto; margin-top: 6px; }
.mf-search-results[hidden] { display: none; }
#mainmenu li.nav-search .mf-search-results a { display: block; padding: 8px 10px; line-height: 1.35; text-align: left; color: #ddd; font-size: 13px; border-bottom: 1px solid rgba(255, 255, 255, .06); text-transform: none; letter-spacing: 0; }
#mainmenu li.nav-search .mf-search-results a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.mf-search-results .t { display: block; font-weight: 600; color: #fff; }
.mf-search-results .m { display: block; font-size: 11px; color: #8b9dc3; margin-top: 2px; }
.mf-search-empty { padding: 10px; font-size: 13px; color: #8b9dc3; }
@media (max-width: 992px) {
    #mainmenu li.nav-search > a { display: none; }
    #mainmenu li.nav-search .mf-search { display: block; position: static; width: 100%; padding: 10px 15px; background: none; border: 0; box-shadow: none; }
}

/* ---------- EU projekat - sekcija na pocetnoj ---------- */
.mf-eu { position: relative; padding: 90px 0; background: #0f161c url(../images/background/bg-side-1.jpg) center/cover no-repeat fixed; color: #fff; }
.mf-eu-overlay { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(10, 16, 22, .94) 0%, rgba(20, 29, 37, .9) 60%, rgba(0, 51, 153, .55) 100%); }
.mf-eu .container { position: relative; z-index: 1; }
.mf-eu h2 { color: #fff; font-size: 40px; margin: 10px 0 20px; }
.mf-eu-badge { display: inline-block; padding: 4px 12px; border: 1px solid var(--mf-accent); color: var(--mf-accent); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; border-radius: 2px; }
.mf-eu-badge.dark { border-color: #555; color: #555; }
.mf-eu-subtitle { font-size: 17px; font-weight: 600; color: var(--mf-accent); margin-bottom: 14px; }
.mf-eu-summary { color: rgba(255, 255, 255, .88); font-size: 15px; line-height: 1.8; }
.mf-eu-logo { display: block; background: #fff; padding: 16px 20px; border-radius: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .3s; }
.mf-eu-logo:hover { transform: translateY(-3px); }
.mf-eu-logo img { display: block; width: 100%; height: auto; }
.mf-eu-program { margin-top: 14px; font-size: 12px; color: rgba(255, 255, 255, .65); line-height: 1.6; }
.mf-eu-facts { list-style: none; margin: 22px 0 26px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; }
.mf-eu-facts li { border-left: 3px solid var(--mf-accent); padding: 4px 0 4px 12px; }
.mf-eu-facts li span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255, 255, 255, .55); }
.mf-eu-facts li strong { display: block; font-size: 14px; color: #fff; font-weight: 600; }
.mf-eu .btn-line { color: #fff; border-color: #fff; }
.mf-eu .btn-line:hover { background: var(--mf-accent); border-color: var(--mf-accent); color: #fff; }
@media (max-width: 767px) { .mf-eu { padding: 60px 0; background-attachment: scroll; } .mf-eu-logo { max-width: 320px; margin: 0 auto 20px; } .mf-eu-program { text-align: center; } .mf-eu h2 { font-size: 30px; } .mf-eu-facts { grid-template-columns: 1fr; } }

/* ---------- EU projekat - stranica ---------- */
.mf-eu-page-logo { background: #fff; padding: 20px; border-radius: 4px; border: 1px solid #e3e3e3; text-align: center; margin-bottom: 30px; }
.mf-eu-page-logo p { font-size: 12px; color: #666; margin: 14px 0; }
/* dugme "Zvanicna stranica projekta": tema ima nowrap + padding 30px + razmak slova 2px, pa izlazi iz okvira na uzim sirinama */
.mf-eu-page-logo .btn-line, .mf-eu-page-logo a.btn-line { display: block; width: 100%; max-width: 100%; box-sizing: border-box; white-space: normal; padding: 8px 14px; line-height: 1.5; letter-spacing: 1px; font-size: 11px; margin: 0; }
.mf-eu .mf-eu-btn { white-space: normal; max-width: 100%; }
.mf-eu-box h2 { margin: 12px 0 4px; }
.mf-eu-box .mf-eu-subtitle { color: #555; font-size: 16px; margin-bottom: 10px; }
.mf-eu-table { width: 100%; margin: 16px 0 4px; font-size: 14px; }
.mf-eu-table th { width: 34%; text-align: left; padding: 8px 10px 8px 0; color: #777; font-weight: 500; vertical-align: top; border-bottom: 1px solid #ddd; }
.mf-eu-table td { padding: 8px 0; vertical-align: top; border-bottom: 1px solid #ddd; }
.mf-eu-disclaimer { background: #fff7e0; border-left: 4px solid #f5b400; padding: 16px 20px; font-size: 13px; color: #555; margin-bottom: 40px; line-height: 1.6; }
.mf-eu-disclaimer em { color: #888; }
.mf-eu-page .padding30 { color: #444; }

/* ---------- Footer EU strip ---------- */
.footer-eu { position: relative; z-index: 1; background: #101820; border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 40px; }
.footer-eu-content { max-width: 1600px; margin: 0 auto; display: flex; align-items: center; gap: 24px; }
.footer-eu-logo img { height: 60px; width: auto; display: block; background: #fff; padding: 6px 10px; border-radius: 2px; }
.footer-eu-text { margin: 0; font-size: 12.5px; line-height: 1.55; color: #b8c4d6; }
.footer-eu-text a { color: var(--mf-accent); text-decoration: underline; }
@media (max-width: 768px) { .footer-eu { padding: 18px 20px; } .footer-eu-content { flex-direction: column; text-align: center; gap: 12px; } }

/* ---------- Interaktivna mapa ---------- */
#mf-world-map { width: 100%; height: 380px; margin-top: 20px; }
#mf-world-map svg { overflow: visible; }
.jvm-tooltip { background: #141d25 !important; color: #fff !important; border: 1px solid var(--mf-accent) !important; border-radius: 3px !important; font-family: inherit !important; font-size: 13px !important; padding: 6px 10px !important; box-shadow: 0 6px 20px rgba(0, 0, 0, .35) !important; }
.mf-map-count { font-size: 13px; color: #999; }
.mf-map-count strong { font-size: 22px; color: var(--mf-accent); margin-right: 4px; }
@media (max-width: 991px) { #mf-world-map { height: 300px; } }
@media (max-width: 767px) { #mf-world-map { height: 220px; } }

/* ---------- Newsletter ---------- */
.mf-newsletter { padding: 70px 0; background: #141d25; color: #e8eef7; border-top: 3px solid var(--mf-accent); }
.mf-newsletter h2 { color: #fff; margin-bottom: 14px; }
.mf-newsletter p { color: #b8c5d9; }
.mf-nl-row { display: flex; gap: 10px; margin-top: 8px; }
.mf-nl-row .form-control { flex: 1; height: 46px; background: #0f161c; border: 1px solid #3a4652; color: #fff; }
.mf-nl-row .form-control:focus { border-color: var(--mf-accent); box-shadow: none; }
.mf-nl-row .btn-line { color: #fff; border-color: #fff; height: 46px; padding: 0 22px; line-height: 44px; white-space: nowrap; }
.mf-nl-row .btn-line:hover { background: var(--mf-accent); border-color: var(--mf-accent); }
.mf-nl-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 12.5px; color: #b8c5d9; font-weight: 400; cursor: pointer; }
.mf-nl-consent input { margin-top: 3px; }
.mf-newsletter .mf-err { display: none; color: #ff9a9b; font-size: 12px; margin-top: 4px; }
.mf-newsletter .mf-err:not(:empty) { display: block; }
@media (max-width: 767px) { .mf-newsletter { padding: 50px 0; } .mf-nl-row { flex-direction: column; } }

/* ---------- Samostalne stranice (potvrda / odjava) ---------- */
.mf-standalone-box { margin: 40px 0 80px; padding: 40px 30px; background: #fff; border-radius: 4px; border-top: 4px solid var(--mf-accent); color: #444; }
.mf-standalone-box i { font-size: 48px; color: var(--mf-accent); margin-bottom: 16px; }
.mf-standalone-box.is-err i { color: #e57507; }
.mf-standalone-box p { font-size: 16px; margin-bottom: 24px; }

/* ---------- Nadjacavanje pravila teme (.de_light section { background:#fff }) ---------- */
body section.mf-newsletter { background: #141d25 !important; }
body section.mf-eu { background-color: #0f161c !important; }
.mf-nl-row .mf-btn, .mf-nl-row .mf-btn:focus { background: transparent; color: #fff; border: 1px solid #fff !important; outline: none; }
.mf-nl-row .mf-btn:hover { background: var(--mf-accent); color: #fff; border-color: var(--mf-accent) !important; }
.mf-nl-row .mf-btn[disabled] { opacity: .6; }

/* ---------- Responzivnost: tabela EU projekta na telefonu ---------- */
@media (max-width: 767px) {
    .mf-eu-table, .mf-eu-table tbody, .mf-eu-table tr, .mf-eu-table th, .mf-eu-table td { display: block; width: 100%; }
    .mf-eu-table th { border-bottom: 0; padding: 10px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
    .mf-eu-table td { padding: 0 0 10px; }
    .mf-eu-page-logo { padding: 14px; }
    .mf-eu-box h2 { font-size: 28px; }
    .mf-standalone-box { margin: 20px 0 50px; padding: 30px 18px; }
}

/* ---------- Sertifikati: sve plocice istih dimenzija (format dokumenta 3:4) ---------- */
#certificates-gallery figure.pic-hover { margin: 0; background: #fff; border: 1px solid #e2e2e2; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
#certificates-gallery figure.pic-hover > a { display: block; position: relative; padding-top: 133%; overflow: hidden; }
#certificates-gallery figure.pic-hover img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 6px; background: #fff; }
#certificates-gallery figure.pic-hover .bg-overlay { z-index: 2; }

/* ---------- Kontakt forma: izgled kao originalna tema (#contact_form pravila iz style.css) ---------- */
.mf-contact { margin-top: 20px; }
.mf-contact .mf-field { margin-bottom: 0; padding-bottom: 15px; }
.mf-contact input.form-control, .mf-contact textarea.form-control { padding: 10px; margin-bottom: 20px; height: auto; color: #fff; border: solid 1px rgba(0, 0, 0, .3); background: rgba(0, 0, 0, .2); border-radius: 0 !important; }
.de_light .mf-contact input.form-control, .de_light .mf-contact textarea.form-control { border: solid 1px #ddd; background: #fff; color: #333 !important; }
.mf-contact textarea.form-control { height: 165px; min-height: 165px; }
.mf-contact .mf-btn { background: none; }
.mf-contact .mf-btn:after { content: none; }
.mf-contact .mf-btn:hover { color: #fff !important; background: #111; border-color: #111; }
