:root {
    --cadet-grey: #8f9ab2;
    --blue-charcoal: #0b111e;
    --casal: #2c6270;
    --macaw-blue-green: #43bfc7;
    --toolbox: #746cc0;
    --dark-grey-blue: #29465b;
    --baltic-sea: #29292f;
    --jaguar: #02050f;
    --ebony: #090e1c;
    --deluge: #7e62aa;
    --elephant: #0f3c3f;
    --toolbox: #7873b1;
    --macaw-blue-green: #5dbbd2;
    --dark-grey-blue: #254d5c;
    --aquamarine-blue: #76d6e5;
    --gull-grey: #9ba6c0;
    --dark-slate-grey: #24333e;
    --slate-grey: #6b7f9b;
    --river-bed: #395061;
    --mirage: #0f1526;
    --cadet-blue: #a6b2cc;
    --medium-turquoise: #58c7d7;
    --zircon: #f4f8ff;
    --lynch: #6e7b98;
    --shamrock: #54d6a6;
}

/* text colors */
.text-lilac-bush {
    color: #9b7ed1;
}
.text-lynch {
    color: var(--lynch);
}
.text-zircon {
    color: var(--zircon);
}
.text-cadet-blue {
    color: var(--cadet-blue);
}
.text-cadet-grey {
    color: var(--cadet-grey);
}
.text-blue-charcoal {
    color: var(--blue-charcoal);
}
.text-aquamarine-blue {
    color: var(--aquamarine-blue);
}
.text-gull-grey {
    color: var(--gull-grey);
}
.text-slate-grey {
    color: var(--slate-grey);
}
.text-aquamarine-blue {
    color: var(--aquamarine-blue);
}
.text-macaw-blue-green {
    color: var(--macaw-blue-green);
}
.text-medium-turquoise {
    color: var(--medium-turquoise);
}
.text-shamrock {
    color: var(--shamrock);
}
/* background colors */
.bg-ebony {
    background-color: var(--ebony);
}
.bg-dark-slate-grey {
    background-color: var(--dark-slate-grey);
}
.bg-mirage {
    background: var(--mirage);
}
.bg-gradient-macaw-toolbox {
    background: linear-gradient(135deg, var(--macaw-blue-green) 0%, var(--toolbox) 100%) !important;
}
.bg-white-5 {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.bg-big-stone {
    background: rgba(20, 28, 48, 0.55);
}

.bg-gradient-cta-card {
    background: linear-gradient(135deg, rgba(31, 42, 68, 0.7) 0%, rgba(15, 60, 63, 0.55) 100%);
}
.bg-gradient-fade {
    background: linear-gradient(0deg, #090f1d 0%, rgba(9, 15, 29, 0) 100%);
}

.bg-ebony-gradient {
    background: linear-gradient(180deg, #090e1c 100%, rgba(9, 14, 28, 0.5) 50%);
    height: 250px;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
}

.bg-ebony-gradient-1 {
    background: linear-gradient(180deg, #090e1c 100%, rgba(9, 14, 28, 0.5) 50%);
}

/* border colors */
.border-dark-grey-blue {
    border-color: var(--dark-grey-blue) !important;
}

.border-river-bed {
    border-color: var(--river-bed) !important;
}
.border-dark-slate-grey {
    border-color: var(--dark-slate-grey) !important;
}
.border-river-bed {
    border-color: var(--river-bed) !important;
}
.border-white-8 {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.border-white-b-5 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.border-lilac-bush {
    border: 1px solid rgba(155, 126, 209, 0.5);
}
/* font sizes */
.fs-12 {
    font-size: 12px;
}
.fs-13 {
    font-size: 13px;
}
.fs-14 {
    font-size: 14px;
}
.fs-15 {
    font-size: 15px;
}
.fs-17 {
    font-size: 17px;
}
.fs-18 {
    font-size: 18px;
}
.fs-19 {
    font-size: 19px;
}
.fs-30 {
    font-size: 30px;
    line-height: 1.25;
}
.fs-32 {
    font-size: 32px;
    line-height: 1.25;
}
.fs-36 {
    font-size: 36px;
    line-height: 1.25;
}
.fs-48 {
    font-size: 48px;
    line-height: 1.2;
}
.fs-42 {
    font-size: 42px;
    line-height: 1.2;
}
.fs-52 {
    font-size: 52px;
    line-height: 1.2;
}
.fs-60 {
    font-size: 60px;
    line-height: 1.2;
}
.fs-62 {
    font-size: 62px;
    line-height: 1.2;
}
.fs-72 {
    font-size: 72px;
    line-height: 1.2;
}

/* Consistent reading rhythm for body copy and compact headings. */
p {
    line-height: 1.6;
}
h4,
h5,
h6 {
    line-height: 1.3;
}

/* Shared scale for page hero headings. */
.hero-title {
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.hero-section .hero-title .text-gradient-clip {
    display: inline;
}

/* padding */
.py-32 {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
}

.py-12 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.px-13 {
    padding-left: 13px !important;
    padding-right: 13px !important;
}
.p-10 {
    padding: 10px;
}
.pt-32 {
    padding-top: 32px !important;
}

.pt-60 {
    padding-top: 60px !important;
}
.pt-80 {
    padding-top: 80px !important;
}
.pt-100 {
    padding-top: 100px !important;
}
.radius-12 {
    border-radius: 12px !important;
}
.radius-24 {
    border-radius: 24px !important;
}
.radius-18 {
    border-radius: 18px !important;
}
.radius-40 {
    border-radius: 40px !important;
}

.radius-left-40 {
    border-radius: 40px 0 0 40px !important;
}
.radius-right-40 {
    border-radius: 0 40px 40px 0 !important;
}

/* position */
.right-20 {
    right: 20%;
}
.right-10 {
    right: 10%;
}

.max-width-100 {
    max-width: 100px;
}
.min-w-200 {
    width: 200px;
}
.box-shadow-1 {
    box-shadow: inset 0 1px 0 1px rgba(255, 255, 255, 0.05);
}
.height-38 {
    height: 38px;
}
.width-38 {
    width: 38px;
}
.height-50 {
    height: 50px;
}
.width-50 {
    width: 50px;
}
.min-height-50 {
    height: 50px;
}
.min-width-50 {
    width: 50px;
}
.min-height-28 {
    height: 28px;
}
.min-width-28 {
    width: 28px;
}
/* Primjenjuje se samo na desktop ekranima (iznad 1200px) */
@media (width > 1200px) {
    /* Aktiviraj otvaranje na hover SAMO za dropdown-e unutar glavnih linkova (.navbar-nav) */
    .navbar .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeIn 0.15s ease-in-out;
    }

    /* Onemogući klik na desktopu SAMO za te glavne dropdown linkove (npr. Products) */
    .navbar .navbar-nav .dropdown-toggle {
        pointer-events: none; /* Blokira klik, hover radi */
    }

    /* Dopusti normalne klikove unutar otvorenog menija na linkove */
    .navbar .navbar-nav .dropdown-menu {
        pointer-events: auto;
    }
}

/* Glatka animacija pojavljivanja */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#langDropdown:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}
#langDropdown:focus-visible {
    outline: 2px solid var(--aquamarine-blue);
    outline-offset: 3px;
    box-shadow: none;
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: clip;
}

/* Keep decorative glows inside their sections without creating scroll containers. */
section:has(> [class^='ellipse-']) {
    overflow: clip;
}

/* Match large grid gutters with the container's horizontal padding. */
.container > .row.g-5 {
    margin-inline: 0;
}
@media (max-width: 991.98px) {
    .row.g-5 {
        --bs-gutter-x: 1.5rem;
    }
    .about-team-section > .row > .position-absolute {
        position: static !important;
    }
    .about-team-section > .row {
        margin-left: 0;
    }
    .about-team-section > .row > .position-absolute {
        margin-bottom: 32px;
    }
    h1,
    h2,
    h3 {
        overflow-wrap: anywhere;
    }
}

/* Pseudo-element koji crta mrežu preko cijelog ekrana */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Crta vertikalne i horizontalne linije */
    background-image:
        linear-gradient(to right, rgba(31, 48, 97, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(31, 48, 97, 0.05) 1px, transparent 1px);
    /* Veličina kvadrata u mreži (prilagodi po želji) */
    background-size: 70px 70px;
    /* Osigurava da je mreža iza svog sadržaja na stranici */
    z-index: -1;
    pointer-events: none;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1380px;
    }
}

.breadcrumb {
    align-items: center;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '' !important;
    float: none;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    margin-right: 10px;
    padding: 0;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    color: var(--aquamarine-blue);
}

.breadcrumb-item.active {
    color: var(--aquamarine-blue);
    font-size: 15px !important;
    font-weight: 400 !important;
}

.text-content {
    p {
        font-size: 18px;
        color: #ffffff;
        font-weight: 400;
        padding: 10px 0;
    }
    h2 {
        font-size: 32px;
        line-height: 1.25;
        color: #ffffff;
        font-weight: 800;
        padding: 10px 0;
    }
    h3 {
        font-size: 24px;
        line-height: 1.3;
        color: #ffffff;
        font-weight: 800;
        padding: 10px 0;
    }
    li {
        font-size: 18px;
        color: #ffffff;
        font-weight: 400;
        padding: 10px 0;
    }

    .nav-link {
        font-size: 14px;
        color: #a6b2cc;
        font-weight: 400;
    }
    .active {
        color: #58c7d7;
    }

    /* Kontejner menija dobiva odmak za liniju preko klase .sidebar-nav */
    .sidebar-nav {
        position: relative;
        padding-left: 20px;
    }

    .sidebar-nav::before {
        content: '';
        position: absolute;
        left: 0;
        top: 5px;
        bottom: 5px;
        width: 2px;
        background-color: rgba(255, 255, 255, 0.08);
        border-radius: 10px;
    }

    .sidebar-nav .nav-link {
        position: relative;
        display: block;
        color: #a6b2cc;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .sidebar-nav .nav-link.active {
        color: #4fd1c5;
    }

    .sidebar-nav .nav-link.active::before {
        content: '';
        position: absolute;
        left: -20px;
        top: 0;
        width: 2px;
        height: 100%;
        background-color: #58c7d7;
        border-radius: 10px;
    }
}
/* Diskretan prikaz sekcija pri skrolovanju. */
/* Mobile spacing: keep content and card edges comfortably inside the viewport. */
@media (max-width: 767.98px) {
    :root {
        --mobile-gutter: 24px;
    }

    .container {
        max-width: 100%;
        padding-inline: var(--mobile-gutter) !important;
    }
    .navbar {
        padding-inline: 0 !important;
    }
    .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
    }
    .offcanvas {
        --bs-offcanvas-width: min(360px, 100vw);
    }
    .offcanvas-header,
    .offcanvas-body {
        padding-inline: var(--mobile-gutter);
    }

    /* Remove negative outer gutters, including rows with unpadded columns. */
    .container > .row {
        margin-inline: 0;
        --bs-gutter-x: 0;
    }
    .container > .row > [class*='col-'] {
        min-width: 0;
    }
    .container.bg-gradient-cta-card {
        width: calc(100% - 2 * var(--mobile-gutter));
        padding: 32px 20px !important;
    }
    .container .p-5 {
        padding: 24px !important;
    }

    .hero-title {
        font-size: clamp(30px, 7.5vw, 42px);
    }
    .fs-42,
    .fs-48,
    .fs-52,
    .fs-60,
    .fs-62,
    .fs-72 {
        font-size: clamp(28px, 7vw, 38px);
        line-height: 1.2;
    }
    .fs-30,
    .fs-32,
    .fs-36 {
        font-size: 26px;
        line-height: 1.25;
    }
    .fs-19 {
        font-size: 17px;
        line-height: 1.6;
    }
    .pt-80,
    .pt-100 {
        padding-top: 48px !important;
    }
    .home-hero {
        padding-block: 32px;
    }
    .hero-section > .row {
        row-gap: 32px;
    }
    .hero-section .row:has(> .col-4) {
        gap: 12px !important;
        margin-inline: 0;
    }
    .hero-section .row > .col-4 {
        flex: 1 1 0;
        min-width: 0;
        padding-inline: 0;
        margin-inline: 0 !important;
    }
    .hero-section .row > .col-4 p {
        font-size: 13px;
    }
    .hero-section .d-flex.flex-wrap:has(> a) {
        gap: 12px !important;
    }
    .hero-section .d-flex.flex-wrap > a {
        justify-content: center;
    }

    .d-flex:has(> .w-50) {
        flex-direction: column;
        align-items: stretch !important;
    }
    .d-flex > .w-50 {
        width: 100% !important;
    }
    .d-flex > .w-50 > p {
        margin-bottom: 16px !important;
    }
    #projectCategoryDropdown {
        width: 100%;
        min-width: 0;
    }

    .bg-ebony-gradient-1 .max-width-100 {
        max-width: none;
    }
    .bg-ebony-gradient-1 a img {
        max-width: 100%;
        height: auto;
    }

    .home-about-section > .row,
    .about-team-section > .row {
        row-gap: 32px;
    }
    .home-about-section > .row > [class*='col-'],
    .about-team-section > .row > [class*='col-'] {
        padding-inline: 0 !important;
    }
    .home-about-section .radius-left-40,
    .about-team-section .radius-right-40 {
        border-radius: 24px !important;
        padding: 12px !important;
    }
    .cta .col-6.offset-3 {
        width: 100%;
        margin-left: 0;
    }
    .floating-shape {
        display: none;
    }
    .form-card .form-control,
    .form-card .form-select {
        font-size: 16px;
    }
    .d-flex > div {
        min-width: 0;
    }
    .d-flex > svg,
    .d-inline-flex > svg {
        flex-shrink: 0;
    }
    p,
    li,
    a {
        overflow-wrap: anywhere;
    }
    footer li.d-flex {
        flex-wrap: wrap;
        column-gap: 8px;
        row-gap: 4px;
    }
    footer .row:last-child {
        row-gap: 12px;
    }
    .news-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Stack the CMS previews above their copy below 1200px. */
@media (width < 1200px) {
    .home-news-product > .col-lg-5,
    .home-news-product > .col-lg-7,
    .home-shop-product > .col-lg-5,
    .home-shop-product > .col-lg-7 {
        width: 100%;
    }
    .home-news-product > .col-lg-7 {
        order: -1;
    }
}

/* The full navigation starts strictly above 1200px. */
.navbar-mobile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
@media (max-width: 374.98px) {
    .navbar > .container > a img {
        max-width: 120px;
        height: auto;
    }
    .navbar-mobile-actions {
        gap: 8px;
    }
}
@media (width > 1200px) {
    .navbar-mobile-actions {
        display: none;
    }
    .navbar-expand-wide {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    .navbar-expand-wide .navbar-nav {
        flex-direction: row;
        gap: 8px !important;
    }
    .navbar-expand-wide .navbar-toggler {
        display: none;
    }
    .navbar-expand-wide .offcanvas {
        position: static;
        flex-grow: 1;
        width: auto !important;
        height: auto !important;
        visibility: visible !important;
        background-color: transparent !important;
        border: 0 !important;
        transform: none !important;
        transition: none;
    }
    .navbar-expand-wide .offcanvas-header {
        display: none;
    }
    .navbar-expand-wide .offcanvas-body {
        display: flex;
        flex-grow: 0;
        padding: 0;
        overflow-y: visible;
    }
}
@media (max-width: 1200px) {
    .navbar .offcanvas-body > .navbar-nav {
        margin-bottom: 16px !important;
    }
    .navbar .navbar-nav .nav-link.active {
        border-image: none !important;
    }
    .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
    }
    .navbar .offcanvas {
        --bs-offcanvas-width: min(400px, 100vw);
    }
    .navbar .offcanvas-header,
    .navbar .offcanvas-body {
        padding-inline: 24px;
    }
    .navbar .navbar-nav .dropdown-menu {
        position: static;
    }
    .home-about-section > .row > [class*='col-'],
    .about-team-section > .row > [class*='col-'] {
        position: static !important;
        width: 100%;
        margin-left: 0;
    }
}

/* Tablet and compact desktop layout. */
@media (min-width: 768px) and (max-width: 1200px) {
    .hero-title {
        font-size: 36px;
        line-height: 1.2;
    }
    .fs-42,
    .fs-48,
    .fs-52,
    .fs-60,
    .fs-62,
    .fs-72 {
        font-size: 34px;
        line-height: 1.2;
    }
    .fs-30,
    .fs-32,
    .fs-36 {
        font-size: 25px;
        line-height: 1.25;
    }
    .fs-18,
    .fs-19 {
        font-size: 17px;
        line-height: 1.6;
    }
    .text-content h2 {
        font-size: 28px;
        line-height: 1.3;
    }
    .text-content h3 {
        font-size: 22px;
        line-height: 1.35;
    }
    .row > [class*='col-'],
    .d-flex > div {
        min-width: 0;
    }
    .d-flex > svg,
    .d-inline-flex > svg {
        flex-shrink: 0;
    }
    .hero-section > .row {
        row-gap: 32px;
    }
    .hero-orbit-art {
        max-width: 560px;
        margin-inline: auto;
    }
    .pt-80,
    .pt-100 {
        padding-top: 56px !important;
    }
    .container.bg-gradient-cta-card {
        padding: 32px !important;
    }
    .cta .col-6.offset-3 {
        width: 100%;
        margin-left: 0;
    }

    /* Two-column cards need descriptions in normal flow at this width. */
    a:has(> .bg-gradient-fade) {
        background: var(--mirage);
    }
    a:has(> .bg-gradient-fade) > .bg-gradient-fade {
        display: none;
    }
    a:has(> .bg-gradient-fade) > .position-absolute.bottom-0 {
        position: relative !important;
        padding: 20px 4px 4px !important;
    }
    a:has(> .bg-gradient-fade) h3 {
        margin-block: 12px !important;
    }
    a:has(> .bg-gradient-fade) .fs-17 {
        font-size: 14px;
    }
    .d-flex:has(> .w-50) {
        align-items: flex-start !important;
        gap: 24px !important;
    }
    .d-flex > .w-50 {
        flex: 1;
        width: auto !important;
    }
    .d-flex > .w-50 > p {
        margin-bottom: 16px !important;
    }

    .home-about-section,
    .about-team-section {
        padding-inline: 12px !important;
    }
    .home-about-section > .row,
    .about-team-section > .row {
        margin-inline: 0;
        row-gap: 32px;
    }
    .home-about-section > .row > [class*='col-'],
    .about-team-section > .row > [class*='col-'] {
        padding-inline: 0 !important;
    }
    .home-about-section .radius-left-40,
    .about-team-section .radius-right-40 {
        border-radius: 24px !important;
        padding: 12px !important;
    }
    .floating-shape {
        display: none;
    }
    .bg-ebony-gradient-1 .max-width-100 {
        max-width: none;
    }
    footer li.d-flex {
        flex-wrap: wrap;
    }
    footer li a,
    footer li span {
        overflow-wrap: anywhere;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .js-motion .scroll-reveal {
        opacity: 0;
        transform: translateY(16px);
        transition:
            opacity 520ms ease-out,
            transform 520ms ease-out;
    }
    .js-motion .scroll-reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    /* Give project descriptions their own space below the image on phones. */
    .project-card {
        background: var(--mirage);
    }
    .project-card > .bg-gradient-fade {
        display: none;
    }
    .project-card > .position-absolute.bottom-0 {
        position: relative !important;
        padding: 20px 4px 4px !important;
    }
    .project-card h3 {
        margin-block: 12px !important;
    }
}
