/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    pointer-events: none;
}

html {
    scroll-behavior: smooth; /* Enable smooth scrolling */
    scroll-padding-top: 110px; /* Adjust based on the height of your hamburger icon and padding */
}

/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    /* overflow-x: hidden; Ensure no horizontal scrolling */
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #33333300;
    color: #fff;
    padding: 3rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* Logo (initial state) */
.logo {
    opacity: 0;
    transform: translateY(-100px);
    transition: opacity 0.1s ease, transform 0.15s ease;

    position: fixed; /* <-- was absolute */
    top: 1rem;
    left: calc(1rem + 65px + 14px); /* hamburger left + width + gap */

    height: 65px;       /* match hamburger height */
    display: flex;      /* center logo vertically */
    align-items: center;

    z-index: 1000;
}

/* Style for the logo image */
.logo img {
    height: 65px;   /* fill the logo container height */
    width: auto;    /* keep aspect ratio */
    max-width: 220px; /* optional: stops it from getting too wide */
    object-fit: contain;
}
/* Visible Logo (when the hero is out of view) */
.logo.show {
    opacity: 1;
    transform: translateY(0); /* Drop down to the original position */
}


/* Hamburger Icon */
.hamburger {
    cursor: pointer;
    font-size: 2rem;
    color: white;
    background-color: #333; /* Box color */
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed; /* Fixed position to make it stay on top when scrolling */
    left: 1rem; /* Align to the left of the screen */
    top: 1rem; /* Align to the top of the screen */
    width: 65px; 
    height: 65px;
    border-radius: 8px; /* Rounded edges for the hamburger icon */
    transition: transform 0.3s ease-in-out;
    z-index: 1000; /* Keep hamburger above menu */
}

/* Transform hamburger to X when active */
.hamburger.active {
    transform: rotate(90deg); /* Rotate to form an X */
}

/* Menu */
.menu {
    list-style-type: none;
    background-color: #333; /* Background color */
    position: absolute; /* Position relative to the hamburger */
    top: 90px; /* Just below the hamburger */
    left: 1rem; /* Align with the hamburger */
    width: 325px;
    max-height: 0; /* Start with zero height for dropdown effect */
    overflow: hidden; /* Hide any content when collapsed */
    display: flex;
    flex-direction: column;
    z-index: 999;
    border-radius: 8px; /* Rounded edges for the menu */
    opacity: 1; /* Initial state is hidden */
    transition: max-height 0.5s ease, opacity 0.5s ease; /* Smooth animation */
}

/* Show menu when active (dropdown effect) */
.menu.active {
    max-height: 700px; /* Adjust based on content size */
    opacity: 1; /* Fade in as the menu expands */
}

.menu a {
    text-decoration: none;
    color: white; /* White text */
    padding: 15px;
    text-align: left; /* Align text to the left */
    display: block;
    transition: background 0.3s ease;
    border-radius: 8px; /* Ensure links inside have rounded edges */
}

.menu a:hover {
    background-color: #444; /* Darker background on hover */
}

/* Add a background overlay when menu is open */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    display: none;
    z-index: 999;
}

.overlay.active {
    display: block; /* Show overlay when menu is active */
}



/* Navigation Menu - Hide by default */
nav ul {
    display: none; /* Keep the menu hidden by default */
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #33333300;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    flex-direction: column;
}

nav ul.active {
    display: flex; /* Show menu when active class is added */
}

nav ul li {
    text-align: center;
}

nav ul li a {
    color: white;
    padding: 15px;
    text-decoration: none;
    display: block;
    background-color: #33333300;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #44444400;
}


/* Hero Section */ 
.hero {
    height: 45vh;
    background: url('slike/hero2.webp') no-repeat center center/cover;
    position: relative;
    display: flex;
    justify-content: center; /* Center contents horizontally */
    align-items: center;
    text-align: left;
    padding-top: 60px;
    max-width: 100vw; /* Limit the width to 100% of the viewport width */
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

/* Logo Container */
.logocontainer {
    display: flex;
    align-items: center; /* Center items vertically */
    position: absolute; /* Keep absolute positioning */
    left: 50%; /* Center from the left */
    transform: translate(-50%, 0); /* Center the container horizontally */
}


/* Logo Styles */
.logohero {
    width: 450px; /* Adjust logo size */
    height: auto; /* Keep aspect ratio */
    margin-right: 0rem; /* Space between logo and separator */
}

/* Separator Styles */
.separator {
    width: 2px; /* Thickness of the separator */
    height: 80px; /* Height of the separator */
    background-color: #cbcaca; /* Color of the separator */
    margin: 0 2rem; /* Space around the separator */
}

/* Heading Styles */
h2 {
    font-size: 2rem; /* Adjust font size */
    color: #cbcaca; /* Text color */
    margin: 0; /* Remove default margin */
}


/* Language Switcher */
.language-switcher {
    display: flex;
    flex-direction: row; /* Align flags horizontally */
    position: absolute; /* Position relative to the .hero section */
    top: 1rem; /* Position from the top of the hero section */
    right: 1rem; /* Position from the right edge of the hero section */
    gap: 0.5rem; /* Space between the flag icons */
    z-index: 1000; /* Ensure it's above other content */
}

.language-switcher img {
    width: 36px;
    height: 24px;
    cursor: pointer;
}



/* Carousels */
.carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    overflow: hidden;
}

#products-carousel { /*da se uvijek centrira carousel od products - i kad se smanji zaslon*/
    margin: auto;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel img {
    width: 100%;
    height: auto;
    flex: 0 0 100%; /* This ensures each image takes up full width in the carousel */
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    padding: 10px;
    cursor: pointer;
    font-size: 2rem;
    z-index: 100;
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}





@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Content Section */
.lijevodesno {
    display: flex;
}

.sectionabout, .sectionqc {
    padding: 60px 20px;
    text-align: center;
}

.sectionmachinery, .sectionproducts {
    padding: 60px 20px;
    text-align: center;
    background-color: #f2f2f2;
}


.aboutus h2, .machinery h2, .qccontrol h2, .productlist h2, .sectionqc h2, .sectionmachinery h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.aboutus p, .productlist p {
    max-width: 1000px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    font-size: 1.2rem;
    color: #333;
    text-align: left;
}

.machinerylist p, .qclist p {
    max-width: 800px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    font-size: 1.2rem;
    color: #333;
    text-align: left;
}

.machinerylist, .qclist {
    max-width: 800px;
    margin: auto;
    padding: 0 20px;
    font-size: 1.2rem;
    color: #333;
}

.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s forwards;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px); /* Increase Y-axis to make animation more prominent */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Footer styles */
footer {
    background-color: #333;
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

.contact-info, .map-container {
    flex-basis: 45%;
    margin-bottom: 20px;
}

.contact-info h3, .map-container h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 1rem;
}

.contact-info a {
    color: #00aaff;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.QR {
    height: 150px;
    width: 150px;
}

.map-container iframe {
    width: 100%;
    height: 340px;
    border: none;
}

.fondovi {
    margin: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fondovi img {
    width: 350px;
}



/* Responsive styles for smaller screens */
@media (max-width: 768px) {
    nav ul {
        display: none; /* Hide menu for mobile by default */
    }
    
    nav ul.active {
        display: flex; /* Show the menu when the 'active' class is added */
        flex-direction: column;
    }
s
    .contact-info, .map-container {
        flex-basis: 100%;
    }
    .footer-container {
        flex-direction: column;
        align-items: center;
    }
}


@media (max-width: 1024px) {
    .lijevodesno {
        flex-direction: column; /* Stack the text and carousel vertically */
        align-items: center;
        text-align: center; /* Center the text */
    }

    .carousel {
        width: 100%; /* Make the carousel full width */
        margin: 20px 0; /* Add some spacing above and below */
    }

    .textcontent {
        width: 100%; /* Make the text full width */
        padding: 10px;
    }

    /* Hero Section adjustments */
    .logocontainer {
        flex-direction: column; /* Stack logo and heading vertically */
        align-items: center;
        text-align: center;
    }

    .separator {
        height: 2px; /* Turn separator into a horizontal line */
        width: 80px; /* Adjust width for horizontal line */
        margin: 1rem 0; /* Space above and below */
    }

    .logohero {
        width: 450px; /* Adjust logo size for smaller screens */
    }

    h2 {
        font-size: 1.6rem; /* Adjust heading size for smaller screens */
        margin-top: 1rem; /* Add spacing between the logo and heading */
        text-align: center;
    }
}

@media (max-width: 768px) {
    /* Further adjustments for smaller screens */
    .logohero {
        width: 300px; /* Further adjust logo size for even smaller screens */
    }

    .separator {
        width: 60px; /* Further reduce the separator's width */
    }

    h2 {
        font-size: 1.2rem; /* Adjust heading size for smaller screens */
    }
}

/* ===== Partner logo carousel (separate from your other .carousel sliders) ===== */
.partners {
  width: 90%;
  margin: 60px auto 0px;
}

.partners-title {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
  color: #333;
  text-align: center;
}

.partners-carousel {
  border: 2px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  background: #fff;
  padding: 14px 0;

  /* ✅ allow swipe/drag scrolling */
  overflow-x: auto;
  overflow-y: hidden;

  /* ✅ nice edge fade */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);

  /* ✅ drag UX */
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;

  /* ✅ prevents browser from hijacking horizontal swipe */
  touch-action: pan-y;

  /* ✅ hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.partners-carousel::-webkit-scrollbar {
  display: none;
}

/* ✅ this class is added by JS while dragging */
.partners-carousel.is-dragging {
  cursor: grabbing;
  /*pointer-events: none; */
}

.partners-track {
  display: flex;
  width: max-content;

  /* ✅ disable the old CSS animation (JS will auto-scroll instead) */
  animation: none;
}

.partners-group {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-right: 24px; /* space between the duplicated halves */
  flex-shrink: 0;      /* critical for seamless loop */
}

.partner-card {
  width: 200px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f7f7f7;
  border: 1px solid rgba(0,0,0,0.08);
}

.partner-card img {
  height: 46px;
  width: auto;
  max-width: 80%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.85;
  transition: 0.2s ease;

  /* ✅ prevents dragging the image (important for swipe/drag) */
  pointer-events: none;
}

.partner-card:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.03);
}

/* ✅ REMOVE this old animation (keep commented or delete) */
/*
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.partners-carousel:hover .partners-track {
  animation-play-state: paused;
}
*/

/* Responsive */
@media (max-width: 700px) {
  .partner-card { width: 160px; height: 80px; }
  .partner-card img { height: 38px; }
  .partners-group { gap: 16px; padding-right: 16px; }
}
