/* General Styles */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    color: #2D2D2D;
    background-color: #F7F7F7;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Ensuring navbar is on top */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 2em;
}

.navbar-links {
    display: flex;
    gap: 1.5em;
}

.navbar a, .dropbtn {
    text-decoration: none;
    color: #2D2D2D;
    font-weight: 700;
    position: relative;
    transition: color 0.3s;
}

.navbar a::after, .dropbtn::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #112794;
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.navbar a:hover, .dropbtn:hover {
    color: #112794;
}

.navbar a:hover::after, .dropbtn:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1001; /* Ensuring dropdown is above other elements */
}

.dropdown-content a {
    color: #2D2D2D;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropbtn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #333;
    font-weight: 500;
    padding: 0;
    transition: color 0.3s, transform 0.3s;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 16px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile Navbar */
.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001; /* Ensuring mobile menu icon is above clock */
}

.menu-line {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 4px 0;
    transition: transform 0.3s;
}

.mobile-navbar-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1001; /* Ensuring mobile navbar links are above clock */
}

.mobile-navbar-links a {
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    border-bottom: 1px solid #ddd;
    transition: background 0.3s ease;
}

.mobile-navbar-links a:hover {
    background: #f0f0f0;
}

.mobile-navbar-links.open {
    display: flex;
    max-height: 500px;
}

/* Media Queries */
@media (max-width: 768px) {
    .navbar-links {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.hero-content img {
    margin-bottom: 20px;
}

.btn {
    background: #112794;
    text-decoration: none;
    color: #fff;
    padding: 0.5em 2em;
    text-transform: uppercase;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #112794;
}

/* Slideshow Styles */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.mySlides {
    display: none;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.dot-container {
    text-align: center;
    position: absolute;
    width: 100%;
    bottom: 20px;
    z-index: 2;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: #717171;
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* Clock Styles */
.clock {
    background: #f8f8f8;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #A37E2C;
    position: relative;
    box-shadow: 0 1vw 2vw -0.5vw rgba(0, 0, 0, 0.8);
    z-index: 999; /* Lowered z-index */
}

.dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #A37E2C;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    position: absolute;
    z-index: 1000; /* Adjusted z-index */
}

.hour-hand {
    position: absolute;
    z-index: 1000; /* Adjusted z-index */
    width: 2px;
    height: 30px;
    background: #006039;
    top: 20px;
    left: 50%;
    margin-left: -1px;
    border-top-left-radius: 50%;
    border-top-right-radius: 50%;
    transform-origin: 50% 30px;
}

.minute-hand {
    position: absolute;
    z-index: 1000; /* Adjusted z-index */
    width: 2px;
    height: 40px;
    background: #006039;
    top: 10px;
    left: 50%;
    margin-left: -1px;
    border-top-left-radius: 50%;
    border-top-right-radius: 50%;
    transform-origin: 50% 40px;
}

.second-hand {
    position: absolute;
    z-index: 1000; /* Adjusted z-index */
    width: 1px;
    height: 45px;
    background: black;
    top: 5px;
    left: 50%;
    margin-left: -0.5px;
    border-top-left-radius: 50%;
    border-top-right-radius: 50%;
    transform-origin: 50% 45px;
}

.diallines {
    position: absolute;
    z-index: 1000; /* Adjusted z-index */
    width: 1px;
    height: 5px;
    background: #006039;
    left: 50%;
    margin-left: -0.5px;
    transform-origin: 50% 50px;
}

.diallines:nth-of-type(5n) {
    width: 2px;
    height: 10px;
    background: #006039;
}

/* Responsive Clock */
@media (max-width: 1024px) {
    .clock {
        width: 80px;
        height: 80px;
    }
    .hour-hand {
        height: 25px;
        top: 15px;
        transform-origin: 50% 25px;
    }
    .minute-hand {
        height: 30px;
        top: 10px;
        transform-origin: 50% 30px;
    }
    .second-hand {
        height: 35px;
        top: 5px;
        transform-origin: 50% 35px;
    }
    .diallines {
        height: 4px;
        transform-origin: 50% 40px;
    }
    .diallines:nth-of-type(5n) {
        height: 8px;
    }
}

@media (max-width: 768px) {
    .clock {
        width: 60px;
        height: 60px;
    }
    .hour-hand {
        height: 20px;
        top: 10px;
        transform-origin: 50% 20px;
    }
    .minute-hand {
        height: 25px;
        top: 5px;
        transform-origin: 50% 25px;
    }
    .second-hand {
        height: 30px;
        top: 2.5px;
        transform-origin: 50% 30px;
    }
    .diallines {
        height: 3px;
        transform-origin: 50% 30px;
    }
    .diallines:nth-of-type(5n) {
        height: 6px;
    }
}

/* Background Section */
.background-section {
    position: relative;
    padding: 4em 2em;
    text-align: center;
    color: #FFFFFF;
    background: url('stena zahorak.jpeg') no-repeat center center/cover;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.background-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.background-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    margin-bottom: 1em;
}

.features-container {
    display: flex;
    justify-content: center;
    gap: 2em;
    flex-wrap: wrap;
}

.feature-item {
    background: rgba(255, 255, 255, 0.8);
    color: #2D2D2D;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    transition: transform 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-10px);
}

.feature-item i {
    font-size: 2em;
    color: #112794;
    margin-bottom: 0.5em;
}

.feature-item h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5em;
    margin: 0.5em 0;
}

.feature-item p {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 1em;
}

/* Partners Section */
.partners {
    background-color: white;
    text-align: center;
    padding: 60px 0;
    margin: 0;
}

.partners h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    color: #2D2D2D;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    display: inline-block;
}

.partners h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #112794;
    margin: 20px auto 0;
}

.partner-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.partner-logo a {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-logo img {
    width: 300px;
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
}

.partner-logo a:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background: #2D2D2D;
    color: #fff;
    text-align: center;
    padding: 2em;
}

footer a {
    color: #112794;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .partners h2 {
        font-size: 2em;
    }
    .partner-logo img {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .partners h2 {
        font-size: 1.8em;
    }
    .partner-logo img {
        width: 200px;
    }
}
