/*==========================================================================
  Izobrazevanja — Kadence-Specific Overrides
  Targets Kadence classes to harmonize the child theme with the parent.
  Loaded AFTER izobrazevanja-components.css for highest specificity.
==========================================================================*/

/* ========== Global Kadence Button Overrides ========== */
.wp-block-button__link,
.kb-button,
.entry-content .wp-block-button__link {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: var(--border-radius-10);
    font-family: var(--title-font);
    font-weight: 600;
    padding: 12px 32px;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.wp-block-button__link:hover,
.kb-button:hover,
.entry-content .wp-block-button__link:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

/* Secondary button variant */
.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.is-style-outline .wp-block-button__link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* ========== Kadence Heading Overrides ========== */
body.izobrazevanja-active h1,
body.izobrazevanja-active h2,
body.izobrazevanja-active h3,
body.izobrazevanja-active h4,
body.izobrazevanja-active h5,
body.izobrazevanja-active h6 {
    font-family: var(--title-font);
    color: var(--secondary-color);
}

body.izobrazevanja-active .entry-content h2 {
    color: var(--secondary-color);
    font-family: var(--title-font);
    font-weight: 700;
}

/* ========== Kadence Header Overrides ========== */
body.izobrazevanja-active .site-header {
    box-shadow: none;
}

body.izobrazevanja-active .site-branding .site-title {
    font-family: var(--title-font);
    color: var(--secondary-color);
}

/* Nav link colors */
body.izobrazevanja-active .header-navigation .menu > li > a {
    color: var(--secondary-color);
    font-family: var(--body-font);
    font-weight: 500;
}

body.izobrazevanja-active .header-navigation .menu > li > a:hover,
body.izobrazevanja-active .header-navigation .menu > li.current-menu-item > a {
    color: var(--primary-color);
}

/* ========== Mobile Menu / Popup Drawer ========== */
.mobile-toggle-open-container .menu-toggle,
.mobile-toggle-open .menu-toggle-icon {
    color: var(--secondary-color);
}

.popup-drawer .drawer-inner,
.mobile-navigation .menu {
    background: var(--white-color);
}

.mobile-navigation .menu > li > a {
    color: var(--secondary-color);
    font-family: var(--body-font);
    font-weight: 500;
    font-size: 18px;
    padding: 12px 20px;
}

.mobile-navigation .menu > li > a:hover,
.mobile-navigation .menu > li.current-menu-item > a {
    color: var(--primary-color);
}

.popup-drawer .drawer-header .drawer-toggle {
    color: var(--secondary-color);
}

/* ========== Kadence Footer Overrides ========== */
body.izobrazevanja-active .site-footer {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

body.izobrazevanja-active .site-footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

body.izobrazevanja-active .site-footer a:hover {
    color: var(--primary-color);
}

body.izobrazevanja-active .site-footer h1,
body.izobrazevanja-active .site-footer h2,
body.izobrazevanja-active .site-footer h3,
body.izobrazevanja-active .site-footer h4,
body.izobrazevanja-active .site-footer h5,
body.izobrazevanja-active .site-footer h6 {
    color: var(--white-color);
}

/* --- Top Footer: spacing --- */
body.izobrazevanja-active .site-top-footer-wrap {
    padding: 80px 0 60px;
}

/* Columns with multiple items: stack vertically */
body.izobrazevanja-active .site-top-footer-wrap .site-footer-top-section-1,
body.izobrazevanja-active .site-top-footer-wrap .site-footer-top-section-2 {
    flex-direction: column;
}

/* Grid columns: fill available space evenly instead of fixed 288px */
body.izobrazevanja-active .site-top-footer-inner-wrap {
    grid-template-columns: repeat(4, 1fr);
}

/* --- Bottom Footer: darker background --- */
body.izobrazevanja-active .site-bottom-footer-wrap {
    background-color: var(--footer-bg-dark);
    padding: 18px 0 17px;
}

body.izobrazevanja-active .site-bottom-footer-inner-wrap {
    padding: 0 !important;
}


/* --- Widget titles: orange underline effect ---
   Replicates .underline-title from reference (style.css:225-242).
   Customizer handles color/font; CSS adds the underline pseudo-element. */
body.izobrazevanja-active .site-top-footer-wrap .widget-title,
body.izobrazevanja-active .site-top-footer-wrap .footer-widget-area h4 {
    position: relative;
    font-family: var(--title-font);
    font-size: 22px;
    line-height: 32px;
    font-weight: 700;
    color: var(--white-color) !important;
    text-transform: none;
    padding-bottom: 12px;
    margin-bottom: 22px;
}

body.izobrazevanja-active .site-top-footer-wrap .widget-title::after,
body.izobrazevanja-active .site-top-footer-wrap .footer-widget-area h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 51px;
    height: 1px;
    background-color: var(--primary-color);
}

/* --- Social icons: gradient circles ---
   Customizer sets Filled + border-radius; CSS upgrades to gradient bg. */
body.izobrazevanja-active .site-footer .footer-social-inner-wrap {
    gap: 10px;
    flex-wrap: nowrap;
}

body.izobrazevanja-active .site-footer .footer-social-inner-wrap .social-button {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--gradient-color) !important;
    color: var(--white-color) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: none !important;
}

body.izobrazevanja-active .site-footer .footer-social-inner-wrap .social-button:hover {
    background-size: 200% 100%;
    background-position: right center;
}

body.izobrazevanja-active .site-footer .footer-social-inner-wrap .social-button svg {
    width: 16px;
    height: 16px;
    fill: var(--white-color);
}

/* --- Footer navigation: vertical list with cross markers ---
   Reference: .our-link-content ul li (style.css:2945-2981) */
body.izobrazevanja-active .footer-navigation .menu {
    flex-direction: column;
    gap: 0;
}

body.izobrazevanja-active .footer-navigation .menu > li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 5px;
}

body.izobrazevanja-active .footer-navigation .menu > li > a {
    padding: 0;
    color: rgba(255, 255, 255, 0.8);
    display: inline-block;
}

body.izobrazevanja-active .footer-navigation .menu > li > a:hover {
    color: var(--primary-color);
}

/* Active/current page link must stay visible on dark bg */
body.izobrazevanja-active .footer-navigation .menu > li.current-menu-item > a {
    color: var(--primary-color);
}

/* Cross/plus markers for nav links */
body.izobrazevanja-active .footer-navigation .menu > li::after {
    content: "";
    position: absolute;
    top: 11px;
    left: 0;
    width: 9px;
    height: 1px;
    border-radius: 2px;
    background-color: var(--primary-color);
}

body.izobrazevanja-active .footer-navigation .menu > li::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 4px;
    height: 9px;
    width: 1px;
    border-radius: 2px;
    background-color: var(--primary-color);
}

/* --- Category list (Widget2): same cross markers --- */
body.izobrazevanja-active .site-top-footer-wrap .footer-widget2 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.izobrazevanja-active .site-top-footer-wrap .footer-widget2 ul li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 5px;
}

body.izobrazevanja-active .site-top-footer-wrap .footer-widget2 ul li::after {
    content: "";
    position: absolute;
    top: 11px;
    left: 0;
    width: 9px;
    height: 1px;
    border-radius: 2px;
    background-color: var(--primary-color);
}

body.izobrazevanja-active .site-top-footer-wrap .footer-widget2 ul li::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 4px;
    height: 9px;
    width: 1px;
    border-radius: 2px;
    background-color: var(--primary-color);
}

/* --- Contact Us (Widget3): icon gradient circles ---
   Reference: .contact-info-box (style.css:2987-3018) */
body.izobrazevanja-active .site-top-footer-wrap .footer-widget3 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.izobrazevanja-active .site-top-footer-wrap .footer-widget3 ul li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px !important;
}

body.izobrazevanja-active .site-top-footer-wrap .footer-widget3 ul li:last-child {
    margin-bottom: 0 !important;
}

body.izobrazevanja-active .site-top-footer-wrap .footer-widget3 ul li i {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white-color) !important;
    background: var(--gradient-color);
    font-size: 16px;
    margin-right: 0 !important;
}

body.izobrazevanja-active .site-top-footer-wrap .footer-widget3 ul li a {
    color: rgba(255, 255, 255, 0.8);
    word-break: break-word;
}

body.izobrazevanja-active .site-top-footer-wrap .footer-widget3 ul li a:hover {
    color: var(--primary-color);
}

/* --- Bottom footer: configuration-agnostic flex stacking.
   Strategy: force flex-column-center at EVERY nesting level (row → section
   → widget-area → inner). No matter how the Kadence customizer is configured
   — 1/2/3/4/5/6 columns, any layout-* variant, widgets in any section,
   empty sections in between — every widget ends up centered and stacked in
   one vertical column. Spacing comes from widget margins (not flex gap), so
   empty/zero-height sections contribute no visible space. */
body.izobrazevanja-active .site-footer-row-container-inner .site-bottom-footer-inner-wrap,
body.izobrazevanja-active .site-footer-row-container-inner .site-bottom-footer-inner-wrap.site-footer-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    grid-template-columns: none !important;
    text-align: center;
}

/* Every descendant wrapper — sections, widget-areas, inner wraps — becomes
   a centered flex column. This covers every DOM shape Kadence emits. */
body.izobrazevanja-active .site-bottom-footer-inner-wrap .site-footer-section,
body.izobrazevanja-active .site-bottom-footer-inner-wrap .footer-widget-area,
body.izobrazevanja-active .site-bottom-footer-inner-wrap .footer-widget-area-inner,
body.izobrazevanja-active .site-bottom-footer-inner-wrap .footer-html,
body.izobrazevanja-active .site-bottom-footer-inner-wrap .footer-html-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    min-width: 0;
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
}

/* Vertical rhythm via widget margins — empty sections contribute nothing,
   so spacing is driven by the widgets that actually exist. */
body.izobrazevanja-active .site-bottom-footer-wrap .footer-html,
body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 {
    margin: 4px 0 !important;
}

body.izobrazevanja-active .site-bottom-footer-wrap .footer-html p {
    color: var(--white-color);
    margin: 0;
    text-align: center;
}

body.izobrazevanja-active .site-bottom-footer-wrap .footer-html a {
    color: var(--primary-color);
}

body.izobrazevanja-active .site-bottom-footer-wrap .footer-html a:hover {
    color: var(--white-color);
}

/* Policy-links widget.
   The block widget renders raw <a> children inside <section.widget.widget_block>
   (no <ul>, no <li>). Flex it so the links auto-space with a single gap rule
   and stay on one line. Covers both block widgets and nav-menu widgets. */
body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4,
body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 .footer-widget-area-inner,
body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 section.widget,
body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 .widget_block,
body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 ul,
body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 .menu {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 li {
    margin: 0;
    padding: 0;
    position: relative;
}

/* Policy links: orange dot before each link (works for <a> and <li>) */
body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 a {
    position: relative;
    padding-left: 18px;
    color: var(--white-color);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 9px;
    height: 9px;
    background: var(--primary-color);
    border-radius: 50%;
}

body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 a:hover {
    color: var(--primary-color);
}

/* --- Footer description text (column 1) --- */
body.izobrazevanja-active .site-top-footer-wrap .footer-widget1 p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    line-height: 25px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    body.izobrazevanja-active .site-top-footer-wrap {
        padding: 60px 0 50px;
    }

    body.izobrazevanja-active .site-top-footer-wrap .widget-title,
    body.izobrazevanja-active .site-top-footer-wrap .footer-widget-area h4 {
        font-size: 20px;
        line-height: 28px;
    }
}

/* Kadence's parent theme adds `margin-left: 30px` to the 2nd widget in any
   2-item footer row (`ft-ro-dir-row .footer-section-inner-items-2 .footer-widget-area`).
   On mobile the rows stack vertically but that margin stays, leaving the
   social icons / navigation indented from the other stacked columns.
   Zero it out at mobile breakpoints so every column left-aligns. */
@media (max-width: 991px) {
    body.izobrazevanja-active .ft-ro-dir-row .footer-section-inner-items-2 .footer-widget-area,
    body.izobrazevanja-active .ft-ro-dir-row .footer-section-inner-items-3 .footer-widget-area,
    body.izobrazevanja-active .ft-ro-dir-row .footer-section-inner-items-4 .footer-widget-area {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 767px) {
    body.izobrazevanja-active .site-top-footer-wrap {
        padding: 40px 0 40px;
    }

    body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4,
    body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 .menu,
    body.izobrazevanja-active .site-bottom-footer-wrap .footer-navigation .menu {
        gap: 16px;
    }
}

@media (max-width: 379px) {
    body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 a,
    body.izobrazevanja-active .site-bottom-footer-wrap .footer-navigation .menu > li > a {
        font-size: 13px;
        padding-left: 14px;
    }
    body.izobrazevanja-active .site-bottom-footer-wrap .footer-widget4 a::before,
    body.izobrazevanja-active .site-bottom-footer-wrap .footer-navigation .menu > li > a::before {
        width: 7px;
        height: 7px;
    }
    body.izobrazevanja-active .site-bottom-footer-wrap .footer-html p {
        font-size: 13px;
    }
}

/* ========== Site Background — white, not grey ========== */
body.izobrazevanja-active {
    background-color: var(--white-color);
}

/* ========== Kadence Content Area ========== */
body.izobrazevanja-active .entry-content {
    font-family: var(--body-font);
    color: var(--common-color);
    font-size: 15px;
    line-height: 1.67;
}

body.izobrazevanja-active .entry-content a {
    color: var(--primary-color);
}

body.izobrazevanja-active .entry-content a:hover {
    color: var(--secondary-color);
}

/* ========== Block Layout Overrides ========== */
body.izobrazevanja-active .wp-block-group.alignfull {
    padding-left: 0;
    padding-right: 0;
}

/* ========== Kadence Sidebar ========== */
body.izobrazevanja-active .widget-area .widget-title {
    font-family: var(--title-font);
    color: var(--secondary-color);
    font-weight: 700;
}

body.izobrazevanja-active .widget-area a {
    color: var(--common-color);
}

body.izobrazevanja-active .widget-area a:hover {
    color: var(--primary-color);
}

/* ========== Kadence Breadcrumbs ========== */
body.izobrazevanja-active .kadence-breadcrumbs {
    font-family: var(--body-font);
    font-size: 14px;
}

body.izobrazevanja-active .kadence-breadcrumbs a {
    color: var(--white-color);
    opacity: 0.8;
}

body.izobrazevanja-active .kadence-breadcrumbs a:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* ========== Back to Top ========== */
.iz-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    font-size: 18px;
}

.iz-back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.iz-back-to-top:hover {
    background-color: var(--secondary-color);
}

/* ========== Responsive Spacing Overrides ==========
   `--sec-space-120` is the section vertical rhythm (default 120px).
   Scale it down on smaller viewports so sections don't feel empty on mobile.
   Components.css also defines a 991px step at 80px (kept for the editor). */
@media (max-width: 1199px) {
    :root {
        --sec-space-120: 96px;
    }
}

@media (max-width: 991px) {
    :root {
        --sec-space-120: 72px;
    }
}

@media (max-width: 767px) {
    :root {
        --sec-space-120: 56px;
    }
}

@media (max-width: 575px) {
    :root {
        --sec-space-120: 40px;
    }
}

/* ========== Kadence Accordion Block — theme palette ========== */
.izobrazevanja-active .kt-accordion-wrap .kt-accordion-header {
    background-color: var(--bg-color);
    font-family: var(--title-font);
}

.izobrazevanja-active .kt-accordion-wrap .kt-accordion-header:hover,
.izobrazevanja-active .kt-accordion-wrap .kt-accordion-header.kt-accordion-header-active {
    background-color: var(--secondary-color);
    color: #fff;
}

/* ========== Kadence Info Box Block — theme styling ========== */
.izobrazevanja-active .kt-info-box-wrap .kt-blocks-info-box-title {
    font-family: var(--title-font);
    color: var(--secondary-color);
}

.izobrazevanja-active .kt-info-box-wrap .kt-blocks-info-box-text {
    font-family: var(--body-font);
    color: var(--common-color);
}

/* ========== Kadence Form Block — theme button styles ========== */
.izobrazevanja-active .kadence-blocks-form .kb-submit-btn {
    background-color: var(--secondary-color);
    border-radius: 10px;
    font-family: var(--title-font);
}

.izobrazevanja-active .kadence-blocks-form .kb-submit-btn:hover {
    background-color: var(--primary-color);
}

/* ========== Newsletter CF7 Form — inline layout ==========
   Desktop: input and button sit side-by-side, joined into a pill via split
   border-radius (10px 0 0 10px + 0 10px 10px 0). On mobile they stack, so
   switch to column direction and give each element full rounding + gap. */
.iz-newsletter-section .wpcf7 .iz-newsletter-input-wrap {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.iz-newsletter-section .wpcf7 .iz-newsletter-input-wrap .wpcf7-email {
    flex: 1;
    min-width: 0;
    padding: 14px 20px;
    border: none;
    border-radius: 10px 0 0 10px;
    font-size: 16px;
    outline: none;
}

.iz-newsletter-section .wpcf7 .iz-newsletter-input-wrap .wpcf7-submit {
    padding: 14px 30px;
    border: none;
    border-radius: 0 10px 10px 0;
    background: var(--secondary-color);
    color: var(--white-color);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.iz-newsletter-section .wpcf7 .iz-newsletter-input-wrap .wpcf7-submit:hover {
    background: var(--primary-color);
}

@media (max-width: 575px) {
    .iz-newsletter-section .wpcf7 .iz-newsletter-input-wrap {
        flex-direction: column;
        gap: 12px;
    }
    .iz-newsletter-section .wpcf7 .iz-newsletter-input-wrap .wpcf7-email {
        width: 100%;
        border-radius: 10px;
    }
    .iz-newsletter-section .wpcf7 .iz-newsletter-input-wrap .wpcf7-submit {
        width: 100%;
        border-radius: 10px;
    }
}

.iz-newsletter-section .wpcf7 .wpcf7-response-output {
    color: var(--white-color);
    border-color: var(--white-color);
    text-align: center;
}

/* ========== Kadence Pattern Container Fix ========== */
body.izobrazevanja-active .iz-pattern-section .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}
