/*
Theme Name: Twenty Twenty-Five Child
Theme URI: 
Author: Jure Golob
Author URI: 
Description: Twenty Twenty-Five Child Theme
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 1.2.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfive
Text Domain: twentytwentyfive-child
Tags: 
*/

.naslovnica{
    overflow: hidden !important;
}

.wp-block-cover.gallery-cover {
    display: grid !important;
}

.gallery-cover .wp-block-cover__inner-container {
    height: 100% !important;
    align-self: stretch !important;
    justify-self: stretch !important;
    position: relative !important;
    display: flex;

    & .absolute-top {
        position: absolute;
        width: 100%;
    }

    & .wp-block-post-title {
        align-self: center;
    }
}


@media only screen and (max-width: 1024px) {
    .wp-block-group.galerija {
        padding: 0 !important;
    }

    header.wp-block-group.is-position-sticky {
        padding-top: var(--wp--preset--spacing--30) !important;
        padding-right: var(--wp--preset--spacing--30) !important;
        padding-bottom: var(--wp--preset--spacing--30) !important;
        padding-left: var(--wp--preset--spacing--30) !important;
    }
}

.jure-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(384px, 1fr));
    grid-auto-rows: 0px;
    gap: 8px;
}

@media (max-width: 1920px) {
    .jure-masonry {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}


@media (max-width: 1660px) {
    .jure-masonry {
        grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
    }
}


@media (max-width: 1280px) {
    .jure-masonry {
        grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    }
}


@media (max-width: 600px) {
    .jure-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
}


.jure-masonry a {
    display: block;
}

.jure-masonry img {
    content-visibility: auto;
    contain-intrinsic-size: auto;
    contain: paint;
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    will-change: opacity, transform;
}

/* Fade-in active state */
.jure-masonry img.jure-visible {
    opacity: 1;
    transform: translateY(0);
}



/* -----------------------
    JUSTIFIED GALLERY
----------------------- */


.jure-justified img {
    display: block;
    object-fit: cover;
    height: 100%; /* JS sets the actual height */
    content-visibility: auto;
    contain-intrinsic-size: auto;
    contain: paint;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    will-change: opacity, transform;
}

.jure-justified img.jure-visible {
    opacity: 1;
    transform: translateY(0);
}





/* Base state (hidden) */
.cover-animate-img,
.cover-animate-title,
.cover-animate-heading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Active state (visible) */
.cover-animate-visible {
    opacity: 1;
    transform: translateY(0);
}

.cover-animate-img {
    transform: scale(1.05);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.cover-animate-visible.cover-animate-img {
    transform: scale(1);
}

.cover-animate-title {
    transition-delay: 0.2s;
}

.cover-animate-heading {
    transition-delay: 0.4s;
}

/* Also ensure the animated elements never expand horizontally */
.cover-animate-img,
.cover-animate-title,
.cover-animate-heading {
    max-width: 100%;
}


.gplay-btn {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 30px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    background-color: rgba(0,0,0,.32);
    border-radius: 4px;
}

.gplay-btn:hover {
    background-color: rgba(0,0,0,.7);
}

.gplay-btn .icon {
    position: relative;
    z-index: 2;
    margin-bottom: 7px;
}

.gplay-btn .progress-ring {
    position: absolute;
    left: 0;
    width: 40px;
    height: 40px;
    z-index: 1;
}

.gplay-btn .progress-ring circle {
    fill: none;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    opacity: 0.6;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-dasharray: 113;
    stroke-dashoffset: 113;
    transition: stroke-dashoffset linear;
}


/* Wrapper styling */
.galerija-password-wrapper {
    max-width: 480px;
    margin: 80px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
}

/* The paragraph WP outputs above the form */
.galerija-password-wrapper p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* The form element */
.galerija-password-wrapper form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Password input */
.galerija-password-wrapper input[type="password"] {
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Submit button */
.galerija-password-wrapper input[type="submit"] {
    background: #000;
    color: #fff;
    padding: 14px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.galerija-password-wrapper input[type="submit"]:hover {
    background: #333;
}

/* Error message (WP outputs this inside a <p>) */
.galerija-password-wrapper .post-password-message {
    color: #d00;
    font-weight: 600;
    margin-bottom: 20px;
}

.galerija-password-error {
    color: #d00;
    font-weight: 600;
    margin-bottom: 20px;
}