/* Hamburger Menu Styles */

/* Hamburger Button */
.hamburger-btn {
    background-color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(220, 220, 220, 0.6) !important;
    color: #333;
}

.hamburger-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hamburger-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hamburger icon is now handled by SVG */

/* Animation for open state */
body.menu-open .hamburger-btn .hamburger-icon {
    background-color: transparent;
}

body.menu-open .hamburger-btn .hamburger-icon::before,
body.menu-open .hamburger-btn .hamburger-icon::after {
    top: 0;
}

body.menu-open .hamburger-btn .hamburger-icon::before {
    transform: rotate(45deg);
}

body.menu-open .hamburger-btn .hamburger-icon::after {
    transform: rotate(-45deg);
}

body.menu-open .hamburger-btn {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.3s, opacity 0.3s ease;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 65, 55, 0.98);
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, visibility 0s linear 0.5s;
}

body.menu-open .menu-overlay {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, visibility 0s linear 0s;
}

.menu-overlay-content {
    text-align: center;
    max-width: 80%;
}

.menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-nav li {
    margin: 20px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

body.menu-open .menu-nav li {
    opacity: 1;
    transform: translateY(0);
}

body.menu-open .menu-nav li:nth-child(1) {
    transition-delay: 0.4s;
}

body.menu-open .menu-nav li:nth-child(2) {
    transition-delay: 0.5s;
}

body.menu-open .menu-nav li:nth-child(3) {
    transition-delay: 0.6s;
}

body.menu-open .menu-nav li:nth-child(4) {
    transition-delay: 0.7s;
}

body.menu-open .menu-nav li:nth-child(5) {
    transition-delay: 0.8s;
}

.menu-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 2em;
    font-weight: bold;
    transition: color 0.2s ease-in-out;
    position: relative;
    padding-right: 20px;
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    outline: none; /* Remove focus outline */
}

.menu-nav a:hover {
    color: #cce242;
}

.menu-nav a:focus {
    outline: none;
}

.menu-nav a.active::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #cce242;
    border-radius: 50%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    animation: scaleInDot 0.3s ease-out forwards;
}

@keyframes scaleInDot {
    0% { transform: translateY(-50%) scale(0); opacity: 0; }
    100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

.close-menu-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1010;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2) !important; /* Semi-transparent background to make entire area clickable */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Subtle border */
    border-radius: 50%;
    cursor: pointer !important;
    padding: 0;
    color: #ffffff;
    font-size: 2em;
    line-height: 1;
    text-align: center;
    transition: transform 0.3s ease, opacity 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    outline: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important; /* Ensure it captures all click events */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.close-menu-btn:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.2);
}

.close-menu-btn:hover {
    transform: rotate(90deg);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.2);
}

.close-icon {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 36px;
    font-size: 24px;
    font-weight: 200; /* Thinner font for Apple-like style */
    pointer-events:++ none;
    -webkit-tap-highlight-color: transparent; /* Udržať toto pre mobily */
}

body.menu-open .close-menu-btn {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

/* Responsive styles */
@media (max-width: 768px) {
    .menu-nav a {
        font-size: 1.8em;
    }
    
    .close-menu-btn {
        font-size: 1.8em;
    }
}

@media (max-width: 576px) {
    .menu-nav a {
        font-size: 1.5em;
    }
    
    .close-menu-btn {
        font-size: 1.5em;
    }
}
