* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Smooth scrolling for nav links */
html {
    scroll-behavior: smooth;
}

/* Body */
body {
    background: #f8f9fa; /* Light gray background from Bootstrap template */
    overflow-x: hidden; /* Disable horizontal scrolling */
}

/* Top Navigation Bar */
#topNav {
    background: rgba(0, 0, 0, 0); /* Fully transparent initially */
    transition: background 0.3s ease; /* Smooth background transition */
    z-index: 1000; /* Ensure it stays above other content */
}

#topNavBrand {
    opacity: 0; /* Ensure it stays above other content */
    margin-left: 10px;
}

.navbar-dark .navbar-brand {
    color: #00ffff;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.8));
}

.navbar-dark .nav-link {
    color: #fff;
    transition: color 0.3s ease;
}

.navbar-dark .nav-link:hover {
    color: #00ffff;
}

/* Header Carousel */
.carousel-item {
    height: 100vh;
    min-height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%; /* Use 100% instead of 100vw to prevent overflow */
    max-width: 100vw; /* Ensure it doesn't exceed viewport */
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for readability */
}

.carousel-caption {
    bottom: 3rem;
    z-index: 10;
}

.mhs-logo-svg {
    width: 90vw;
    max-width: 600px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
    transition: transform 0.3s ease, width 0.3s ease, max-width 0.3s ease;
}

.mhs-logo-svg.shrunk {
    max-width: 200px;
}

.mhs-logo-svg:hover {
    transform: scale(1.05);
}

.mhs-logo-svg.shrunk:hover {
    transform: scale(1.1);
}

.mhs-logo-svg text {
    font-family: 'Arial', sans-serif;
    font-size: 300px;
    font-weight: bold;
    fill: #00ffff;
    text-transform: uppercase;
    letter-spacing: 5px;
    stroke: #0080ff;
    stroke-width: 5;
}

.static-logo-text {
    font-size: 1.5rem;
    color: #fff;
    max-width: 90vw;
}

/* Product Sections */
.section-fullscreen {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%; /* Use 100% instead of 100vw to prevent overflow */
    max-width: 100vw; /* Ensure it doesn't exceed viewport */
    position: relative;
    /*display: flex;*/
    align-items: center;
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.section-fullscreen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9); /* White overlay for readability */
    z-index: 0;
}

.section-fullscreen.visible {
    opacity: 1;
}

.text-container {
    position: relative;
    z-index: 1;
    max-width: 500px; /* Limit text width for readability */
}

.text-container h3 {
    font-size: 2rem;
}

.BesediloBlagajna, .BesediloLesko, .BesediloEasytec, .BesediloTerminal, .BesediloContact {
    font-size: 1.1rem;
    text-align: justify;
    line-height: 1.6;
}

.image-container {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.image-container img {
    transition: transform 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.05);
}

/* Reveal Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-image {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-image.visible {
    opacity: 1;
    transform: scale(1);
}

/* Produkti Heading */
.produkti-heading {
    font-size: 2.5rem;
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.produkti-heading.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery Button */
.btn.gallery-button {
    transition: background-color 0.3s ease;
}

.btn.gallery-button:hover {
    background-color: #0056b3;
}

/* Modal */
.custom-modal-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

/* Contact Form */
.contact-form-container {
    max-width: 600px;
    margin: 20px auto;
}

.form-message.text-success {
    color: #198754;
}

.form-message.text-danger {
    color: #dc3545;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-message.text-danger {
    display: block !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .mhs-logo-svg {
        max-width: 300px;
    }

    .mhs-logo-svg.shrunk {
        max-width: 150px;
    }

    .mhs-logo-svg text {
        font-size: 100px;
    }

    .static-logo-text {
        font-size: 1rem;
    }

    .produkti-heading {
        font-size: 2rem;
    }

    .text-container h3 {
        font-size: 1.5rem;
    }

    .BesediloBlagajna, .BesediloLesko, .BesediloEasytec, .BesediloTerminal, .BesediloContact {
        font-size: 1rem;
    }

    .image-container {
        max-width: 300px;
    }

    .carousel-item {
        height: 60vh;
    }

    .section-fullscreen {
        height: auto;
        min-height: 100vh;
        padding: 2rem 1rem;
    }

    .section-fullscreen .row {
        flex-direction: column;
        text-align: center;
    }

    .text-container, .image-container {
        max-width: 90%;
    }

    /* Adjust top nav for mobile */
    #topNav {
        padding: 0.5rem 1rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }
}