/*PREVENT "DOUBLE" TITLE BY SONORA*/
head title ~ title {
    display: none;
}

/******************************************************
 * HEADER — TEXT LOGO REPLACEMENT
 ******************************************************/

/* Hide all logo images everywhere */
.qodef-header-logo-image {
    display: none !important;
}

/* Stack header text vertically */
.qodef-header-logo-link {
    display: flex !important;
    flex-direction: column;
    align-items: center;
}

/* Line 1 */
.qodef-header-logo-link::before {
    content: "KATJA JUGOVIC";
    font-family: "DM Sans", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    line-height: 1.2em;
    text-align: center;
}

/* Lines 2 & 3 */
.qodef-header-logo-link::after {
    content: "fotografinja\A UGC ustvarjalka";
    white-space: pre;
    display: block;
    font-family: "DM Sans", sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #000;
    line-height: 1.2em;
    text-align: center;
}

/******************************************************
 * MOBILE HEADER — TEXT LOGO REPLACEMENT
 ******************************************************/

@media (max-width: 767px) {

    /* Mobile header container */
    .qodef-mobile-header-logo-link {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        text-align: center;
			 padding-top: 7px; /* adjust as needed */
    }

    /* Mobile Line 1 — Name */
    .qodef-mobile-header-logo-link::before {
        content: "KATJA JUGOVIC";
        font-family: "DM Sans", sans-serif;
        font-size: 18px; /* mobile size */
        font-weight: 700;
        color: #000;
        line-height: 1.2em;
    }

    /* Mobile Lines 2 & 3 — Profession */
    .qodef-mobile-header-logo-link::after {
        content: "fotografinja\A UGC ustvarjalka";
        white-space: pre;
        display: block;
        font-family: "DM Sans", sans-serif;
        font-size: 14px; /* mobile size */
        font-weight: 400;
        color: #000;
        line-height: 1.2em;
    }
}

/*********************************************
 * 1) GENERAL SAFETY — NO HORIZONTAL SCROLL
 *********************************************/
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/*********************************************
 * 2) HIDE SONORA’S MOBILE HAMBURGER
 *********************************************/
.qodef-mobile-header-opener,
.qodef-mobile-menu-opener,
.qodef-opener-icon,
.qodef-m-opener,
.qodef-icon--menu {
    display: none !important;
}

/*********************************************
 * 3) CUSTOM HAMBURGER ICON
 *********************************************/
@media (max-width: 1024px) {

    /* Ensure header behaves consistently */
    #qodef-page-mobile-header-inner {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-right: 50px;
    }

    /* Custom hamburger */
    #kj-mobile-menu-toggle {
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        width: 34px;
        height: 24px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        z-index: 99999;
        opacity: 1;
    }

    #kj-mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 1px;
        background: #000 !important;
        transition: transform 0.25s ease;
    }

    /* Middle line default */
    #kj-mobile-menu-toggle span:nth-child(2) {
        transform: translateX(-20%);
    }

    /* Middle line animated on open */
    #kj-mobile-menu-toggle.active span:nth-child(2) {
        transform: translateX(20%);
    }
}

/*********************************************
 * 4) SLIDE-IN MOBILE MENU
 *********************************************/
#kj-mobile-menu {
    position: fixed;
    top: 0;               /* JS will adjust this to sit below header */
    right: -100vw;        /* Hidden off-screen */
    width: 100vw !important;
    height: auto;
    max-height: 100vh;
    background: #fff;
    overflow-y: auto;
    transition: right 0.35s ease;
    z-index: 99990;
}

/* When active — slide in */
#kj-mobile-menu.active {
    right: 0 !important;
}

/*********************************************
 * 5) MENU OVERLAY
 *********************************************/
#kj-mobile-menu-overlay {
    position: fixed;
    top: 0;               /* JS will adjust this */
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 99980;
}

#kj-mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/*********************************************
 * 6) MENU LIST STYLING
 *********************************************/
#kj-mobile-menu ul.kj-mobile-menu {
    list-style: none;
    margin: 0;
    padding: 20px;
    width: 100%;
}

#kj-mobile-menu ul.kj-mobile-menu li {
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

#kj-mobile-menu ul.kj-mobile-menu li a {
    text-decoration: none;
    color: #000;
    font-size: 18px;
}

/*********************************************
 * 7) PORTFOLIO ACCORDION
 *********************************************/
#kj-mobile-menu .menu-item-has-children > a {
    position: relative;
    display: flex;
    justify-content: space-between;
}

#kj-mobile-menu .menu-item-has-children.open .sub-menu {
    display: block !important;
}

#kj-mobile-menu .sub-menu {
    display: none;
    padding-left: 15px;
    border-left: 2px solid #ddd;
}

@media (max-width: 1024px) {
    #qodef-page-mobile-header-inner {
        padding-left: 15px !important;   /* reduce left padding */
        padding-right: 50px !important; /* keep space for hamburger */
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .qodef-mobile-header-logo-link {
        margin-left: 0 !important;  /* ensure no extra indent */
    }
}

/* 1) Remove bullets, keep indentation */
#kj-mobile-menu ul,
#kj-mobile-menu li {
    list-style: none !important;
}

/* 2) Keep submenu indentation but remove the vertical line */
#kj-mobile-menu .sub-menu {
    border-left: none !important;  /* remove vertical line */
    /* padding-left stays as-is to keep indent */
}

/*MOBILEHOMEPAGE FIX*/
/* MOBILE ONLY */
@media (max-width: 1024px) {
    body.home .qodef-portfolio-list.qodef-layout--masonry .qodef-grid-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    body.home .qodef-portfolio-list .qodef-grid-item {
        position: static !important;
        float: none !important;
        width: 92vw !important;
        margin: 0 auto 30px auto !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
    }

    body.home .qodef-e-media,
    body.home .qodef-e-media-image {
        text-align: center !important;
        width: 100% !important;
    }

    body.home .qodef-e-media img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
    }
}

/******************************************************
 * FOOTER — QUOTE IMAGE REPLACEMENT
 ******************************************************/

/* Hide the old quote image */
#block-62 img.wp-image-7608 {
    display: none !important;
}

/* Quote wrapper cleanup */
#block-62 .wp-block-image {
    position: relative;
    min-height: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Insert crisp vector text */

/*FOOTER LEFT TEXT*/
/* Wrapper: center and align text like the right side */
/* Target the FIRST column in the footer top area reliably */
#qodef-page-footer-top-area .qodef-grid-item:nth-child(1) {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 10px;
    padding: 0;
    text-align: center;
}

/* Insert left poetic text */
#qodef-page-footer-top-area .qodef-grid-item:nth-child(1)::after {
    content: "Bi si želeli delati z mano?";
    white-space: pre-line;
    display: block;

    font-family: "DM Sans", sans-serif;
    font-style: normal;
    font-weight: 300;

    /* Fluid responsive sizing – same as right side */
    font-size: clamp(18px, 2.4vw, 30px);
    line-height: 1.6;
    letter-spacing: 0.04em;

    max-width: min(600px, 90vw);
    margin: 0 auto;
    color: rgba(0, 0, 0, 0.9);

    /* Fade-in like on the right side */
    opacity: 1;
    transform: translateY(0);
    animation: kj-footer-left-fade 800ms ease-out 1;
}

/* Responsive tweaks (optional) */
@media (max-width: 600px) {
    #qodef-page-footer-top-area .qodef-grid-item:nth-child(1)::after {
        line-height: 1.5;
        letter-spacing: 0.02em;
        margin: 5px auto;
    }
}

/* Animation */
@keyframes kj-footer-left-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    #qodef-page-mobile-header-inner {
        display: flex;
        align-items: center;
        justify-content: flex-start; /* restore left alignment */
        padding-right: 50px; /* space for hamburger */
        position: relative;
    }

    /* Optional: tighten spacing so logo aligns perfectly left */
    .qodef-mobile-header-logo-link {
        margin-left: 0px;
    }
}

.qodef-mobile-header-opener .qodef--close,
.qodef-m-icon.qodef--close {
    display: none !important;
}

#kj-mobile-menu-toggle {
    opacity: 0;           /* hide at first */
    transition: opacity 0.2s ease;
}

/******************************************************
 * FOOTER QUOTE
 ******************************************************/

/* Hide original image */
#block-62 img.wp-image-7608 {
    display: none !important;
}

/* Wrapper: center things nicely */
#block-62 .wp-block-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 10px;
    padding: 0;
    text-align: center;
}

/* Poetic text */
#block-62 .wp-block-image::after {
    content: "“Ustvarjanje vsebin je neskončno\A igrišče idej,\A lepote in ustvarjalnosti”";
    white-space: pre-line;              /* respects \A but still wraps nicely */
    display: block;

    font-family: "DM Sans", sans-serif;
    font-style: italic;
    font-weight: 300;

    /* Fluid, responsive font size */
    font-size: clamp(18px, 2.4vw, 30px);

    /* Airy & poetic */
    line-height: 1.6;
    letter-spacing: 0.04em;

    /* Centered, nicely limited box */
    max-width: min(600px, 90vw);
    margin: 0 auto;
    color: rgba(0, 0, 0, 0.9);

    /* Optional subtle fade-in on load */
    opacity: 1;
    transform: translateY(0);
    animation: kj-footer-quote-fade 800ms ease-out 1;
}

/* Small screens: tighten a bit */
@media (max-width: 600px) {
    #block-62 .wp-block-image::after {
        line-height: 1.5;
        letter-spacing: 0.02em;
        margin: 5px auto;
    }
}

/* Poetic fade animation */
@keyframes kj-footer-quote-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer image gallery sizing */
#block-59 .wp-block-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
	  margin-right: 50px !important;
}

#block-59 .wp-block-image img {
    width: min(230px, 30vw);
    height: min(230px, 30vw);
    object-fit: cover;
}

/* Vertically center the footer button */
#block-52 {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    height: 100%;
}


/* MOBILE FOOTER FIX */
@media (max-width: 1024px) {

    /* Kill Sonora's inline right margins/padding on footer wrappers */
    #qodef-page-footer,
    #qodef-page-footer-top-area,
    #qodef-page-footer-top-area-inner {
        margin-right: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Center top and bottom areas */
    #qodef-page-footer-top-area-inner,
    #qodef-page-footer-bottom-area-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 auto !important;
    }

    /* Make footer grid items center themselves */
    #qodef-page-footer .qodef-grid,
    #qodef-page-footer .qodef-grid-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    #qodef-page-footer .qodef-grid-item {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }

    /* Make sure Gutenberg group of images is centered */
    #qodef-page-footer .wp-block-group {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px;
    }

    #qodef-page-footer .wp-block-image {
        margin: 0 !important;
    }
}

@media (max-width: 1024px) {

    /* Target the final bottom area image group */
    #qodef-page-footer .wp-block-group.is-layout-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important; /* equal spacing */
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Each image container */
    #qodef-page-footer .wp-block-group.is-layout-grid .wp-block-image {
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: 30% !important; /* ensures no overflow */
        text-align: center !important;
    }

    /* Actual image */
    #qodef-page-footer .wp-block-group.is-layout-grid .wp-block-image img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        object-fit: cover !important;
    }
}


/******************************************************
 MAIN PORTFOLIO - MOBILE FIX ******************************************************/
/* FULL ODIN MODE — MOBILE ONLY, HOME PAGE ONLY - RAGNAROK AWAITS*/
/* MOBILE ONLY – Force portfolio list into a centered single-column layout */
/* MOBILE: FORCE-disable Sonora masonry completely */

/******************************************************
 * PORTFOLIO SINGLE PAGE — LAYOUT FIX (8–4 → FULL WIDTH)
 ******************************************************/

.qodef-portfolio-single-item
.qodef-grid.qodef-layout--template.qodef-grid-template--8-4 > .qodef-grid-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
}

.qodef-portfolio-single-item
.qodef-grid.qodef-layout--template.qodef-grid-template--8-4 > .qodef-grid-inner
> .qodef-grid-item.qodef-col--content {
    grid-column: 1 / -1 !important;
}

/* Hide the sidebar entirely */
.qodef-portfolio-single-item
.qodef-grid.qodef-layout--template.qodef-grid-template--8-4 > .qodef-grid-inner
> .qodef-grid-item.qodef-col--sidebar {
    display: none !important;
    visibility: hidden !important;
}



/******************************************************
 * PORTFOLIO HOVER EFFECT — TRUE SHRINK 0.90
 ******************************************************/

/* Remove all Qode title overlays (you requested this) */
.qodef-item-layout--info-on-hover .qodef-e-content,
.qodef-item-layout--info-on-hover .qodef-e-title,
.qodef-item-layout--info-on-hover .qodef-e-info,
.qodef-item-layout--info-on-hover .qodef-e-title-link {
    display: none !important;
}

/* Remove ALL theme transforms (fixes zoom-out bug) */
.qodef-item-layout--info-on-hover .qodef-e-media-image,
.qodef-item-layout--info-on-hover .qodef-e-media img {
    transform: scale(1) !important;
}

/* Prevent flicker by forcing stable container */
.qodef-item-layout--info-on-hover .qodef-e {
    overflow: hidden;
}

/* Base state */
.qodef-item-layout--info-on-hover .qodef-e img {
    display: block;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.35s cubic-bezier(0.3, 0.3, 0.1, 1) !important;
}

/* HOVER — SHRINK STRONGLY (your choice: 1-B) */
.qodef-item-layout--info-on-hover .qodef-e:hover img {
    transform: scale(0.90) !important;
}



/******************************************************
 * POPUP GALLERY — KEEP SUBTLE ZOOM
 ******************************************************/

.qodef-popup-gallery .qodef-popup-item {
    overflow: hidden !important;
}

.qodef-popup-gallery .qodef-popup-item img {
    transition: transform 0.45s ease-in-out;
    transform-origin: center center;
}

.qodef-popup-gallery .qodef-popup-item:hover img {
    transform: scale(1.05);
}


/******************************************************
 * FOOTER BACKGROUND FIX — 50px MARGIN MASK
 ******************************************************/

#qodef-page-footer,
#qodef-page-footer-top-area,
#qodef-page-footer-top-area-inner {
    position: relative;
    overflow: hidden;
}

#qodef-page-footer-top-area::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
      height: 100%; 
    background: #fff;
    z-index: 1;
}

/*DO NOT SHOW OVERLAY ON MOBILE!*/
@media (max-width: 767px) {
    #qodef-page-footer-top-area::after {
        display: none !important;
    }
}

/*--------------------------------------------------------------
   FIX PORTFOLIO PAGE HOVER ZOOM (no flicker)
--------------------------------------------------------------*/

/* Prevent flicker – stable container for each image */
.qodef-portfolio-single-item .qodef-popup-item {
    position: relative;
    overflow: hidden;       /* prevents zoom from expanding outside */
    padding: 4px;           /* hover-safe border */
    margin: -4px;           /* cancels visual offset */
}

/* Image reset */
.qodef-portfolio-single-item .qodef-popup-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* smooth zoom transition */
    transition: transform 0.45s ease-in-out !important;
    transform-origin: center center;
}

/* Hover: zoom IN slightly */
.qodef-portfolio-single-item .qodef-popup-item:hover img {
    transform: scale(1.05) !important;
}


/*CONTACT ME button animation*/
/* Ensure parent centers the zooming block */
.wp-block-qi-blocks-button.qodef-block-container {
    text-align: center;
}

/* Zoomable element */
.wp-block-qi-blocks-button.qodef-block-container.qodef-widget-block-d95af4c5 {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

/* Hover zoom */
.wp-block-qi-blocks-button.qodef-block-container.qodef-widget-block-d95af4c5:hover {
    transform: scale(1.1);
}

/*BACK TO TOP OVERRIDE*/
/* Hide original Sonora back-to-top */
#qodef-back-to-top {
    display: none !important;
}

/* Position + behavior */
#custom-back-to-top {
    position: fixed;
    bottom: 30px;
    right: -25px !important; /*zamakni arrow*/
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 99999;
    background: transparent;     /* No white circle */
}
#custom-back-to-top:hover {
    background-color: transparent !important; /* stay transparent on hover */
}

/* Make SVG visible + solid */
#custom-back-to-top svg path {
    fill: #000000;               /* Solid black arrow */
}

/* Rotate the original Sonora arrow UP */
#custom-back-to-top svg {
    transform: rotate(-90deg) scale(2.0);   /* <<< ORIGINAL SONORA ROTATION */
    width: 24px;
    height: 44px;
}

#custom-back-to-top:hover svg {
    transform: scale(2.4) rotate(-90deg); /* 2.0 × 1.2 = 2.4 */
}

/* Show when scrolled */
#custom-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/************************************************************
 *  PREMIUM MASONRY / PINTEREST GALLERY FOR SINGLE PORTFOLIO
 *  Smooth animations • Natural stagger • Proportions preserved
 ************************************************************/

/* Container fade-in */
body.single-portfolio-item 
.qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery {
    display: block !important;
    column-count: 3; /*število stolpcev*/
    column-gap: 28px;
    width: 100%;
    margin: 0 auto;
    padding: 0;

    opacity: 0;
    transform: translateY(10px);
    animation: galleryFadeIn 0.7s ease-out forwards;
    animation-delay: 0.1s;
}

/* Masonry tile */
body.single-portfolio-item 
.qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery 
a.qodef-popup-item.qodef-grid-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 28px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;

    opacity: 0;
    transform: translateY(25px);
    animation: tileRiseFade 0.9s cubic-bezier(0.25, 0.45, 0.25, 1) forwards;
}

/* Natural stagger timing */
body.single-portfolio-item 
.qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery 
a.qodef-popup-item.qodef-grid-item:nth-child(3n+1) {
    animation-delay: 0.15s;
}
body.single-portfolio-item 
.qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery 
a.qodef-popup-item.qodef-grid-item:nth-child(3n+2) {
    animation-delay: 0.30s;
}
body.single-portfolio-item 
.qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery 
a.qodef-popup-item.qodef-grid-item:nth-child(3n+3) {
    animation-delay: 0.45s;
}

/* Images — premium look */
body.single-portfolio-item 
.qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery 
a.qodef-popup-item.qodef-grid-item img {
    width: 100%;
    height: auto !important;
    display: block;
    object-fit: contain !important;

    /*border-radius: 10px; nema rounded corners, zgleda bljak*/ 
	border-radius: 0px;
	/* soft rounded edges */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Subtle hover lift */
body.single-portfolio-item 
.qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery 
a.qodef-popup-item.qodef-grid-item:hover img {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

/* Keyframes */
@keyframes galleryFadeIn {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes tileRiseFade {
    0%   { opacity: 0; transform: translateY(25px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE COLUMNS */
@media (max-width: 1200px) {
    body.single-portfolio-item 
    .qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery {
        column-count: 3;
    }
}
@media (max-width: 900px) {
    body.single-portfolio-item 
    .qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery {
        column-count: 2;
    }
}
@media (max-width: 600px) {
    body.single-portfolio-item 
    .qodef-grid-inner.qodef-magnific-popup.qodef-popup-gallery {
        column-count: 1;
    }
}

/* Remove any accidental leftover Qode spacing */
body.single-portfolio-item .qodef-media,
body.single-portfolio-item .qodef-gallery,
body.single-portfolio-item .qodef-grid-inner {
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
}

/************************************************************
TRUE PINTEREST MASONRY FOR “ALL ITEMS” PAGE
 Sonora / Qode Theme – Fix for qodef-layout--masonry-small
************************************************************/

/* ----------------------------------------------------------
   1. STOP QODE MASONRY FROM CROPPING & POSITIONING ITEMS
----------------------------------------------------------- */
/*
.qodef--masonry-init {
    height: auto !important;
}
*/
/* TO ZJEBE HOMEPAGE, U 3PM!!!*/
.single-portfolio-item.postid-7975 .qodef--masonry-init {
    height: auto !important;
}
/*TA JE SAMO ZA "ALL" */

/* Disable Qode's hard-coded absolute positioning */
.qodef-layout--masonry-small .qodef--masonry-init,
.qodef-layout--masonry-small .qodef--masonry-init > * {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* Remove inline width/height from items (keeps natural image proportions) */
.qodef-layout--masonry-small .qodef-popup-item.qodef-grid-item[style] {
    width: 100% !important;
    height: auto !important;
}

/* Images: natural proportions only */
.qodef-layout--masonry-small .qodef-popup-item.qodef-grid-item img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
}

/* Remove theme’s internal "sizer" box (used for square grid) */
.qodef-layout--masonry-small .qodef-grid-masonry-sizer {
    display: none !important;
}


/* ----------------------------------------------------------
   2. APPLY TRUE CSS MASONRY USING COLUMNS
----------------------------------------------------------- */

.qodef-layout--masonry-small .qodef--masonry-init {
    display: block !important;
    column-count: 3;       /* Number of masonry columns */
    column-gap: 28px;      /* Space between columns */
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Every tile behaves like a masonry block */
.qodef-layout--masonry-small .qodef--masonry-init > * {
    display: inline-block;
    width: 100%;
    margin: 0 0 28px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    height: auto !important;
}


/* ----------------------------------------------------------
   3. OPTIONAL CLEANUP (removes padding, borders, theme effects)
----------------------------------------------------------- */

.qodef-layout--masonry-small .qodef-e,
.qodef-layout--masonry-small .qodef-e-image,
.qodef-layout--masonry-small .qodef-e-media {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}


/* ----------------------------------------------------------
   4. RESPONSIVE MASONRY
----------------------------------------------------------- */

@media (max-width: 1200px) {
    .qodef-layout--masonry-small .qodef--masonry-init {
        column-count: 3;
    }
}

@media (max-width: 900px) {
    .qodef-layout--masonry-small .qodef--masonry-init {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .qodef-layout--masonry-small .qodef--masonry-init {
        column-count: 1;
    }
}

/* MENU Indentation */
.qodef-header-vertical-navigation .sub-menu .menu-item {
    padding-left: 25px !important;
}

/****************************************************
 CLEAN FINAL VERTICAL MENU CSS – SONORA FIX
 - Smooth slide-down on user click
 - Instant open on portfolio pages
 - Qode JS collapse blocked
 - No lines / no gradients
 - Active underline + hover underline
****************************************************/


/*******************************
 1. BASE: submenu invisible but PRESENT
    (display: block prevents Qode collapse)
*******************************/
.qodef-header-vertical-navigation 
.menu-item-has-children .qodef-drop-down-second {
    display: block !important;         /* <-- THE KEY FIX */
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition:
        max-height 0.35s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
}


/*******************************
 2. OPEN ON CLICK
*******************************/
.qodef-header-vertical-navigation 
.menu-item-has-children.submenu-open .qodef-drop-down-second {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    overflow: visible;
    pointer-events: auto;
    transform: translateY(0);
}


/*******************************
 3. AUTO-OPEN ON PORTFOLIO PAGES
    (no animation = no flicker)
*******************************/
.qodef-header-vertical-navigation 
.menu-item-has-children:has(.sub-menu .current-menu-item)
.qodef-drop-down-second {
    max-height: 500px !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    transition: none !important;       /* <-- stops flicker */
}


/*******************************
 4. MENU ITEM INDENTATION
*******************************/
.qodef-header-vertical-navigation .sub-menu .menu-item {
    padding-left: 25px !important;
}


/*******************************
 5. REMOVE ALL LINES / BACKGROUNDS
*******************************/
.qodef-header-vertical-navigation .sub-menu,
.qodef-header-vertical-navigation .sub-menu .menu-item,
.qodef-header-vertical-navigation .sub-menu .menu-item a,
.qodef-header-vertical-navigation .qodef-drop-down-second-inner,
.qodef-header-vertical-navigation .qodef-drop-down-second-inner * {
    background: none !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

.qodef-header-vertical-navigation .qodef-drop-down-second-inner::before,
.qodef-header-vertical-navigation .qodef-drop-down-second-inner::after,
.qodef-header-vertical-navigation .sub-menu::before,
.qodef-header-vertical-navigation .sub-menu::after,
.qodef-header-vertical-navigation .sub-menu .menu-item::before,
.qodef-header-vertical-navigation .sub-menu .menu-item::after {
    display: none !important;
    content: none !important;
}


/*******************************
 6. UNDERLINE LOGIC
*******************************/

/* Hover underline */
.qodef-header-vertical-navigation .sub-menu a:hover,
.qodef-header-vertical-navigation .sub-menu a:hover .qodef-menu-item-text {
    text-decoration: underline !important;
}

/* Selected submenu item underline */
.qodef-header-vertical-navigation .sub-menu .current-menu-item > a,
.qodef-header-vertical-navigation .sub-menu .current-menu-item > a .qodef-menu-item-text {
    text-decoration: underline !important;
}

/*FLICKER problem*/
.qodef-vertical-drop-down--below .qodef-drop-down-second,
.qodef-vertical-drop-down--below .qodef-drop-down-second-inner {
    animation: none !important;
    transition: none !important;
}

/*CONTACT FORM BUTTON ANIMATION*//* Stronger selector + important = overrides Qode button animations */
form.wpcf7-form button.wpcf7-submit.qodef-button {
    display: inline-block;
    transform-origin: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

form.wpcf7-form button.wpcf7-submit.qodef-button:hover {
    transform: scale(1.2) translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}

/* ----------------------------------------------------
   ABOUT PAGE (POST 1406) — MOBILE/TABLET FIXES
   Apply up to 1024px as previously used
------------------------------------------------------ */
/* ----------------------------------------------------
   ABOUT PAGE (ID 1406) — MOBILE/TABLET FIXES
   Up to 1024px, as before
------------------------------------------------------ */
/* ----------------------------------------------------
   ABOUT PAGE (ID 1406) — MOBILE/TABLET FIXES (≤1024px)
------------------------------------------------------ */
/* ----------------------------------------------------
   ABOUT PAGE (ID 1406) — MOBILE/TABLET FIXES (≤1024px)
------------------------------------------------------ */
@media (max-width: 1024px) {

    /* --- PARENT CONTAINER (wraps image + text) --- */
    body.page-id-1406 .elementor-element-8e5cf68 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 40px 0 0 0 !important;   /* top spacing added */
    }

    /* --- IMAGE CONTAINER (background image) --- */
    body.page-id-1406 .elementor-element-e80bce4 {
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;

        min-height: 350px !important;
        width: 100% !important;
        margin: 0 auto 20px auto !important;
    }

    /* --- TEXT ROW CONTAINER --- */
    body.page-id-1406 .elementor-element-f869cc9 {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }

    /* --- TEXT BLOCK ITSELF --- */
    body.page-id-1406 .elementor-element-b893199 {
        max-width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: justify !important;
    }

    /* --- MOBILE-ONLY HEADLINE CENTERING --- */
    body.page-id-1406 h6 {
        text-align: center !important;
    }
}

/* ----------------------------------------------------
   SONORA PORTFOLIO — ABSOLUTE-FORCE CENTER FIX
   100% reliable method used for Qode themes
------------------------------------------------------ */
@media (max-width: 1024px) {
    .elementor-element-b1f6351 {  /* ← this is the column holding the portfolio */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* Center the portfolio list block inside */
    .elementor-element-b1f6351 .qodef-portfolio-list {
        margin-left: auto !important;
        margin-right: auto !important;
    }
	
    /* Disable Masonry and absolute positioning entirely */
    .qodef-portfolio-list .qodef-grid-inner,
    .qodef-portfolio-list .qodef-grid-item {
        position: relative !important;   /* NOT static → avoids JS override */
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;          /* Full width column */
        margin: 0 auto 30px auto !important;
    }

    /* Turn entire list into a normal vertical block */
    .qodef-portfolio-list {
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 10px !important;
    }

    /* Center the inner media container */
    .qodef-portfolio-list .qodef-e-media-image,
    .qodef-portfolio-list .qodef-e-media,
    .qodef-portfolio-list .qodef-e-inner {
        text-align: center !important;
    }

    /* Center the image itself */
    .qodef-portfolio-list .qodef-e-media img {
        display: inline-block !important;
        margin: 0 auto !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Fix Sonora/Qode grid forcing left alignment on mobile */
@media (max-width: 1024px) {

    #qodef-page-content.qodef-grid {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
    }

    #qodef-page-content .qodef-grid-inner {
        width: 100% !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .qodef-page-content-section.qodef-col--content {
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
    }
}

/* ----------------------------------------------------
   FINAL FIX — Center entire Sonora content area on mobile
------------------------------------------------------ */
@media (max-width: 1024px) {

    /* The highest wrapper that forces left alignment */
    #qodef-page-wrapper.qodef-grid.qodef-layout--template {
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;   /* THIS centers everything inside */
    }

    /* Make the inner grid behave as full-width centered block */
    #qodef-page-wrapper .qodef-grid-inner {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* MOBILE: nudge portfolio block slightly to the right on HOME !! */
@media (max-width: 1024px) {
    body.home .qodef-portfolio-list .qodef-grid-inner {
        padding-left: 6px !important;  /* tweak this value by eye: 8–16px */
        padding-right: 0 !important;
    }
}

/* Shrink huge top/bottom gaps on mobile (all pages) */
@media (max-width: 1024px) {
    #qodef-page-inner {
        padding-top: 16px !important;   /* tweak: try 10px or even 0 if you want it tighter */
        padding-bottom: 16px !important;
    }
}

/* Mobile – reduce the big gap above the footer on all pages */
@media (max-width: 1024px) {

    /* Top part of the footer (where "Kontaktirajte me" + quote are) */
    #qodef-page-footer-top-area {
        padding-top: 10px !important;   /* try 0–20px to taste */
        padding-bottom: 10px !important;
        margin-top: 0 !important;
    }

    /* Bottom footer bar (images / small footer content) */
    #qodef-page-footer-bottom-area,
    #qodef-page-footer-bottom-area-inner {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* MOBILE: fix huge empty space under portfolio list (kill Masonry height) */
@media (max-width: 1024px) {

    /* Let the Masonry container shrink to its content */
    .qodef-portfolio-list .qodef-grid-inner.qodef--masonry-init {
        height: auto !important;
    }

    /* Make items flow normally instead of absolute Masonry positions */
    .qodef-portfolio-list .qodef-grid-item {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
    }
}

/*OFFSET FUCKING SONORA S..T*/
/* SEMI-WORKING
@media (max-width: 1024px) {
    #qodef-page-footer,
    #qodef-page-footer .qodef-footer-top,
    #qodef-page-footer-top-area,
    #qodef-page-footer .qodef-footer-top-inner,
    #qodef-page-footer-top-area-inner {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}
*/
/* HOME – tighten gap between last portfolio image and footer on mobile */
/***********************
 MOBILE FINAL GAP FIX
***********************/
@media (max-width: 1024px) {

    /* Remove bottom padding/margin from the actual ORANGE wrapper */
    body.home #qodef-page-content .qodef-grid-inner 
              .qodef-grid-item.qodef-col--content-inner {
        padding-bottom: 0px !important;
        margin-bottom: 0px !important;
    }

    /* Remove padding/margin from the parent .qodef-col--content too */
    body.home #qodef-page-content .qodef-grid-inner 
              .qodef-grid-item.qodef-col--content {
        padding-bottom: 0px !important;
        margin-bottom: 0px !important;
    }

    /* Preserve the intentional gap BELOW the orange section (to magenta/footer) */
    body.home .qodef-portfolio-list .qodef-grid-item:last-child {
        margin-bottom: 2px !important; /* adjust as needed - we NEED damn 2px*/
    }
	
   /* Collapse the magenta wrapper’s bottom space */
    body.home #qodef-page-wrapper > .qodef-grid-inner {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        height: auto !important;
    }
	
    #qodef-page-wrapper > .qodef-grid-inner:not(.qodef--masonry-init) {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        height: auto !important;
    }

}

@media (max-width: 1024px) {

    /* REMOVE all footer top padding and margin on mobile */
    #qodef-page-footer,
    #qodef-page-footer-top-area,
    #qodef-page-footer-top-area-inner,
    #qodef-page-footer .qodef-footer-top,
    #qodef-page-footer .qodef-footer-top-inner {
        padding-top: 0 !important;
        margin-top: 0 !important;
        padding-bottom: 0 !important;
        margin-bottom: auto !important;
    }

    /* Ensure footer is flush with content */
    #qodef-page-footer {
        top: 0 !important;
        position: relative !important;
    }
}
/* FIX GAPS ON PORTFOLIO PAGES*/
@media (max-width: 1024px) {

    /* Keep the sidebar hidden on mobile if it appears under the gallery */
    .qodef-portfolio-single-item .qodef-col--sidebar {
        display: none !important;
    }

    /* Remove bottom padding/margin on the inner wrappers INSIDE article */
    .qodef-portfolio-single-item .qodef-e-inner,
    .qodef-portfolio-single-item .qodef-e-content {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Remove bottom padding from content column (cyan) */
    .qodef-portfolio-single-item .qodef-col--content {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Remove bottom padding from gallery wrapper (red) */
    .qodef-portfolio-single-item .qodef-popup-gallery {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Keep spacing between images themselves */
    .qodef-portfolio-single-item .qodef-popup-gallery .qodef-grid-item {
        margin-bottom: 20px !important;    /* adjust if needed */
    }

    /* Do NOT add a gap under the last image */
    .qodef-portfolio-single-item .qodef-popup-gallery .qodef-grid-item:last-child {
        margin-bottom: 0 !important;
    }

    /* FINAL FIX — micro-nudge the whole image block down to meet the footer divider */
    .qodef-portfolio-single-item .qodef-col--content {
        margin-bottom: -10px !important;    /* adjust -8 / -10 / -12 if needed */
    }
}


/* MOBILE ONLY — add centered logo at bottom of footer */
@media (max-width: 1024px) {
    #qodef-page-footer-bottom-area-inner::after {
        content: "";
        display: block;
        width: 100px;                 /* logo width */
        height: 100px;                 /* logo height, tweak to match proportions */
        margin: 10px auto 0 auto;     /* space above + centered */
        background-image: url("https://katjajugovic.com/wp-content/uploads/2025/08/cropped-cropped-Logo-white.webp");
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }
}


/* FOR DEBUG ONLY*/
/*
@media (max-width: 1024px) {
    body {
        border: 5px solid red !important;
    }
}
*/

/*DEBUG BORDERS home*/
/*
@media (max-width: 1024px) {
    body { border: 2px solid red !important; }
    #qodef-page-inner { outline: 2px solid blue !important; }
    #qodef-page-content { outline: 2px solid green !important; }
    .qodef-portfolio-list .qodef-grid-inner { outline: 2px solid cyan !important; }
    #qodef-page-footer { outline: 2px solid magenta !important; }
@media (max-width: 1024px) {
    #qodef-page-content { outline: 2px solid yellow !important; }
    #qodef-page-wrapper { outline: 2px solid magenta !important; }
    #qodef-page-footer { outline: 2px solid orange !important; }
}

}
*/

/*DEBUG BORDERS home 2*/
/*
@media (max-width: 1024px) {

    #qodef-page-wrapper > * {
        outline: 3px solid magenta !important;
    }
    #qodef-page-content > * {
        outline: 3px solid cyan !important;
    }
    .qodef-page-content-section.qodef-col--content > * {
        outline: 3px solid orange !important;
    }
}
*/

/*DEBUG BORDERS for PORTFOLIO-ITEM pages*/
/*
@media (max-width: 1024px) {

  .qodef-portfolio-single-item {
    outline: 2px solid magenta !important;
  }

  .qodef-portfolio-single-item .qodef-e-inner {
    outline: 2px solid orange !important;
  }

  .qodef-portfolio-single-item .qodef-e-content {
    outline: 2px solid yellow !important;
  }

  .qodef-portfolio-single-item .qodef-col--content {
    outline: 2px solid cyan !important;
  }

  .qodef-portfolio-single-item .qodef-col--sidebar {
    outline: 2px solid lime !important;
  }

  .qodef-portfolio-single-item .qodef-popup-gallery {
    outline: 2px solid red !important;
  }
}
*/

/* =====================================
   FOOTER COPYRIGHT – DOM INSERTED
   ===================================== */

#footer-copyright {
    text-align: center;
    font-size: 12px;
    line-height: 1.6;

    margin: 24px 0 12px;
    padding: 0 12px;

    opacity: 0.7;
}

