/*
Theme Name:     AgroPrognoza Child
Theme URI:      https://agroprognoza.rs
Description:    Blocksy child tema za agroprognoza.rs — agrometeorološka prognoza za Srbiju
Author:         AgroPrognoza
Author URI:     https://agroprognoza.rs
Template:       blocksy
Version:        1.0.0
Text Domain:    agroprognoza-child
*/

/* Parent stilovi se učitavaju kroz inc/enqueue.php (filemtime cache-busting).
   Landing/waitlist stilovi žive u assets/css/ap-landing.css. */

/* === Globalni font: Nunito (tekst) + Space Grotesk (cifre/%/°) ===
   VM trik: SG je u stacku ISPRED Nunito-a, a @font-face unicode-range
   ograničava SG samo na cifre. Self-host u assets/fonts (ap-fonts.css). */
:root {
    --theme-font-family: 'Space Grotesk', 'Nunito', system-ui, -apple-system, sans-serif !important;
    --theme-button-font-family: var(--theme-font-family) !important;
}
html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================================================
   AP CORE TEMA (site-wide): CSS varijable + dark mode + header + footer hub.
   Landing-specifične sekcije žive u assets/css/ap-landing.css (uslovno).
   ======================================================================== */
:root {
    --ap-bg-primary: #ffffff;
    --ap-bg-secondary: #f4f6ef;
    --ap-text-primary: #1a2e1a;
    --ap-text-secondary: #44553f;
    --ap-text-muted: #6b7a63;
    --ap-border-color: #d7ddcb;
    --ap-card-bg: #ffffff;
    --ap-green: #16a34a;
    --ap-green-dark: #15803d;
    --ap-lime: #65a30d;
    --ap-amber: #f59e0b;
    --ap-gold: #fbbf24;
    --ap-sky: #0ea5e9;
    --ap-gradient-primary: linear-gradient(135deg, #16a34a 0%, #65a30d 100%);
    --ap-gradient-summer: linear-gradient(135deg, #fbbf24 0%, #a3e635 100%);
    --ap-radius: 14px;
    --ap-radius-small: 8px;
    --ap-transition: all 0.2s ease;
}
[data-theme="dark"] {
    --ap-bg-primary: #0f172a;
    --ap-bg-secondary: #16211c;
    --ap-text-primary: #f0f7ec;
    --ap-text-secondary: #c3d2bc;
    --ap-text-muted: #8fa387;
    --ap-border-color: #2e3d33;
    --ap-card-bg: #18251e;
}
[data-theme="dark"] body {
    background: var(--ap-bg-primary, #0f172a);
    color: var(--ap-text-secondary, #c3d2bc);
}
[data-theme="dark"] .entry-content,
[data-theme="dark"] .ct-page-title h1,
[data-theme="dark"] main h1,
[data-theme="dark"] main h2,
[data-theme="dark"] main h3 { color: var(--ap-text-primary, #f0f7ec); }

/* --- Header: glassmorphism (VM stil) + dark varijanta --- */
header.ct-header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(120, 140, 110, 0.22);
}
header.ct-header [data-row] > div { background: transparent; }
[data-theme="dark"] header.ct-header { background: rgba(15, 25, 19, 0.88); border-bottom-color: rgba(120, 140, 110, 0.3); }
[data-theme="dark"] .ct-header .site-title a,
[data-theme="dark"] .ct-header a,
[data-theme="dark"] .ct-header .ct-menu-toggle { color: #e5efe0 !important; }
.ct-header .site-title a { font-weight: 800; }

/* ------------------------------------------------------------------------
   FOOTER HUB (.ap-fhub) — port VM .vm-fhub, tamno zelena u OBA moda
   Render: inc/footer-hub.php (hook blocksy:footer:before)
   ------------------------------------------------------------------------ */
.ap-fhub {
    background: #0f231a;
    border-top: 1px solid rgba(163, 230, 53, 0.28);
    padding: 46px 24px 40px;
    margin-top: 48px;
}
.ap-fhub__inner {
    max-width: 1290px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 0.9fr 1.2fr;
    gap: 48px;
    align-items: start;
}
.ap-fhub__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ap-fhub__logo {
    flex: none;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: rgba(74, 222, 128, 0.10);
    border: 1px solid rgba(74, 222, 128, 0.3);
}
.ap-fhub__brand-txt { display: flex; flex-direction: column; gap: 2px; }
.ap-fhub__title { font-size: 1.05rem; font-weight: 800; color: #f0f7ec; line-height: 1.2; }
.ap-fhub__tag { font-size: 0.82rem; font-weight: 600; color: #a3e635; line-height: 1.35; }
.ap-fhub__head { display: block; font-size: 1rem; font-weight: 800; color: #f0f7ec; margin-bottom: 14px; }
.ap-fhub__desc { margin: 0 0 18px; font-size: 0.92rem; line-height: 1.65; color: #9db392; text-align: left !important; }
.ap-fhub__desc b { color: #dcefd2; }
.ap-fhub__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ap-fhub__chip {
    display: inline-flex; align-items: baseline; gap: 5px;
    padding: 7px 13px;
    border-radius: 10px;
    background: rgba(30, 45, 35, 0.6);
    border: 1px solid rgba(157, 179, 146, 0.22);
    font-size: 0.82rem; font-weight: 600; color: #9db392;
    white-space: nowrap;
}
.ap-fhub__chip b { color: #f0f7ec; font-weight: 800; font-variant-numeric: tabular-nums; }

.ap-fhub__menu { list-style: none; margin: 0; padding: 0; display: block; }
.ap-fhub__menu li { margin: 0; padding: 0; border-bottom: 1px solid rgba(157, 179, 146, 0.14); }
.ap-fhub__menu li:last-child { border-bottom: none; }
.ap-fhub__menu li > a {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 2px;
    font-size: 0.92rem; font-weight: 600;
    color: #c3d2bc !important;
    -webkit-text-fill-color: #c3d2bc;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: color 0.15s ease, padding-left 0.15s ease;
}
.ap-fhub__menu li > a:hover,
.ap-fhub__menu li > a:focus {
    color: #a3e635 !important;
    -webkit-text-fill-color: #a3e635;
    padding-left: 6px;
}

.ap-fhub__btns { display: flex; flex-wrap: wrap; gap: 10px; }
a.ap-fhub__btn,
a.ap-fhub__btn:link, a.ap-fhub__btn:visited, a.ap-fhub__btn:hover, a.ap-fhub__btn:focus, a.ap-fhub__btn:active {
    color: #bef264 !important;
    -webkit-text-fill-color: #bef264;
    text-decoration: none !important;
    border-bottom: none !important;
}
a.ap-fhub__btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(163, 230, 53, 0.10);
    border: 1px solid rgba(163, 230, 53, 0.35);
    font-size: 0.95rem; font-weight: 800;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
a.ap-fhub__btn:hover {
    background: rgba(163, 230, 53, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(101, 163, 13, 0.3);
}

/* Postojeći Blocksy footer — tamni restyle da se nastavi na hub */
footer.ct-footer { background: #0f231a !important; }
footer.ct-footer [data-row] { border-color: rgba(157, 179, 146, 0.14) !important; }
footer.ct-footer [data-column="menu"] { display: none !important; }
footer.ct-footer .ct-footer-copyright,
footer.ct-footer .ct-footer-copyright p { color: #9db392 !important; font-size: 0.85rem; }
footer.ct-footer .ct-footer-copyright a { color: #c3d2bc !important; border-bottom: none !important; }
footer.ct-footer .ct-footer-copyright a:hover { color: #a3e635 !important; }

/* Dark mode — ista zelena pozadina, blaži top border */
[data-theme="dark"] .ap-fhub { background: #0c1d15; border-top-color: rgba(163, 230, 53, 0.2); }
[data-theme="dark"] footer.ct-footer { background: #0c1d15 !important; }

@media (max-width: 980px) {
    .ap-fhub__inner { grid-template-columns: 1fr 1fr; gap: 34px; }
    .ap-fhub__col--about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .ap-fhub { padding: 34px 18px 30px; margin-top: 36px; }
    .ap-fhub__inner { grid-template-columns: 1fr; gap: 30px; }
    .ap-fhub__desc { font-size: 0.9rem; }
    .ap-fhub__chip { font-size: 0.8rem; padding: 6px 11px; }
}
