/**
 * DST Hero Menu - Pionowe menu akordeonowe
 * Responsive vertical accordion menu
 */

/* Wrapper */
.dst-hero-menu-wrapper {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.dst-hero-menu-wrapper.is-sticky {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    height: 100px;
    z-index: 999999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease;
}

.dst-hero-menu-wrapper.is-sticky.show {
    top: 0;
}

/* Container menu */
.dst-hero-menu {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Pojedynczy element menu */
.dst-hero-menu-item {
    position: relative;
    flex: 1;
    height: 100%;
    overflow: hidden;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    filter: grayscale(100%);
}

/* Hover effect - rozszerzenie elementu + kolor */
.dst-hero-menu-item:hover {
    flex: 3;
    filter: grayscale(0%);
}

/* Overlay dla lepszej czytelności tekstu */
.dst-hero-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    transition: background 0.3s ease;
}

.dst-hero-menu-item:hover .dst-hero-menu-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

/* Content container */
.dst-hero-menu-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    z-index: 10;
    transition: all 0.4s ease;
}

.dst-hero-menu-wrapper.is-sticky .dst-hero-menu-content {
    padding: 20px 30px;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
}

/* Link - bez dekoracji */
.dst-hero-menu-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Tytuł */
.dst-hero-menu-title {
    color: #ffffff;
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Tytuł w wersji sticky */
.dst-hero-menu-wrapper.is-sticky .dst-hero-menu-title {
    writing-mode: horizontal-tb;
    transform: rotate(0deg);
    font-size: 24px;
    letter-spacing: 1px;
}

/* Tytuł w rozwiniętym elemencie */
.dst-hero-menu-item:hover .dst-hero-menu-title {
    font-size: 64px;
    letter-spacing: 4px;
}

.dst-hero-menu-wrapper.is-sticky .dst-hero-menu-item:hover .dst-hero-menu-title {
    font-size: 28px;
    letter-spacing: 1.5px;
}

/* Error message */
.dst-hero-menu-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .dst-hero-menu-title {
        font-size: 36px;
    }
    
    .dst-hero-menu-item:hover .dst-hero-menu-title {
        font-size: 48px;
    }
    
    .dst-hero-menu-content {
        padding: 30px;
    }
    
    .dst-hero-menu-wrapper.is-sticky .dst-hero-menu-content {
        padding: 15px 20px;
    }
}

/* Hamburger Menu - Mobile */
.dst-hamburger-toggle {
    display: none;
    position: fixed;
    top: 22px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10001;
    padding: 12px;
}

.dst-hamburger-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #000000;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.dst-hamburger-toggle span:nth-child(1) {
    top: 14px;
}

.dst-hamburger-toggle span:nth-child(2) {
    top: 23.5px;
}

.dst-hamburger-toggle span:nth-child(3) {
    top: 33px;
}

/* Hamburger to X animation */
.dst-hamburger-toggle.active span {
    background: #ffffff;
}

.dst-hamburger-toggle.active span:nth-child(1) {
    top: 23.5px;
    transform: translateX(-50%) rotate(45deg);
}

.dst-hamburger-toggle.active span:nth-child(2) {
    opacity: 0;
}

.dst-hamburger-toggle.active span:nth-child(3) {
    top: 23.5px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Mobile Menu Overlay */
.dst-mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dst-mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dst-mobile-menu-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 80px 20px 40px;
}

.dst-mobile-menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    width: 100%;
}

.dst-mobile-menu-item {
    margin: 0;
    padding: 0;
    list-style: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dst-mobile-menu-overlay.active .dst-mobile-menu-item {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation */
.dst-mobile-menu-overlay.active .dst-mobile-menu-item:nth-child(1) { transition-delay: 0.1s; }
.dst-mobile-menu-overlay.active .dst-mobile-menu-item:nth-child(2) { transition-delay: 0.15s; }
.dst-mobile-menu-overlay.active .dst-mobile-menu-item:nth-child(3) { transition-delay: 0.2s; }
.dst-mobile-menu-overlay.active .dst-mobile-menu-item:nth-child(4) { transition-delay: 0.25s; }
.dst-mobile-menu-overlay.active .dst-mobile-menu-item:nth-child(5) { transition-delay: 0.3s; }
.dst-mobile-menu-overlay.active .dst-mobile-menu-item:nth-child(6) { transition-delay: 0.35s; }

.dst-mobile-menu-item a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.dst-mobile-menu-item a:hover {
    color: #cccccc;
    transform: scale(1.05);
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    /* Pokaż hamburger */
    .dst-hamburger-toggle {
        display: block;
    }
    
    .dst-mobile-menu-overlay {
        display: block;
    }
    
    /* Ukryj całe hero menu na mobile */
    .dst-hero-menu-wrapper {
        display: none;
    }
}

/* Animation for background image */
.dst-hero-menu-item {
    background-size: cover;
    background-position: left center;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                background-size 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dst-hero-menu-item:hover,
.dst-hero-menu-item.active {
    background-size: cover;
}
