/*
 * Oranje Topola — custom styles
 *
 * Child theme of Quark 2. This file is loaded last, so rules here override
 * theme.css without !important.
 */

/* ---- Page title (service pages) ---- */
.page-title {
    margin-bottom: 1.5rem;
}

/* ---- Gallery grid on service pages ---- */
.page-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin: 0 0 2.5rem;
}
.page-gallery-item {
    display: block;
    border-radius: var(--q2-radius-md);
    overflow: hidden;
    box-shadow: var(--q2-shadow-card);
    transition: transform .2s ease, filter .2s ease;
}
.page-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}
.page-gallery-item:hover {
    transform: translateY(-3px);
    filter: brightness(0.93);
}

/* Mobile: gallery becomes a swipeable filmstrip (like the old site slider) */
@media (max-width: 640px) {
    .page-gallery {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin-inline: -1rem;
        padding-inline: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        cursor: grab;
    }
    .page-gallery::-webkit-scrollbar {
        display: none;
    }
    .page-gallery.dragging {
        cursor: grabbing;
        scroll-snap-type: none;
    }
    .page-gallery-item {
        flex: 0 0 75%;
        scroll-snap-align: start;
        transition: none;
        user-select: none;
        -webkit-user-drag: none;
    }
}

/* ---- Homepage feature cards with images ----
 * Column counts come from the theme's Layout option: class "standard" in the
 * features module frontmatter renders 3 / 2 / 1 columns (desktop / tablet / phone). */
.feature-card {
    display: flex;
    flex-direction: column;
}
.feature-card .feature-link {
    border-radius: var(--q2-radius-md);
    overflow: hidden;
    box-shadow: var(--q2-shadow-card);
    background: var(--q2-card-bg, var(--q2-bg-elevated, var(--q2-bg)));
    transition: transform .2s ease, filter .2s ease;
}
.feature-card .feature-link:hover {
    transform: translateY(-3px);
    filter: brightness(0.95);
}
.feature-image img {
    display: block;
    width: 100%;
    height: auto;
}
.feature-card .feature-icon {
    margin-top: 0.75rem;
    padding: 0 1rem;
}
.feature-card .feature-icon i {
    color: var(--q2-accent);
}
.feature-card h6 {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.05rem;
    text-transform: none;
    letter-spacing: 0;
}
.feature-card .feature-content {
    padding: 0 1rem 1rem;
}
.feature-card .feature-content p {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    line-height: 1.45;
}
.feature-more {
    color: var(--q2-link);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ---- Homepage stats ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}
.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.25rem 1rem;
    border-radius: var(--q2-radius-md);
    background: color-mix(in oklab, var(--q2-accent) 8%, transparent);
}
.stat-number {
    font-family: var(--q2-font-display, inherit);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1;
    color: var(--q2-accent);
}
.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--q2-text-muted, inherit);
}

/* ---- Responsive YouTube embed ---- */
.video-embed {
    position: relative;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto 2rem;
    aspect-ratio: 16 / 9;
    border-radius: var(--q2-radius-md);
    overflow: hidden;
    box-shadow: var(--q2-shadow-card);
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---- Footer contact grid ---- */
#footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: left;
}
#footer .footer-col h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}
#footer .footer-col p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.7;
}
#footer a {
    color: var(--q2-link);
}
/* Contact links as full-width pills so the footer reaches the right edge */
#footer .footer-col:last-child a {
    display: block;
    padding: 0.4rem 0.75rem;
    margin: 0 0 0.4rem;
    background: color-mix(in oklab, var(--q2-accent) 10%, transparent);
    border-radius: 999px;
    text-align: center;
    font-weight: 600;
}
#footer .footer-col:last-child a:hover {
    background: color-mix(in oklab, var(--q2-accent) 22%, transparent);
    text-decoration: none;
}

/* ---- "Vidi još" related links ---- */
.related-links {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid color-mix(in oklab, var(--q2-text) 12%, transparent);
}
.related-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1.5rem;
}
.related-links li a {
    display: inline-block;
    font-weight: 600;
}

/* ---- Lightbox ---- */
.ot-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.92);
    animation: ot-fade-in .18s ease-out;
}
.ot-lightbox[hidden] {
    display: none;
}
.ot-lightbox figure {
    margin: 0;
    max-width: 100%;
    cursor: zoom-out;
}
.ot-lightbox img {
    display: block;
    max-width: min(92vw, 1400px);
    max-height: 86vh;
    width: auto;
    height: auto;
    border-radius: var(--q2-radius-md, 6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: opacity .15s ease;
}
.ot-lightbox img.is-loading {
    opacity: 0.4;
}
.ot-lightbox button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 0;
    border-radius: 50%;
    min-width: 2.75rem;
    min-height: 2.75rem;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}
.ot-lightbox button:hover {
    background: rgba(255, 255, 255, 0.22);
}
.ot-lightbox .ot-lightbox-close {
    top: 1rem;
    right: 1rem;
    transform: none;
}
.ot-lightbox .ot-lightbox-prev {
    left: 1rem;
}
.ot-lightbox .ot-lightbox-next {
    right: 1rem;
}
.ot-lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}
@keyframes ot-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (max-width: 640px) {
    .ot-lightbox button {
        min-width: 2.25rem;
        min-height: 2.25rem;
        font-size: 1.6rem;
    }
    .ot-lightbox .ot-lightbox-prev { left: 0.5rem; }
    .ot-lightbox .ot-lightbox-next { right: 0.5rem; }
}
