:root {
    --bg-left: #03060d;
    --bg-mid: #737980;
    --bg-right: #0f2d58;
    --header-a: rgba(105, 110, 118, 0.92);
    --header-b: rgba(74, 92, 120, 0.92);
    --text: #f7f7f8;
    --muted: rgba(247, 247, 248, 0.86);
    --border: rgba(255, 255, 255, 0.45);
    --panel-border: rgba(255, 255, 255, 0.2);
    --panel-bg: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(109, 113, 120, 0.88) 52%, rgba(11, 44, 92, 0.9) 100%);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Montserrat", sans-serif;
    color: var(--text);
    background: linear-gradient(90deg, var(--bg-left) 0%, var(--bg-mid) 48%, var(--bg-right) 100%);
}

a {
    color: inherit;
}

.site-shell {
    width: min(1600px, 100%);
    margin: 0 auto;
    min-height: 100vh;
    border: 3px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 145px;
    padding: 18px 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, var(--header-a) 0%, var(--header-b) 100%);
    border-bottom: 4px solid rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(3px);
}

.site-logo img {
    width: min(285px, 34vw);
    height: auto;
    display: block;
}

.site-nav {
    display: flex;
    align-items: flex-end;
    gap: 32px;
}

.nav-link {
    min-width: 126px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    text-decoration: none;
}

.nav-link-icon {
    width: 42px;
    height: 42px;
    background-image: url("/uploads/cnc-ograde.PNG");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link-label {
    font-size: 35px;
    font-weight: 700;
    font-size: clamp(25px, 1.16vw, 35px);
    letter-spacing: 0.01em;
    color: var(--text);
}

.nav-link.active .nav-link-icon {
    opacity: 1;
    transform: translateY(0);
}

.nav-link:hover .nav-link-label {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: #fff;
    display: block;
}

.site-main {
    flex: 1;
}

.site-footer {
    padding: 26px;
    text-align: center;
    background: rgba(0, 0, 0, 0.45);
    border-top: 1px solid var(--panel-border);
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 0.05em;
}

.hero-home {
    position: relative;
    min-height: calc(100vh - 145px);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    padding: 90px 90px 110px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.55) 0%, rgba(23, 39, 68, 0.68) 100%);
}

.hero-content {
    position: relative;
    max-width: 880px;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(46px, 6vw, 74px);
    line-height: 1.01;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.hero-quote {
    margin: 20px 0 26px;
    font-size: clamp(28px, 2.8vw, 47px);
    font-style: italic;
    font-weight: 700;
    color: #ebecf0;
    max-width: 900px;
}

.hero-lead {
    margin: 0;
    max-width: 860px;
    font-size: clamp(20px, 1.95vw, 38px);
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: 0.02em;
}

.hero-cta {
    margin-top: 46px;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 15px 30px 15px 22px;
    border: 6px solid rgba(255, 255, 255, 0.96);
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(23px, 1.6vw, 33px);
    letter-spacing: 0.02em;
}

.hero-cta-icon {
    width: 44px;
    height: 44px;
    border: 4px solid #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
}

.page-section {
    padding: 38px;
}

.panel {
    border: 1px solid var(--panel-border);
    background: var(--panel-bg);
}

.panel-two-column {
    display: grid;
    grid-template-columns: minmax(280px, 34%) 1fr;
    gap: 40px;
    align-items: start;
    padding: 58px 70px;
}

.panel-content h1,
.contact-form-column h1 {
    margin: 0 0 30px;
    font-size: clamp(46px, 4.4vw, 82px);
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.panel-content p,
.service-panel-content p {
    margin: 0;
    font-size: clamp(19px, 1.1vw, 30px);
    line-height: 1.42;
    font-weight: 600;
    white-space: normal;
}

.service-panel-content p {
    font-size: clamp(16px, 0.84vw, 22px);
    line-height: 1.32;
}

.rich-text {
    font-size: inherit;
    line-height: inherit;
}

.panel-content .rich-text {
    font-size: clamp(19px, 1.1vw, 30px);
    line-height: 1.42;
    font-weight: 600;
}

.service-panel-content .rich-text {
    font-size: clamp(18px, 1vw, 26px);
    line-height: 1.35;
    font-weight: 600;
}

.rich-text p {
    margin: 0 0 0.8em;
}

.rich-text p:last-child {
    margin-bottom: 0;
}

.rich-text ul,
.rich-text ol {
    margin: 0.2em 0 0.9em 1.2em;
    padding: 0;
}

.rich-text li {
    margin: 0.18em 0;
}

.rich-text a {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.panel-image-wrap {
    width: 100%;
}

.panel-image {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.services-hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
}

.services-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--services-hero-image, url("/uploads/img1.jpg"));
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) brightness(0.72) contrast(0.95);
    transform: scale(1.01);
    z-index: 0;
    pointer-events: none;
}

.services-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(138, 141, 150, 0.34);
    z-index: 1;
}

.services-hero-inner {
    position: relative;
    padding: 120px 90px;
    z-index: 2;
}

.services-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 22px;
    width: 100%;
    max-width: 100%;
}

.services-menu-link {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    font-size: clamp(32px, 2.75vw, 56px);
    font-style: italic;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    width: 100%;
    max-width: 100%;
}

.services-menu-icon,
.service-panel-icon {
    width: 66px;
    height: 66px;
    display: inline-block;
    background-image: url("/uploads/cnc-ograde.PNG");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex: 0 0 auto;
}

.services-menu-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.services-menu-link-static {
    cursor: default;
}

.services-menu-link-static:hover {
    text-decoration: none;
}

.services-sections {
    display: grid;
    gap: 24px;
}

.service-panel {
    scroll-margin-top: 170px;
}

.service-panel.panel-two-column {
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
    align-items: stretch;
}

.service-panel .service-panel-content {
    min-width: 0;
}

.service-panel .panel-image-wrap {
    height: 100%;
}

.service-panel .panel-image {
    width: 100%;
    height: 100%;
    min-height: 620px;
    object-fit: cover;
    object-position: center;
}

.service-panel h2 {
    margin: 0 0 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: clamp(42px, 3.4vw, 74px);
    font-style: italic;
    text-transform: uppercase;
    line-height: 1;
    max-width: 100%;
}

.services-menu-link span:last-child,
.services-menu-link-static span:last-child {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
}

.service-panel h2 span:last-child {
    min-width: 0;
    overflow-wrap: normal;
    word-break: keep-all;
}

#lasersko-rezanje .panel-image {
    object-position: 86% center;
}

#projektiranje .service-panel-content p {
    font-size: clamp(18px, 1vw, 26px);
    line-height: 1.35;
}

@media (min-width: 981px) {
    #projektiranje.panel-two-column {
        align-items: start;
    }

    #projektiranje .service-panel-content .rich-text {
        font-size: clamp(20px, 1.1vw, 28px);
        line-height: 1.38;
    }

    #projektiranje .panel-image-wrap {
        height: auto;
        align-self: start;
    }

    #projektiranje .panel-image {
        height: auto;
        min-height: 0;
        max-height: none;
        object-fit: contain;
    }
}

#lasersko-rezanje .service-panel-content .rich-text {
    font-size: clamp(16px, 0.84vw, 22px);
    line-height: 1.32;
}

#projektiranje h2 {
    font-size: clamp(36px, 2.6vw, 52px);
    gap: 14px;
}

.panel-single {
    padding: 58px 70px;
}

.panel-single .service-panel-content {
    max-width: 1060px;
}

.contact-panel {
    align-items: stretch;
    grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
}

.contact-form-column h1 {
    text-transform: none;
}

.contact-form {
    display: grid;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 5px solid #000;
    border-radius: 26px;
    background: #f5f5f7;
    color: #111;
    font: inherit;
    font-size: 19px;
    font-weight: 600;
    padding: 16px 18px;
}

.contact-form textarea {
    min-height: 250px;
    resize: vertical;
}

.contact-form button {
    width: fit-content;
    border: 3px solid rgba(255, 255, 255, 0.92);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 23px;
    font-weight: 700;
    padding: 12px 24px;
    cursor: pointer;
}

.contact-form button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.contact-info-column h2 {
    margin: 0 0 22px;
    font-size: clamp(48px, 4.3vw, 80px);
    font-weight: 800;
    text-transform: uppercase;
}

.contact-info-column ul {
    margin: 0;
    padding-left: 1.1em;
    display: grid;
    gap: 11px;
}

.contact-info-column li {
    font-size: clamp(20px, 1.6vw, 34px);
    line-height: 1.32;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.form-status {
    min-height: 24px;
    margin: 4px 0 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
}

.form-status.is-success {
    color: #82f5c7;
}

.form-status.is-error {
    color: #ff9292;
}

.honeypot-field {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 1240px) {
    .site-header {
        height: 124px;
        padding: 16px 24px;
    }

    .site-nav {
        gap: 18px;
    }

    .nav-link {
        min-width: 100px;
    }

    .hero-home {
        min-height: calc(100vh - 124px);
        padding: 56px 40px 80px;
    }

    .page-section {
        padding: 24px;
    }

    .panel-two-column,
    .panel-single {
        padding: 34px;
    }
}

@media (max-width: 980px) {
    .site-shell {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-left-width: 0;
        border-right-width: 0;
    }

    .services-sections,
    .service-panel,
    .service-panel .service-panel-content {
        width: 100%;
        min-width: 0;
    }

    .services-menu li {
        width: 100%;
        min-width: 0;
    }

    .services-menu-link,
    .services-menu-link-static,
    .service-panel h2 {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        width: 100%;
        min-width: 0;
    }

    .site-header {
        height: auto;
        min-height: 95px;
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        min-width: 0;
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
    }

    .nav-link-icon {
        width: 34px;
        height: 34px;
    }

    .nav-link-label {
        font-size: 25px;
    }

    .hero-home {
        min-height: 620px;
    }

    .panel-two-column {
        grid-template-columns: 1fr;
    }

    .service-panel.panel-two-column {
        grid-template-columns: 1fr;
    }

    .panel-image-wrap {
        max-width: 540px;
    }

    .service-panel .panel-image-wrap {
        max-width: none;
        height: auto;
    }

    .service-panel .panel-image {
        height: auto;
        min-height: 0;
        max-height: 560px;
    }

    .services-hero-inner {
        padding: 70px 24px;
    }

    .panel-content h1,
    .contact-form-column h1 {
        font-size: clamp(38px, 7.2vw, 58px);
        line-height: 1.04;
        overflow-wrap: anywhere;
    }

    .contact-info-column h2 {
        font-size: clamp(36px, 7vw, 54px);
        line-height: 1.04;
    }

    .panel-content p,
    .service-panel-content p,
    .contact-info-column li {
        font-size: clamp(18px, 2.5vw, 22px);
        line-height: 1.35;
    }

    .panel-content .rich-text,
    .service-panel-content .rich-text {
        font-size: clamp(18px, 2.5vw, 22px);
        line-height: 1.35;
    }
}

@media (max-width: 700px) {
    .site-shell {
        border-width: 2px;
    }

    .site-header {
        padding: 12px;
    }

    .site-logo img {
        width: 200px;
    }

    .hero-home {
        padding: 44px 16px 52px;
        min-height: 560px;
    }

    .hero-quote {
        margin: 15px 0 18px;
    }

    .hero-cta {
        margin-top: 28px;
        border-width: 4px;
        padding: 10px 14px 10px 12px;
        gap: 12px;
    }

    .hero-cta-icon {
        width: 34px;
        height: 34px;
        font-size: 20px;
        border-width: 3px;
    }

    .page-section {
        padding: 12px;
    }

    .panel-two-column,
    .panel-single {
        padding: 16px;
        gap: 16px;
    }

    .panel-content h1,
    .contact-form-column h1 {
        margin: 0 0 18px;
        font-size: clamp(34px, 10.5vw, 46px);
        line-height: 1.06;
    }

    .contact-info-column h2 {
        margin: 0 0 16px;
        font-size: clamp(32px, 10vw, 44px);
    }

    .services-menu {
        gap: 12px;
    }

    .services-menu-link {
        gap: 12px;
        font-size: clamp(24px, 7.2vw, 34px);
        align-items: flex-start;
    }

    .services-menu-icon,
    .service-panel-icon {
        width: 44px;
        height: 44px;
    }

    .service-panel h2 {
        margin: 0 0 16px;
        gap: 12px;
        font-size: clamp(29px, 8vw, 38px);
        align-items: flex-start;
    }

    #projektiranje h2 {
        font-size: clamp(26px, 7vw, 34px);
        gap: 10px;
    }

    .service-panel h2 span:last-child {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .service-panel-content p {
        font-size: 16px;
        line-height: 1.34;
    }

    .panel-content p {
        font-size: 16px;
        line-height: 1.38;
    }

    .panel-content .rich-text,
    .service-panel-content .rich-text {
        font-size: 16px;
        line-height: 1.34;
    }

    .contact-info-column li {
        font-size: 16px;
        line-height: 1.36;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 16px;
    }

    .contact-form button {
        font-size: 17px;
    }
}
