/* ── Base ── */
* {
    font-family: "Inter", sans-serif !important;
}

:root {
    color-scheme: light only;
}

/* ── Custom font classes ── */
.naslov {
    color: #71B340;
    font-family: "brush-up", sans-serif !important;
    font-size: 8rem;
}

.hero-highlight {
    color: #71B340;
    font-family: "brush-up", sans-serif !important;
    font-size: 5rem;
}

.section {
    padding: 125px 0;
    background-color: #151515;
}

/* ── Button ── */
.btn {
    color: #fff !important;
    background-color: #71B340 !important;
    border: none;
    border-radius: 50px;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
    z-index: 0;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #71B340;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn:hover {
    transform: scale(1.2) rotate(-3deg);
    color: #fff;
}

.btn:hover::before {
    opacity: 1;
}

/* ── Navbar ── */
/* Bootstrap handles fixed-top; we only need overrides */
.navbar .container-fluid {
    position: relative;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-collapse {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
}

.nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    padding: 0.4rem 1.5rem;
    white-space: nowrap;
}

.nav-links a {
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 0 1.2rem;
    text-decoration: none;
    border-radius: 20px;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: greenyellow;
}

.navbar-toggler {
    border-color: greenyellow;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2300ff00' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.bg-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    filter: brightness(0.9);
}

.bg-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    max-width: 30rem;
    margin: 0 auto;
    height: auto;
    padding-top: 4rem;
}

.hero-img {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 20%;
    transform: translateX(-50%);
    width: 15rem;
    height: auto;
    animation: float 7s ease-in-out infinite;
}

/* ── Marquee ── */
.marquee-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    line-height: 0.73;
    overflow: hidden;
    white-space: nowrap;
    z-index: 0;
}

.marquee-track {
    display: inline-flex;
    animation: marquee 100s linear infinite;
}

.marquee-track span {
    display: inline-block;
    font-size: 22rem;
    font-weight: 700;
    color: #1f1f1f;
    padding-right: 5rem;
    user-select: none;
}

.marquee-reverse .marquee-track {
    animation-direction: reverse;
}

/* ── About me ── */
.aboutme-img {
    position: absolute;
    right: 10%;
    top: -6rem;
    height: 150%;
}

/* ── Portfolio section ── */
.port-sec {
    background-color: #71B340;
    padding: 75px 0 25px 0;
}

.swiper-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #ffffff;
    border: none;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.swiper-btn:hover {
    background-color: greenyellow;
    color: #000;
    transform: scale(1.15);
}

.swiper-btn:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.portfolio-swiper {
    overflow: visible;
}

.portfolio-slide {
    width: 380px !important;
    height: 380px !important;
    overflow: hidden;
    flex-shrink: 0;
}

.portfolio-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    border-radius: 10px;
    overflow: hidden;
}

.portfolio-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-repeat: inherit;
    background-position: inherit;
    background-size: inherit;
    filter: grayscale(100%) contrast(1.05);
    transition: filter 0.45s ease, transform 0.45s ease;
    z-index: 0;
}

.portfolio-slide:hover .portfolio-card::before {
    filter: grayscale(0%) contrast(1);
}

.portfolio-desc {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0;
    z-index: 2;
    min-height: 135px;
    padding: 1.15rem 1.2rem;
    color: #fff;
    background: rgba(10, 10, 10, 0.9);
    border-radius: 10px 10px 0 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    transition: min-height 0.35s ease, background-color 0.35s ease, padding 0.35s ease;
}

.portfolio-slide:hover .portfolio-desc {
    min-height: 145px;
    padding-top: 1.35rem;
    background: rgba(10, 10, 10, 0.96);
}

.portfolio-desc h3 {
    margin-bottom: 0.55rem;
    font-size: 1.2rem;
    line-height: 1.15;
}

.portfolio-desc p {
    color: #d8d8d8;
    margin-bottom: 0.8rem;
    line-height: 1.35;
    font-size: 0.95rem;
}

.portfolio-more {
    font-size: 0.7rem !important;
    padding: 0.6rem 0.5rem !important;
}

.portfolio-more:hover {
    transform: scale(1.08) rotate(-3deg);
}

/* ── Horizontal scroll section (o-meni) ── */
.kaos-scroll-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background-color: #151515;
}

.horizontal-wrapper {
    height: 100vh;
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
}

.horizontal-slide {
    width: 100vw;
    min-width: 100vw;
    height: 100vh;
    flex: 0 0 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-1,
.slide-2 {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.slide-1 {
    background-image: url("img/slide1.webp");
}

.slide-2 {
    background-image: url("img/slide2.webp");
}

.slide-1 .row,
.slide-2 .row {
    min-height: 100vh;
    align-items: flex-end !important;
    padding-bottom: 7rem;
}

/* ── Footer ── */
.site-footer {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 30vh;
    overflow: hidden;
}

.footer__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.footer__bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -15%);
    min-width: 100vw;
    min-height: 100%;
    width: auto;
    height: auto;
    filter: brightness(0.4);
}

.footer__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.footer__container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.footer__sub {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.footer__copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

/* ── Contact page ── */
.contact-section {
    min-height: 100vh;
    padding: 6rem 5vw 4rem;
}

.contact-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.contact-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.contact-screen {
    z-index: 2;
    max-width: 560px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.screen-right {
    padding: 2.5rem 2.25rem;
}

.contact-title {
    font-family: "brush-up", sans-serif !important;
    font-size: 3rem;
    color: #71B340;
    line-height: 1;
}

.kf-input {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid #444;
    color: #ddd;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    padding: 0.6rem 0;
    outline: none;
    transition: border-color 0.2s ease;
}

.kf-input::placeholder {
    color: #555;
}

.kf-input:focus {
    border-bottom-color: #71B340;
}

.kf-textarea {
    min-height: 90px;
    resize: none;
}

.footer__icon,
.contact-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid #71B340;
    color: #71B340;
    font-size: 1.4rem;
    text-decoration: none;
    transition: background-color 0.2s ease,
                color 0.2s ease,
                transform 0.2s ease;
}

.footer__icon:hover,
.contact-social a:hover {
    background-color: #71B340;
    color: #000;
    transform: scale(1.1);
}

.contact-msg {
    margin-top: 1rem;
    width: 100%;
}

.contact-msg.error {
    color: #ffb3b3;
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid rgba(255, 80, 80, 0.35);
    padding: 0.9rem 1rem;
    border-radius: 12px;
}

.contact-msg.ok {
    color: #71B340;
    background: rgba(113, 179, 64, 0.12);
    border: 1px solid rgba(113, 179, 64, 0.4);
    padding: 0.9rem 1rem;
    border-radius: 12px;
}

.kf-input.error {
    border-bottom-color: #ff4d4d;
}

.kf-input.success {
    border-bottom-color: #71B340;
}

/* ── Project modal ── */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: 1fr 42%;
    background: #151515;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.project-modal__media {
    height: 100vh;
    overflow-y: auto;
    padding: 5rem 4vw;
    background: #71B340;
    grid-column: 1;
    grid-row: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.project-modal__media::-webkit-scrollbar {
    display: none;
}

.project-modal__media img {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2rem;
}

.project-modal__info {
    height: 100vh;
    padding: 7rem 4rem 4rem;
    color: #fff;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
    grid-column: 2;
    grid-row: 1;
}

.project-modal__label {
    color: #71B340;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.project-modal__title {
    font-family: "brush-up", sans-serif !important;
    color: #71B340;
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 0.9;
    margin-bottom: 2rem;
}

.project-modal__text {
    color: #d8d8d8;
    line-height: 1.7;
    max-width: 34rem;
}

.project-modal__meta {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    line-height: 1.6;
}

.project-modal__close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #71B340;
    color: #000;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-modal__close:hover {
    transform: scale(1.1) rotate(5deg);
}

body.modal-open {
    overflow: hidden;
}

/* ── Animations ── */
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes float {
    0%   { transform: translateX(-50%) translateY(0px); }
    50%  { transform: translateX(-50%) translateY(-15px); }
    100% { transform: translateX(-50%) translateY(0px); }
}

/* ── Responsive ── */
@media (max-width: 991.98px) {

    .navbar-collapse {
        position: static;
        transform: none;
        margin-top: 0.5rem;
    }

    .nav-links {
        flex-direction: column;
        border-radius: 12px;
        padding: 1rem;
        gap: 0.25rem;
        width: 100%;
        white-space: normal;
    }

    .nav-links a {
        text-align: center;
        width: 100%;
        padding: 0.6rem 1.2rem;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-links a:hover {
        background-color: rgba(173, 255, 47, 0.1);
        color: greenyellow;
    }

    .contact-section {
        justify-content: center !important;
        align-items: center !important;
        padding: 4rem 1rem;
    }

    .contact-screen {
        width: 100%;
        max-width: 650px;
        margin: 0 auto;
        border-radius: 20px;
    }

    .project-modal {
        display: block;
        height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .project-modal::-webkit-scrollbar {
        display: none;
    }

    .project-modal__info {
        position: relative;
        z-index: 2;
        height: auto;
        min-height: auto;
        padding: 6rem 1.5rem 2rem;
        overflow: visible;
    }

    .project-modal__media {
        position: relative;
        z-index: 1;
        height: auto;
        min-height: auto;
        overflow: visible;
        padding: 2rem 1rem 4rem;
        order: 1;
    }

    .project-modal__media img {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 768.98px) {

    .section {
        padding: 100px 0;
    }

    .aboutme-img {
        left: 20%;
    }

    .hero-highlight {
        font-size: 3.5rem;
    }

    .port-sec {
        padding: 55px 0 25px 0;
    }

    .swiper-btn {
        width: 44px;
        height: 44px;
    }

    .portfolio-slide {
        width: 85vw !important;
        height: 380px !important;
    }

    .portfolio-card::before {
        filter: grayscale(0%);
    }

    .portfolio-desc {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0;
        min-height: 135px;
        padding: 1rem;
    }

    .portfolio-slide:hover .portfolio-desc {
        min-height: 135px;
        padding: 1rem;
        background: rgba(10, 10, 10, 0.9);
    }

    .slide-1 {
        background-position: 85% center;
        background-image:
            linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
            url("img/slide1.webp");
    }

    .slide-1 .row {
        padding-bottom: 5rem;
    }

    .slide-2 {
        background-position: 85% center;
        background-image:
            linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
            url("img/slide2.webp");
    }

    .slide-2 .row {
        padding-bottom: 5rem;
    }
}

@media (max-width: 425.98px) {

    .naslov {
        font-size: 5.5rem;
    }

    .hero-content {
        padding-top: 6rem;
    }

    .section {
        padding: 90px 0;
    }

    .port-sec {
        padding: 45px 0 20px 0;
    }

    .marquee-track span {
        font-size: 18rem;
        padding-right: 2rem;
    }

    .swiper-btn {
        width: 42px;
        height: 42px;
    }

    .portfolio-slide {
        width: 88vw !important;
        height: 360px !important;
    }

    .contact-section {
        padding: 2rem 1rem;
    }

    .screen-right {
        padding: 1.5rem;
    }

    .contact-title {
        font-size: 2.4rem;
    }
}
