/*
Theme Name: Zastodijete Child
Theme URI: https://zastodijete.hr
Description: Child theme za zastodijete.hr lifestyle portal
Author: Triple Byte
Author URI: https://triplebyte.hr
Template: hello-elementor
Version: 1.0.1781080231
Text Domain: zastodijete-child
*/

/* ==========================================================================
   CHILD THEME STYLES
   Sve promjene idu ovdje — nikad u parent temu
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBALNI RESET — uklanjanje dekorativnih crta
   -------------------------------------------------------------------------- */

/* Ukloni horizontalne hr separatore koji vizualno zagađuju layout */
.elementor-divider,
.elementor-widget-divider {
    display: none !important;
}

/* Hello Elementor default border reset */
.site-header,
.site-footer {
    border-top: none;
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   2. TIPOGRAFIJA & BOJE — placeholder, postavit ćemo u sljedećim fazama
   -------------------------------------------------------------------------- */

html, * {
    font-family: Lora, sans-serif;
}

/* --------------------------------------------------------------------------
   3. NASLOVNICA LAYOUT
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   4. KATEGORIJE / ARHIVE
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   5. SINGLE POST
   -------------------------------------------------------------------------- */


/* ==========================================================================
   HERO LOOP — magme.hr style pattern
   Svaki 3. post (1, 4, 7, 10, 13) = velika kartica preko 2 kolone
   Ostatak = 1 kolona, manje kartice
   ========================================================================== */

.zd-hero-loop .elementor-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

/* Svaki 3. post (1, 4, 7, 10, 13) — BIG (2 kolone široko) */
.zd-hero-loop .elementor-grid > article:nth-child(3n+1),
.zd-hero-loop .elementor-grid > .e-loop-item:nth-child(3n+1) {
    grid-column: span 2;
    grid-row: span 2;
}

/* BIG kartica — veća tipografija */
.zd-hero-loop .elementor-grid > article:nth-child(3n+1) .zd-loop-title,
.zd-hero-loop .elementor-grid > .e-loop-item:nth-child(3n+1) .zd-loop-title {
    font-size: 32px !important;
    line-height: 1.15 !important;
}

/* BIG kartica — slika veća */
.zd-hero-loop .elementor-grid > article:nth-child(3n+1) .zd-loop-img img,
.zd-hero-loop .elementor-grid > .e-loop-item:nth-child(3n+1) .zd-loop-img img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
}

/* Standardna kartica — slika */
.zd-hero-loop .zd-loop-img img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    display: block;
}

/* Loop card osnovni stil */
.zd-loop-card {
    height: 100%;
}

.zd-loop-cat p {
    margin: 0;
}

.zd-loop-date p {
    margin: 0;
}

.zd-loop-title a {
    color: inherit;
    text-decoration: none;
}

.zd-loop-title a:hover {
    color: #e63946;
}

/* Responsive — na tabletu, big = 2 kolone od 2 */
@media (max-width: 1024px) {
    .zd-hero-loop .elementor-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .zd-hero-loop .elementor-grid > article:nth-child(3n+1),
    .zd-hero-loop .elementor-grid > .e-loop-item:nth-child(3n+1) {
        grid-column: span 2;
        grid-row: auto;
    }
    .zd-hero-loop .elementor-grid > article:nth-child(3n+1) .zd-loop-title,
    .zd-hero-loop .elementor-grid > .e-loop-item:nth-child(3n+1) .zd-loop-title {
        font-size: 26px !important;
    }
}

/* Mobile — sve full width */
@media (max-width: 600px) {
    .zd-hero-loop .elementor-grid {
        grid-template-columns: 1fr !important;
    }
    .zd-hero-loop .elementor-grid > article:nth-child(3n+1),
    .zd-hero-loop .elementor-grid > .e-loop-item:nth-child(3n+1) {
        grid-column: span 1;
    }
    .zd-hero-loop .elementor-grid > article:nth-child(3n+1) .zd-loop-title,
    .zd-hero-loop .elementor-grid > .e-loop-item:nth-child(3n+1) .zd-loop-title {
        font-size: 22px !important;
    }
}


.hero_loop .elementor-posts-container .elementor-post:nth-child(1) {
    grid-column: span 4;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(1) .elementor-post__text h3 {
    margin-top: -80px;
    z-index: 2;
    position: absolute;
    padding: 0 30px 0px 30px;
    font-size: 30px;
    left: 0;
    right: 0;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(1) .elementor-post__text h3 a {
    color: white;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(2) {
    grid-column: span 2;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(3) {
    grid-column: span 2;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(1) .elementor-post__thumbnail {
    position: relative;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(1) .elementor-post__thumbnail::after {
    position: absolute;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(1) .elementor-post__thumbnail__link {
    margin-bottom: 0!important;
}

/* ==========================================================================
   HERO LOOP — dark gradient overlay na 1. (velikom) postu
   Pokriva oba scenarija: .hero_loop (user selector) i .zd-hero-loop (naš)
   ========================================================================== */

/* Parent thumbnail mora biti relative da overlay sjedne preko */
.hero_loop .elementor-posts-container .elementor-post:nth-child(1) .elementor-post__thumbnail,
.zd-hero-loop .elementor-grid > .e-loop-item:nth-child(3n+1) .zd-loop-img,
.zd-hero-loop .elementor-grid > article:nth-child(3n+1) .zd-loop-img {
    position: relative;
    overflow: hidden;
}

/* Dark gradient overlay (od dna prema vrhu) */
.news_loop .elementor-posts-container .elementor-post .elementor-post__thumbnail::after,
.hero_loop .elementor-posts-container .elementor-post .elementor-post__thumbnail::after,
.zd-hero-loop .elementor-grid > .e-loop-item:nth-child(3n+1) .zd-loop-img::after,
.zd-hero-loop .elementor-grid > article:nth-child(3n+1) .zd-loop-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.35) 45%,
        rgba(0, 0, 0, 0) 75%
    );
    pointer-events: none;
    z-index: 1;
}

/* Tekst (naslov, kategorija) preko slike — zalijepi na dno */
.hero_loop .elementor-posts-container .elementor-post:nth-child(1) {
    position: relative;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(1) .elementor-post__text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 2;
    color: #ffffff;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(1) .elementor-post__title a,
.hero_loop .elementor-posts-container .elementor-post:nth-child(1) .elementor-post__title {
    color: #ffffff !important;
}

/* Hover — lagano pojačaj gradient */

.news_loop .elementor-posts-container .elementor-post {
    position: relative;
}

.news_loop .elementor-posts-container .elementor-post .elementor-post__text h3 {
    margin-top: -60px;
    z-index: 2;
    position: absolute;
    padding: 0 20px 0 20px;
    left: 0;
    right: 0;
    bottom: 20px;
}

.hero_loop .elementor-posts-container .elementor-post .elementor-post__text h3 a,
.news_loop .elementor-posts-container .elementor-post .elementor-post__text h3 a {
    color: white;
}

.news_loop .elementor-posts-container .elementor-post .elementor-post__thumbnail__link {
    margin-bottom: 0!important;
}

.news_loop .elementor-posts-container .elementor-post:last-child a div.elementor-post__thumbnail {
    padding-bottom: calc(0.685 * 100%);
}

.hero_loop .elementor-posts-container .elementor-post {
    position: relative;
}

.hero_loop .elementor-posts-container .elementor-post:nth-child(2) .elementor-post__text h3,
.hero_loop .elementor-posts-container .elementor-post:nth-child(3) .elementor-post__text h3 {
    margin-top: -60px;
    z-index: 2;
    position: absolute;
    padding: 0 20px 0 20px;
    left: 0;
    right: 0;
    bottom: 40px;
}

.elementor-divider, .elementor-widget-divider {
    display: unset!important;
}