html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Diagonal red lines */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
}

.blueprint-bg {
    position: relative;
    min-height: 60vh;
    overflow: hidden;
}

/* Irregular blueprint grid effect */
.blueprint-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    background-image:
        linear-gradient(rgba(255, 0, 0, 0.1) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 0, 0, 0.1) 2px, transparent 2px),
        linear-gradient(rgba(255, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
    opacity: 0.2;
    /* Keep it subtle */
    pointer-events: none;
    z-index: 0;
}


header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    box-sizing: border-box;
}

.header-hidden {
    transform: translateY(-100%);
}

.logo {
    display: contents;
}


.logo img {
    padding-top: 6px;
    height: 2.8rem;
    width: auto;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 36px;
    color: black;
    cursor: pointer;
    position: absolute;
    right: 20px;
    /* Added this line to push the toggle menu to the right */
}

nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

nav ul li {
    list-style: none;
}

nav ul li a {
    color: black;
    text-decoration: none;
    font-size: 18px;
}

nav ul i {
    color: black;
    text-decoration: none;
    font-size: 28px;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

@keyframes heroZoom {
    0% {
        transform: translate(-50%, -50%) scale(1.4);
    }

    25% {
        transform: translate(-51%, -49%) scale(1.6);
        /* Slight pan left & up */
    }

    50% {
        transform: translate(-50%, -52%) scale(1.5);
        /* Zoom in & slight up */
    }

    75% {
        transform: translate(-49%, -50%) scale(1.4);
        /* Pan right & zoom out a bit */
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        /* Back to normal */
    }
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(5px);
    animation: heroZoom 20s infinite alternate ease-in-out;
    /* Smooth zoom & movement */
}


.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Darkens the video */
    mix-blend-mode: multiply;
    /* Helps blend colors */
}

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 2;
}

.hero-logo {
    width: 26rem;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: brightness(70%);
}

.hero-text h1 {
    position: relative;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    display: inline-block;
}

.hero-text h1::after {
    content: "";
    display: block;
    width: 100%;
    height: 4px;
    background-color: #DB0000;
    margin: 8px auto 0;
    border-radius: 2px;
}


.hero-text p {
    font-size: 1.5rem;
    /* Larger paragraph */
    max-width: 600px;
    /* Keeps text readable */
    margin: 10px auto;
    /* Centers the text */
}

/* Button Styles */
.btn-regular {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #DB0000;
    background-color: transparent;
    border: 3px solid #DB0000;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-regular:hover {
    background-color: white;
    color: black;
    border: 3px solid black;
}

.contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #DB0000;
    /* Red background */
    color: white;
    padding: 40px 0px;
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
}


.contact-section .btn-contact {
    background-color: white;
    color: #DB0000;
    font-size: 1.2rem;
    padding: 12px 24px;
    margin: 0px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

.contact-section .btn-contact:hover {
    background-color: #b30000;
    /* Darker red */
    color: white;
}

.section-header {
    background-color: transparent;
    color: #333;
    text-align: center;
    padding: 0px 0px;
    width: 100%;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 30px;
}

.section-header h1 {
    position: relative;
    font-size: 2.5rem;
    font-weight: bold;
    color: black;
    /* Adjust text color */
}

.section-header h1::after {
    content: "";
    display: block;
    width: 20%;
    height: 4px;
    background-color: #DB0000;
    margin: 8px auto 0;
    border-radius: 2px;
}

.section-header p {
    background-color: transparent;
    color: #333;
    text-align: center;
    width: 80%;
    font-size: 1.5rem;
    margin: 0 auto 30px auto;
}

/* About Us Section */
#sto-radimo {
    padding: 0px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    text-align: center;
    box-sizing: border-box;
}

/* About Boxes - Grid Layout */
.about-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Responsive grid */
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

/* Individual Box */
.about-box {
    position: relative;
    display: flex;
    height: 100%;
    /* Make sure it stretches */
    min-height: 300px;
    /* Prevent collapsing on smaller screens */
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

/* Background Image */
.about-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--image-url);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

/* Dark Overlay */
.about-box::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Dark overlay */
    transition: background 0.3s ease;
}

/* Box Text */
.about-box h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    z-index: 2;
    margin: 20px 20px;
}

/* Hover Effect */
.about-box:hover::after {
    background: rgba(0, 0, 0, 0.3);
    /* Lighten overlay on hover */
}

.about-box:hover::before {
    transform: scale(1.1);
    /* Slight zoom effect */
}

/* Section Styling */
#tko-smo-mi {
    text-align: center;
    background-color: transparent;
}

/* Technicians Container */
.who-we-are {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background-repeat: no-repeat;
    background-position: center;
    overflow: hidden;
}

/* Initially center the images */
.person {
    opacity: 1;
    transform: translateX(0);
    /* Center them initially */
    transition: transform 3s ease-out, opacity 3s ease-out;
    /* Add opacity transition */
}

/* Left person slides in from the center to the left */
.person:nth-child(odd) {
    transform: translateX(0);
    /* Keep it at the center initially */
}

/* Right person slides in from the center to the right */
.person:nth-child(even) {
    transform: translateX(0);
    /* Keep it at the center initially */
}

/* When in view, animate them to the edges and fade them out */
.person.show {
    opacity: 1;
    /* Fade them out when they move */
}

.person.show:nth-child(odd) {
    transform: translateX(-600px);
    /* Move odd elements to the left */
}

.person.show:nth-child(even) {
    transform: translateX(600px);
    /* Move even elements to the right */
}

/* Styling for the images inside the person */
.person img {
    position: relative;
    width: 600px;
    height: auto;
}

/* Adjustments for smaller screens */
@media (max-width: 1200px) {
    .person img {
        width: 500px;
        /* Reduce image size on medium screens */
    }

    .person.show:nth-child(odd) {
        transform: translateX(-400px);
        /* Move odd elements to the left */
    }

    .person.show:nth-child(even) {
        transform: translateX(400px);
        /* Move even elements to the right */
    }
}

@media (max-width: 768px) {
    .who-we-are {
        background-size: 300px;
        /* Reduce background size */
    }

    .person img {
        width: 300px;
        /* Make images responsive */
    }

    .person.show:nth-child(odd) {
        transform: translateX(-300px);
        /* Move odd elements to the left */
    }

    .person.show:nth-child(even) {
        transform: translateX(300px);
        /* Move even elements to the right */
    }
}

@media (max-width: 480px) {
    .who-we-are {
        background-size: 180px;
        /* Further reduce background size for very small screens */
    }

    .person img {
        width: 200px;
        /* Make images responsive */
    }

    .person.show:nth-child(odd) {
        transform: translateX(-160px);
        /* Move odd elements to the left */
    }

    .person.show:nth-child(even) {
        transform: translateX(160px);
        /* Move even elements to the right */
    }
}

@media (max-width: 400px) {
    .person img {
        width: 180px;
        /* Make images responsive */
    }

    .person.show:nth-child(odd) {
        transform: translateX(-150px);
        /* Move odd elements to the left */
    }

    .person.show:nth-child(even) {
        transform: translateX(150px);
        /* Move even elements to the right */
    }
}

@media (max-width: 360px) {
    .person img {
        width: 160px;
        /* Make images responsive */
    }

    .person.show:nth-child(odd) {
        transform: translateX(-130px);
        /* Move odd elements to the left */
    }

    .person.show:nth-child(even) {
        transform: translateX(130px);
        /* Move even elements to the right */
    }
}

.contact-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 50px;
}

.contact-content {
    display: flex;
    gap: 50px;
    padding: 20px 20px;
    max-width: 1200px;
    width: 100%;
}

/* Left Side: Contact Form */
.contact-form {
    flex: 1;
}

/* Right Side: Contact Info */
.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    padding: 40px;
    border-radius: 10px;
}

.contact-info p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.phone-number {
    font-size: 1.8rem;
    font-weight: bold;
    background-color: transparent;
    color: #DB0000;
    text-decoration: none;
    margin-top: 10px;
}

.phone-number-navitem {
    font-size: 1.8rem;
    font-weight: bold;
    background-color: transparent;
    color: #DB0000;
    text-decoration: none;
    margin-top: 10px;
}

.phone-number:hover {
    color: black;
}


.form-grid {
    display: flex;
    gap: 20px;
}

.form-left,
.form-right {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    text-align: left;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
}

input,
textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

textarea {
    resize: none;
}

.submit-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 30px;
    font-size: 16px;
    border: 2px solid #007BFF;
    background: transparent;
    color: #007BFF;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.submit-btn:hover {
    background: #007BFF;
    color: white;
}



/* Keyframes for true infinite scrolling */
@keyframes infinite-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }

    /* Adjust for seamless loop */
}

.gallery-container {
    margin: 0 auto;
    /* Centers the container */
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    justify-content: center;
    /* Ensures images are centered inside the grid */
    width: 100%;
    /* Ensures it takes full width */
    max-width: 1000px;
    /* Adjust based on design */
    align-items: center;
    /* Vertically center content in the grid cells */
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    opacity: 0;
    /* Start hidden */
    transform: translateY(-20px);
    animation: slideDown 0.5s ease-out forwards;
    border-radius: 5px;
}


.gallery-img,
.gallery-video {
    width: 100%;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    border-radius: 5px;
}

.gallery-video {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    /* Background color for videos */
    padding: 10px;
    /* Add some padding around the video */
    border-radius: 5px;
    box-sizing: border-box;
}

.gallery-video video {
    max-height: 100%;
    /* Makes sure the video is responsive */
    max-width: 100%;
    object-fit: contain;
    /* Ensures the video doesn't stretch out of proportion */
}

.gallery-img:hover,
.gallery-video:hover {
    transform: scale(1.05);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    /* Higher than header */
}


.lightbox-img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}


.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1001;
    /* Ensures it's above everything */
}

iframe {
    height: 200px;
}

#loadMoreBtn {
    display: block;
    margin: 20px auto;
}

#sendFormButton {
    display: block;
    margin: 20px auto;
}


.custom i {
    font-size: 26px;
    margin-right: 6px;
    color: black;
}

.contact-form-item {
    font-size: 1.8rem;
    font-weight: bold;
    background-color: transparent;
    color: #DB0000;
    text-decoration: none;
    margin-top: 10px;
    /* Adds underline on hover */
}

.contact-form-item:hover {
    text-decoration: underline;
    /* Adds underline on hover */
}

/* Ponuda section */
.product-section {
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    text-align: center;
    box-sizing: border-box;
}

.product-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

.product-box {
    position: relative;
    display: flex;
    height: 100%;
    min-height: 300px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

/* Background Image */
.product-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--image-url);
    background-size: 60%; /* Ensures the entire image fits without cropping */
    background-repeat: no-repeat; /* Prevents tiling */
    background-position: center; /* Centers the image */
    transition: transform 0.3s ease;
}

#klizna-product-box {
    background-size: 40%; /* Ensures the entire image fits without cropping */
}

/* Dark Overlay */
.product-box::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Dark overlay */
    transition: background 0.3s ease;
}

/* Box Text */
.product-box h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    z-index: 2;
    margin: 20px 20px;
}

/* Hover Effect */
.product-box:hover::after {
    background: rgba(0, 0, 0, 0.3);
    /* Lighten overlay on hover */
}

.product-box:hover::before {
    transform: scale(1.1);
    /* Slight zoom effect */
}

.hidden {
    display: none;
    opacity: 0; /* Ensure it's hidden while animating */
    transform: translateY(-20px); /* Slide it up as it disappears */
}

.flex {
    display: flex;
}

#product-details {
    margin: 20px auto;
    justify-content: center; /* Pushes items apart */
    align-items: center;
    flex-wrap: wrap; /* Allows content to flow naturally */
    padding: 20px;
    background: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    opacity: 0;
    max-width: 1200px;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#product-details.visible {
    opacity: 1;
    transform: translateY(0);
}

#product-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

#product-video-container {
    margin-top: 15px;
    display: none;
}

#product-video {
    width: 100%;
    max-width: 560px;
    height: 315px;
}

.main-pdf-container {
    text-align: center;
}

.pdf-container {
    margin-top: 20px;
    text-align: center;
}

.pdf-list-item {
    list-style-type: none;
}

hr {
    margin: 20px 0;
    border: 1px solid #ddd;
}

a {
    color: #DB0000;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#close-details {
    position: absolute; /* Position relative to the nearest positioned ancestor */
    top: 10px;          /* Adjust the top positioning */
    right: 20px;        /* Adjust the right positioning */
    background-color: transparent;
    color: black;
    border: none;
    font-size: 24px;     /* Size of the icon */
    cursor: pointer;
}
footer {
    background: #222;
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    border-bottom: 2px solid red;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.footer-section p,
.footer-section a {
    color: white;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.social-icons img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #444;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .about-boxes {
        grid-template-columns: 1fr; /* Makes it a single-column layout */
    }
}


/* Mobile Responsive */
@media (max-width: 768px) {

    .section-header p {
        font-size: 18px;
    }

    .logo img {
        height: 1.6rem;
        width: auto;
    }

    .phone-number-navitem {
        font-size: 1.2rem;
    }

    nav ul i {
        font-size: 18px;
    }

    .about-box {
        height: 200px;
    }

    .about-box h3 {
        font-size: 1.2rem;
    }

    .contact-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-info {
        padding: 20px;
    }

    .hero-logo {
        width: 100%;
    }
}

/* Mobile Responsive */
@media (max-width: 375px) {

    .logo img {
        height: 1.4rem;
        width: auto;
    }

    .phone-number-navitem {
        font-size: 0.8rem;
    }
    nav ul i {
        font-size: 14px;
    }
}


/* Mobile Responsive */
@media (max-width: 320px) {

    .logo img {
        height: 1.2rem;
        width: auto;
    }

    .phone-number-navitem {
        font-size: 0.9rem;
    }
    nav ul i {
        font-size: 12px;
    }
}

.gallery-video::-webkit-media-controls-volume-slider,
.gallery-video::-webkit-media-controls-mute-button {
    display: none !important;
}