/* =====================================================================
   Hemija za 10 — "Periodni" editorial chemistry theme
   Warm paper · deep ink · emerald + flame · serif display · lab mono
   Loaded AFTER meyawo.css to fully re-skin without touching the base.
   ===================================================================== */

:root {
    --paper:      #f6f4ec;   /* warm paper canvas */
    --paper-2:    #efece1;   /* deeper paper for alt blocks */
    --surface:    #fffdf7;   /* card surface */
    --ink:        #15231d;   /* deep green-black */
    --ink-soft:   #3c4a43;
    --muted:      #6b7770;
    --emerald:    #0fae73;
    --emerald-d:  #0a8a5b;
    --emerald-l:  #6fe0a8;
    --flame:      #ff6a3d;   /* warm pop accent */
    --flame-d:    #e8522a;
    --line:       rgba(21, 35, 29, .12);
    --line-soft:  rgba(21, 35, 29, .07);
    --shadow-sm:  0 2px 14px rgba(21, 35, 29, .06);
    --shadow:     0 22px 48px -22px rgba(21, 45, 33, .28);
    --shadow-lg:  0 36px 80px -28px rgba(15, 70, 48, .32);
    --radius:     18px;
    --radius-lg:  26px;
    --serif:      'Fraunces', Georgia, 'Times New Roman', serif;
    --sans:       'Plus Jakarta Sans', system-ui, sans-serif;
    --mono:       'Space Mono', ui-monospace, monospace;
    --grad-em:    linear-gradient(120deg, #12b878 0%, #0a8a5b 100%);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
    overflow-x: hidden;
    font-family: var(--sans) !important;
    color: var(--ink) !important;
    background-color: var(--paper) !important;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(21,35,29,.05) 1px, transparent 0);
    background-size: 26px 26px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.7;
}

h1,h2,h3,h4,h5,h6,.section-title,.header-title { font-family: var(--serif) !important; letter-spacing: -.01em; }
p { color: var(--muted); }
b, strong { color: var(--ink); font-weight: 700; }
em { font-style: italic; }

::selection      { background: var(--flame); color: #fff; }
::-moz-selection { background: var(--flame); color: #fff; }

/* mono "lab" label utility */
.mono-label {
    font-family: var(--mono); font-size: .72rem; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
}

/* ---------- Scroll-reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); will-change: opacity, transform; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity:1 !important; transform:none !important; transition:none !important; } }

/* ---------- Navbar (dark text on the light hero, always) ---------- */
.custom-navbar { font-family: var(--sans) !important; padding: .2rem 0; }
.custom-navbar .container { min-height: 80px; }
.custom-navbar .logo {
    font-family: var(--serif) !important; font-weight: 900 !important;
    color: var(--ink) !important; letter-spacing: -.02em; text-shadow: none;
}
.custom-navbar .logo::after { content: "."; color: var(--flame); }
.custom-navbar .nav .item { margin: 0 2px; }
.custom-navbar .nav .item .link {
    color: var(--ink-soft) !important; font-weight: 600 !important; font-size: .92rem;
    padding: 8px 13px; border-radius: 10px; text-shadow: none; transition: all .2s ease;
}
.custom-navbar .nav .item .link:hover,
.custom-navbar .nav .item .link.active { color: var(--emerald-d) !important; background: rgba(15,174,115,.1); }

.custom-navbar.affix {
    background: rgba(246,244,236,.85) !important;
    backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line) !important; box-shadow: 0 10px 30px -22px rgba(21,45,33,.5);
}
.custom-navbar.affix .container { min-height: 64px; }
.custom-navbar.affix .logo { color: var(--ink) !important; }
.custom-navbar .hamburger-inner,
.custom-navbar .hamburger-inner::before,
.custom-navbar .hamburger-inner::after { background: var(--ink) !important; }

@media (min-width: 992px) {
    .custom-navbar .nav .item { opacity:1 !important; visibility:visible !important; transform:none !important; }
    .custom-navbar .hamburger { display:none !important; }
}
@media (max-width: 991px) {
    .custom-navbar .nav { background: var(--surface) !important; border-radius: 0 0 16px 16px !important; box-shadow: var(--shadow); padding: 10px !important; }
    .custom-navbar .nav .item .link, .custom-navbar.affix .nav .item .link { color: var(--ink) !important; border-radius: 10px; }
}

/* ---------- Hero — light editorial ---------- */
.header {
    min-height: 100vh;
    background-image: none !important;
    background-color: var(--paper) !important;
    overflow: hidden;
    text-align: left;
    justify-content: flex-start !important;
}
.header .overlay {
    background:
        radial-gradient(80% 60% at 100% 0%, rgba(15,174,115,.14), transparent 60%),
        radial-gradient(70% 60% at 0% 100%, rgba(255,106,61,.10), transparent 55%);
}
.header .header-content {
    max-width: 1140px; width: 100%; margin: 0 auto; padding: 0 24px;
    text-align: left; z-index: 3;
}
.header .header-title .up,
.header .header-content > .up {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: .8rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--emerald-d) !important;
    background: rgba(15,174,115,.1); border: 1px solid rgba(15,174,115,.22);
    padding: 8px 16px; border-radius: 999px; margin-bottom: 26px !important;
}
.header .header-content > .up::before { content: "●"; color: var(--flame); font-size: .7em; }
.header .header-title { margin: 0; }
.header .header-title .down {
    display: block;
    font-family: var(--serif) !important;
    color: var(--ink) !important;
    font-weight: 600 !important;
    font-size: clamp(40px, 7vw, 88px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.025em;
    max-width: 16ch;
    text-shadow: none;
    -webkit-text-fill-color: currentColor;
    background: none;
}
.header .header-title .down em {
    font-style: italic; font-weight: 500;
    color: var(--emerald-d);
    position: relative;
}
.header .header-title .down em::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: .08em; height: .09em;
    background: var(--flame); border-radius: 2px; opacity: .85;
}
.header .header-subtitle {
    display: block !important;
    font-family: var(--sans) !important;
    color: var(--ink-soft) !important;
    opacity: 1 !important; font-weight: 500;
    font-size: clamp(15px, 1.7vw, 20px) !important;
    letter-spacing: 0 !important;
    line-height: 1.6;
    max-width: 56ch;
    margin-top: 26px !important;
    background: none; border: 0; padding: 0; border-radius: 0;
}

@media (max-width: 991px) { .header-content { padding-left: 22px !important; padding-right: 22px !important; } }

/* periodic-tile decorations floating in the hero */
.hero-deco { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.el-tile {
    position: absolute;
    width: 104px; height: 116px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    color: var(--ink);
    animation: tileFloat 9s ease-in-out infinite;
}
.el-tile .el-num { font-family: var(--mono); font-size: .72rem; color: var(--muted); align-self: flex-start; margin: 10px 0 0 12px; }
.el-tile .el-sym { font-family: var(--serif); font-weight: 700; font-size: 2.4rem; line-height: 1; margin-top: -6px; }
.el-tile .el-name { font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.el-tile.t1 { top: 16%;  right: 9%;  transform: rotate(6deg);  border-bottom: 3px solid var(--emerald); }
.el-tile.t2 { top: 40%;  right: 22%; transform: rotate(-5deg); border-bottom: 3px solid var(--flame); animation-delay: -2s; }
.el-tile.t3 { bottom: 20%;right: 14%; transform: rotate(-9deg); border-bottom: 3px solid var(--emerald); animation-delay: -4s; }
.el-tile.t4 { top: 24%;  right: 33%; transform: rotate(8deg);  border-bottom: 3px solid var(--flame); animation-delay: -6s; opacity: .85; }
@keyframes tileFloat { 0%,100%{ translate: 0 0; } 50%{ translate: 0 -16px; } }
@media (max-width: 1100px) { .el-tile.t4, .el-tile.t2 { display: none; } }
@media (max-width: 820px)  { .hero-deco { opacity: .5; } .el-tile { width: 80px; height: 90px; } .el-tile.t3 { display:none; } }
@media (max-width: 560px)  { .hero-deco { display: none; } }

/* scroll cue */
.scroll-cue { position: absolute; left: 24px; bottom: 30px; z-index: 3; display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-decoration: none !important; }
.scroll-cue::after { content: ""; width: 46px; height: 1px; background: var(--ink); transform-origin: left; animation: cueLine 1.8s ease-in-out infinite; }
@keyframes cueLine { 0%,100%{ transform: scaleX(.4); opacity:.4 } 50%{ transform: scaleX(1); opacity:1 } }

/* hero CTA buttons */
.hero-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; position: relative; z-index: 3; }
.btn-modern {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--sans); font-weight: 700; font-size: 1rem;
    padding: 15px 30px; border-radius: 999px; text-decoration: none !important; border: 0; cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.btn-modern.primary { color: #fff; background: var(--grad-em); box-shadow: 0 16px 34px -14px rgba(10,138,91,.7); }
.btn-modern.primary:hover { transform: translateY(-3px); box-shadow: 0 24px 46px -14px rgba(10,138,91,.8); color: #fff; }
.btn-modern.ghost { color: var(--ink); background: transparent; border: 1.5px solid var(--ink); }
.btn-modern.ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-3px); }

/* ---------- Stats / credentials band ---------- */
.stats-band { max-width: 1140px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 5; transform: translateY(-46px); }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--ink); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 8px; overflow: hidden;
}
.stat { text-align: center; padding: 26px 18px; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 54%; width: 1px; background: rgba(255,255,255,.12); }
.stat-num { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 3.6vw, 50px); line-height: 1; color: #fff; }
.stat-num .u { color: var(--flame); }
.stat-label { font-family: var(--mono); margin: 12px 0 0; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); }
@media (max-width: 767px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(odd)::before { display: none; }
    .stat:nth-child(3)::after, .stat:nth-child(4)::after { content:""; position:absolute; top:0; left:8%; right:8%; height:1px; background:rgba(255,255,255,.12); }
}

/* ---------- Section rhythm + eyebrow ---------- */
.section { padding: 96px 12px; position: relative; }
.section-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-weight: 700; font-size: .72rem;
    letter-spacing: .2em; text-transform: uppercase; color: var(--emerald-d);
    margin-bottom: 16px;
}
.section-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--flame); }
.section-title {
    font-family: var(--serif) !important; font-weight: 600 !important; color: var(--ink) !important;
    font-size: clamp(28px, 4vw, 46px) !important;
    position: relative; display: inline-block; margin-bottom: 8px; padding-bottom: 0;
    letter-spacing: -.02em;
}
.section-title::after { display: none; }

/* Slim separators (the old purple bars) */
section.section-sm.bg-primary:empty {
    background: transparent !important; padding: 0 !important; margin: 0 auto !important;
    position: relative; height: 1px; max-width: 1140px;
}
section.section-sm.bg-primary:empty::before {
    content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

/* ---------- About / bio sections (alternating, editorial) ---------- */
.about { gap: 56px; background: transparent; border: 0; border-radius: 0; padding: 0; box-shadow: none; position: relative; align-items: center; }
.about::before { display: none; }
.about:hover { transform: none; box-shadow: none; }
.about-img-holder { margin-right: 0 !important; min-width: 380px; max-width: 380px; position: relative; }
.about .about-img {
    margin-bottom: 0 !important; border-radius: var(--radius-lg);
    box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; width: 100%;
    border: 6px solid var(--surface);
}
.about-img-holder::before {
    content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1;
    border-radius: var(--radius-lg); border: 1.5px solid var(--emerald); opacity: .5;
}
#obrazovanje .about, #radovi .about { flex-direction: row-reverse; }
#obrazovanje .about-caption, #radovi .about-caption { text-align: left; }
#obrazovanje .about-img-holder::before, #radovi .about-img-holder::before { inset: 18px 18px -18px -18px; border-color: var(--flame); }
.about-caption .section-title { margin-bottom: 18px; }
.about-caption p { font-size: 1.04rem; line-height: 1.95; color: var(--ink-soft); }
.about-caption p b { color: var(--ink); }

@media (max-width: 991px) {
    .about, #obrazovanje .about, #radovi .about { flex-direction: column; text-align: center; gap: 28px; }
    #obrazovanje .about-caption, #radovi .about-caption { text-align: center; }
}
@media (max-width: 767px) {
    .about-img-holder { max-width: 260px; min-width: 100%; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn-modern { justify-content: center; }
}

/* ---------- Service cards ---------- */
#service { background: var(--paper-2); }
#service .row { margin-top: 22px; }
.service-card {
    min-height: auto !important; border: 1px solid var(--line) !important; border-radius: var(--radius) !important;
    background: var(--surface); box-shadow: var(--shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease; height: 100%; margin-bottom: 28px;
    text-align: left;
}
.service-card .body { padding: 34px 28px !important; }
.service-card .body img.icon {
    margin: 0 0 22px !important; width: 40px !important; height: 40px; padding: 14px;
    box-sizing: content-box; border-radius: 14px; background: rgba(15,174,115,.12);
    transition: transform .3s ease;
}
.service-card .body .title { font-family: var(--serif); font-weight: 600; font-size: 1.34rem; color: var(--ink); margin-bottom: 8px; }
.service-card .body .subtitle { position: static !important; opacity: 1 !important; visibility: visible !important; bottom:auto !important; color: var(--muted); margin: 0; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--emerald) !important; }
.service-card:hover .body img.icon { transform: rotate(-6deg) scale(1.06); background: rgba(255,106,61,.14); width:40px !important; margin:0 0 22px !important; }

/* ---------- Pricing ---------- */
.pricing-wrapper { gap: 22px; align-items: stretch; }
.pricing-card {
    border: 1px solid var(--line) !important; border-radius: var(--radius) !important;
    padding: 38px 28px !important; margin: 0 !important; background: var(--surface);
    box-shadow: var(--shadow-sm); display: flex !important; flex-direction: column; text-align: left;
    transition: transform .3s ease, box-shadow .3s ease;
}
.pricing-card-header .pricing-card-icon { width: 44px; height: 44px; margin-bottom: 20px; padding: 14px; border-radius: 14px; background: rgba(15,174,115,.1); box-sizing: content-box; }
.pricing-card-title { font-family: var(--serif); font-weight: 600 !important; font-size: 1.5rem !important; color: var(--ink); }
.pricing-card-list { flex-grow: 1; }
.pricing-card-list p { opacity: 1 !important; color: var(--muted); }
.pricing-card-footer { margin: 24px 0 0 !important; padding-top: 22px; border-top: 1px dashed var(--line); }
.pricing-card-footer span { opacity: 1 !important; color: var(--ink); font-family: var(--serif); font-weight: 600 !important; }
.pricing-card-footer span:first-child { color: var(--muted) !important; font-family: var(--mono); font-weight: 700 !important; font-size: .8rem !important; }
.pricing-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: var(--ink) !important; }
/* highlight middle plan in 3-up tables */
.pricing-wrapper .pricing-card:nth-child(2):not(:last-child) { background: var(--ink); border-color: var(--ink) !important; box-shadow: var(--shadow-lg); position: relative; }
.pricing-wrapper .pricing-card:nth-child(2):not(:last-child)::before {
    content: "Najpopularnije"; position: absolute; top: 20px; right: 20px;
    font-family: var(--mono); font-size: .6rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink); background: var(--emerald-l); padding: 5px 11px; border-radius: 999px;
}
.pricing-wrapper .pricing-card:nth-child(2):not(:last-child) .pricing-card-title,
.pricing-wrapper .pricing-card:nth-child(2):not(:last-child) .pricing-card-footer span { color: #fff !important; }
.pricing-wrapper .pricing-card:nth-child(2):not(:last-child) .pricing-card-list p { color: rgba(255,255,255,.7) !important; }
.pricing-wrapper .pricing-card:nth-child(2):not(:last-child) .pricing-card-footer span:first-child { color: var(--emerald-l) !important; }
.pricing-wrapper .pricing-card:nth-child(2):not(:last-child) .pricing-card-footer { border-top-color: rgba(255,255,255,.2); }
.pricing-wrapper .pricing-card:nth-child(2):not(:last-child) .pricing-card-icon { background: rgba(255,255,255,.12); }
@media (max-width: 767px) { .pricing-wrapper { flex-direction: column; } .pricing-card { width: 100%; } }

/* ---------- Testimonials ---------- */
#testmonial .testimonial-card-body {
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
    box-shadow: var(--shadow-sm); padding: 32px 30px 28px 66px !important; position: relative;
    transition: transform .3s ease, box-shadow .3s ease;
}
#testmonial .testimonial-card-body::before { content: "\201C"; position: absolute; top: 10px; left: 22px; font-family: var(--serif); font-weight: 900; font-size: 76px; line-height: 1; color: var(--emerald); opacity: .35; }
#testmonial .testimonial-card:hover .testimonial-card-body { transform: translateY(-4px); box-shadow: var(--shadow); }
#testmonial .testimonial-card-img { box-shadow: var(--shadow); border: 3px solid var(--surface); object-fit: cover; }
#testmonial .testimonial-card-subtitle { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- Blog / detail cards ---------- */
.blog-card { border: 1px solid var(--line) !important; border-radius: var(--radius) !important; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card-header { min-width: 340px; max-width: 340px; overflow: hidden; }
.blog-card-header .blog-card-img { transition: transform .6s ease; }
.blog-card:hover .blog-card-header .blog-card-img { transform: scale(1.05); }
.blog-card-title { font-family: var(--serif); font-weight: 600 !important; font-size: 1.5rem !important; color: var(--ink); margin-bottom: 18px; }
.blog-card-body { padding: 38px !important; }
.blog-card-body ol { padding-left: 0; list-style: none; counter-reset: c; }
.blog-card-body ol li { counter-increment: c; margin-bottom: 11px; color: var(--ink-soft); padding-left: 38px; position: relative; }
.blog-card-body ol li::before { content: counter(c,decimal-leading-zero); position: absolute; left: 0; top: 1px; font-family: var(--mono); font-size: .8rem; font-weight: 700; color: var(--emerald-d); }

/* ---------- Contact ---------- */
section#contact.bg-primary {
    background: var(--ink) !important; border-radius: var(--radius-lg);
    margin: 70px auto; max-width: 1140px; padding: 60px 30px !important;
    box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
section#contact.bg-primary::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -140px; background: radial-gradient(circle, rgba(15,174,115,.4), transparent 70%); border-radius: 50%; }
section#contact.bg-primary::before { content: ""; position: absolute; width: 300px; height: 300px; left: -120px; bottom: -140px; background: radial-gradient(circle, rgba(255,106,61,.3), transparent 70%); border-radius: 50%; }
#contact .title, #contact h6.title.text-light { font-family: var(--mono); font-weight: 700; font-size: .72rem !important; letter-spacing: .14em; text-transform: uppercase; opacity: .65; color: #fff !important; }
#contact .text-light { color: #fff !important; }
#contact a.text-light { font-family: var(--serif); font-size: 1.1rem; opacity: .95; transition: color .2s ease; word-break: break-word; position: relative; z-index: 2; }
#contact a.text-light:hover { color: var(--emerald-l) !important; text-decoration: none !important; }
#contact p.m-0.text-light { font-family: var(--sans); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line) !important; justify-content: center; }
.footer p, .footer a { color: var(--muted) !important; font-family: var(--mono); font-size: .8rem; }
.footer a { color: var(--emerald-d) !important; font-weight: 700; }
