/**
 * Početna — mobile-first UX (bazni viewport 360px)
 */

/* -------------------------------------------------------------------------- */
/* Zajedničko — sekcije početne                                               */
/* -------------------------------------------------------------------------- */
.page-home .section {
    padding-block: var(--section-padding-y-sm);
}

.page-home .section--muted {
    padding-block: var(--section-padding-y-sm);
}

.page-home .section__header,
.page-home .section-head {
    margin-bottom: var(--space-8);
}

.page-home .section__title {
    font-size: var(--type-h2);
}

.page-home .section__subtitle,
.page-home .section-head__subtitle {
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
}

.page-home .section__footer-link {
    margin-top: var(--space-8);
}

@media (min-width: 48rem) {
    .page-home .section,
    .page-home .section--muted {
        padding-block: var(--section-padding-y);
    }

    .page-home .section__header,
    .page-home .section-head {
        margin-bottom: var(--space-10);
    }

    .page-home .section__footer-link {
        margin-top: var(--space-10);
    }
}

/* -------------------------------------------------------------------------- */
/* Hero — mobil: naslov → CTA → poziv → vizuel                                  */
/* -------------------------------------------------------------------------- */
.home-hero {
    background: var(--color-dark);
    color: var(--color-accent);
    border-bottom: 3px solid var(--color-primary);
}

.home-hero__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding-block: var(--space-5) var(--space-6);
}

.home-hero__copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.home-hero__eyebrow {
    margin: 0;
    font-size: var(--font-size-xs);
}

.home-hero__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 6.5vw, var(--font-size-3xl));
    font-weight: var(--font-weight-bold);
    line-height: 1.15;
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-accent);
    text-wrap: balance;
}

.home-hero__actions {
    margin: 0;
    gap: var(--space-3);
}

.home-hero__actions .btn {
    min-height: var(--touch-min);
    width: 100%;
}

.home-hero__cta-primary {
    font-size: var(--font-size-md);
}

.home-hero__lead {
    margin: 0;
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
    color: rgba(255, 255, 255, 0.82);
    text-wrap: pretty;
}

.home-hero__visual {
    margin: 0;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    aspect-ratio: 16 / 10;
    max-height: 11.5rem;
    background: var(--color-dark-soft);
}

.home-hero__picture,
.home-hero__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 40%,
        rgba(34, 34, 34, 0.35) 100%
    );
    pointer-events: none;
}

.home-hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-hero__trust .badge {
    font-size: 0.6875rem;
    padding: var(--space-1) var(--space-2);
}

/* -------------------------------------------------------------------------- */
/* Hero — desktop: naslov + vizuel u ravnoteži                                 */
/* -------------------------------------------------------------------------- */
@media (min-width: 48rem) {
    .home-hero__inner {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        grid-template-areas:
            "copy visual";
        align-items: center;
        gap: var(--space-6) var(--space-10);
        padding-block: var(--space-12) var(--space-16);
        min-height: clamp(22rem, 72vh, 36rem);
    }

    .home-hero__copy {
        grid-area: copy;
        gap: var(--space-5);
        align-self: center;
        max-width: 36rem;
    }

    .home-hero__eyebrow {
        font-size: var(--font-size-sm);
    }

    .home-hero__title {
        font-size: var(--type-display);
        line-height: var(--line-height-tight);
    }

    .home-hero__actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .home-hero__actions .btn {
        width: auto;
        flex: 0 1 auto;
    }

    .home-hero__lead {
        font-size: var(--font-size-lg);
    }

    .home-hero__visual {
        grid-area: visual;
        align-self: stretch;
        max-height: none;
        min-height: 16rem;
        aspect-ratio: 4 / 3;
    }

}

@media (min-width: 64rem) {
    .home-hero__inner {
        gap: var(--space-10) var(--space-12);
        padding-block: var(--space-16) var(--space-20);
    }

    .home-hero__visual {
        min-height: 20rem;
    }
}

/* -------------------------------------------------------------------------- */
/* Zašto mi — kartice                                                         */
/* -------------------------------------------------------------------------- */
.home-why__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-why__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    border-left: 4px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.home-why__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--color-heading);
    line-height: var(--line-height-snug);
}

@media (min-width: 48rem) {
    .home-why__card {
        padding: var(--space-6);
    }

    .home-why__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 64rem) {
    .home-why__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* -------------------------------------------------------------------------- */
/* Usluge preview                                                             */
/* -------------------------------------------------------------------------- */
.home-services .card-grid {
    gap: var(--gap-grid);
}

.home-services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
}

.home-services__card {
    padding: var(--space-5);
}

.home-services__card .service-card__icon {
    width: var(--touch-min);
    height: var(--touch-min);
    margin-bottom: var(--space-4);
    font-size: var(--font-size-sm);
}

.home-services__card .service-card__title {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-snug);
}

.home-services__card .service-card__text {
    font-size: var(--font-size-md);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.home-services__card .service-card__title a {
    color: inherit;
    text-decoration: none;
}

.home-services__card .service-card__title a:hover {
    color: var(--color-text-accent-hover);
}

.home-services .section__footer-link .btn {
    width: 100%;
}

@media (min-width: 48rem) {
    .home-services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-services__card .service-card__text {
        -webkit-line-clamp: unset;
        display: block;
    }

    .home-services .section__footer-link .btn {
        width: auto;
    }
}

@media (min-width: 64rem) {
    .home-services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* -------------------------------------------------------------------------- */
/* Izvedeni radovi — karusel                                                   */
/* -------------------------------------------------------------------------- */
.home-work__carousel {
    max-width: 56rem;
    margin-inline: auto;
}

.showcase-carousel--work {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.showcase-carousel--work .showcase-carousel__caption {
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
}

/* -------------------------------------------------------------------------- */
/* Projekti preview                                                           */
/* -------------------------------------------------------------------------- */
.home-projects .section__header {
    text-align: left;
}

.home-projects__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
}

.home-projects .showcase-carousel {
    margin-block: 0 var(--space-6);
}

.home-project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

@media (prefers-reduced-motion: no-preference) {
    .home-project-card {
        transition: box-shadow var(--transition-base);
    }

    .home-project-card:hover {
        box-shadow: var(--shadow-md);
    }

    .home-project-card__image {
        transition: transform 0.25s ease;
    }

    .home-project-card:hover .home-project-card__image {
        transform: scale(1.03);
    }
}

.home-project-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.home-project-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-border);
}

.home-project-card__media--placeholder {
    background: linear-gradient(135deg, #e5e5e5 0%, #c8c8c8 100%);
}

.home-project-card__media--contain {
    aspect-ratio: auto;
    min-height: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-dark);
    padding: var(--space-4);
}

.home-project-card__media--contain .home-project-card__image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 14rem;
    object-fit: contain;
}

.home-projects__single .home-project-card {
    max-width: 48rem;
    margin-inline: auto;
}

.home-project-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-project-card__body {
    padding: var(--space-4) var(--space-5);
    border-top: 3px solid var(--color-primary);
}

.home-project-card__title {
    margin: 0 0 var(--space-2);
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-heading);
    line-height: var(--line-height-snug);
}

.home-project-card__caption {
    margin: 0;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-muted);
}

.home-projects__placeholder {
    padding: var(--space-8);
    text-align: center;
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
}

.home-projects__placeholder-text {
    margin: 0;
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    max-width: 36rem;
    margin-inline: auto;
}

.home-projects .section__footer-link .btn {
    width: 100%;
}

@media (min-width: 48rem) {
    .home-projects__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-project-card__media {
        aspect-ratio: 3 / 2;
    }

    .home-projects .section__footer-link .btn {
        width: auto;
    }
}

@media (min-width: 64rem) {
    .home-projects__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* -------------------------------------------------------------------------- */
/* Statistika — kompaktna 2×2 na mobilu                                       */
/* -------------------------------------------------------------------------- */
.home-stats {
    background: var(--color-dark);
    color: var(--color-accent);
    padding: var(--space-8) 0;
    border-block: 3px solid var(--color-primary);
}

.home-stats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-stats__item {
    padding: var(--space-5) var(--space-4);
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
}

.home-stats__value {
    margin: 0 0 var(--space-2);
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 6vw, var(--font-size-3xl));
    font-weight: var(--font-weight-bold);
    color: var(--color-text-accent);
    line-height: 1;
}

.home-stats__label {
    margin: 0;
    font-size: var(--font-size-xs);
    line-height: var(--line-height-snug);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    color: rgba(255, 255, 255, 0.72);
}

@media (min-width: 48rem) {
    .home-stats {
        padding: var(--space-12) 0;
    }

    .home-stats__grid {
        gap: var(--gap-grid);
    }

    .home-stats__item {
        padding: var(--space-6);
    }

    .home-stats__label {
        font-size: var(--font-size-sm);
    }
}

@media (min-width: 64rem) {
    .home-stats__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .home-stats__item {
        background: transparent;
        border: none;
        padding: var(--space-4);
    }
}

/* -------------------------------------------------------------------------- */
/* Proces                                                                     */
/* -------------------------------------------------------------------------- */
.home-process__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-4);
}

.home-process__step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-4);
    align-items: start;
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
}

.home-process__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-min);
    height: var(--touch-min);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    background: var(--color-dark);
    color: var(--color-text-accent);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.home-process__title {
    margin: 0 0 var(--space-2);
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    color: var(--color-heading);
    line-height: var(--line-height-snug);
}

.home-process__text {
    margin: 0;
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed);
}

@media (min-width: 48rem) {
    .home-process__step {
        padding: var(--space-6);
        gap: var(--space-5);
    }

    .home-process__title {
        font-size: var(--font-size-xl);
    }
}

/* -------------------------------------------------------------------------- */
/* Utisci                                                                     */
/* -------------------------------------------------------------------------- */
.home-testimonials__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
}

.home-testimonial {
    margin: 0;
    padding: var(--space-6) var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.home-testimonial::before {
    content: "“";
    font-family: var(--font-heading);
    font-size: 2.25rem;
    line-height: 1;
    color: var(--color-text-accent);
    margin-bottom: calc(-1 * var(--space-3));
}

.home-testimonial__quote {
    margin: 0;
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
    color: var(--color-text);
    flex: 1;
}

.home-testimonial__footer {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-4);
}

.home-testimonial__author {
    display: block;
    font-family: var(--font-heading);
    font-weight: var(--font-weight-semibold);
    font-style: normal;
    color: var(--color-heading);
    font-size: var(--font-size-md);
}

.home-testimonial__role {
    display: block;
    margin-top: var(--space-1);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

@media (min-width: 48rem) {
    .home-testimonials__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-testimonial {
        padding: var(--space-8) var(--space-6);
    }

    .home-testimonial::before {
        font-size: 3rem;
    }
}

@media (min-width: 64rem) {
    .home-testimonials__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* -------------------------------------------------------------------------- */
/* Blog preview                                                               */
/* -------------------------------------------------------------------------- */
.home-blog__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
}

@media (min-width: 48rem) {
    .home-blog__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 64rem) {
    .home-blog__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* -------------------------------------------------------------------------- */
/* CTA ponuda                                                                 */
/* -------------------------------------------------------------------------- */
.home-cta .cta-banner__text {
    font-size: var(--font-size-md);
}

.home-cta__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
}

.home-cta__actions .btn {
    width: 100%;
    min-height: var(--touch-min);
}

@media (min-width: 48rem) {
    .home-cta__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .home-cta__actions .btn {
        width: auto;
    }

    .home-cta .cta-banner__text {
        font-size: var(--font-size-lg);
    }
}
