/* TELJES MOBIL CSS - mobile.css fájl */

/* Hamburger menü gomb stílusa a header-ben */
.mobile-menu-toggle {
    display: block;
    background: #01693a;
    color: #fff;
    border: 2px solid #01693a;
    border-radius: 8px;
    min-width: 40px;
    min-height: 40px;
    font-size: 22px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: #014627;
    border-color: #014627;
}

.mobile-menu-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Hamburger animáció */
.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    transform: rotate(0deg);
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.3s ease-in-out;
}

.hamburger-icon span:nth-child(1) {
    top: 0px;
}

.hamburger-icon span:nth-child(2) {
    top: 7px;
}

.hamburger-icon span:nth-child(3) {
    top: 14px;
}

/* Hamburger aktív állapot (X alakú) */
.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    top: 7px;
    transform: rotate(135deg);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
    left: -30px;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    top: 7px;
    transform: rotate(-135deg);
}

/* Mobil menü container */
.mobile-menu-container {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh; /* Fallback régebbi böngészőkhöz */
    height: 100dvh; /* Modern böngészőkben a dinamikus viewport magasság (iOS Safari fix) */
    background: linear-gradient(135deg, #01693a 0%, #014627 100%);
    z-index: 9999;
    transition: left 0.3s ease-in-out;
    overflow-y: scroll;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* Scrollbar mindig látható a mobil menüben */
.mobile-menu-container::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.mobile-menu-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.mobile-menu-container.show {
    left: 0;
}

/* Mobil menü overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

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

/* Mobil menü header */
.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header .brand {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
}

.mobile-menu-header .brand .mobile-menu-logo{
    width: 100%;
    max-width: 129px;
    height: auto;
    max-height: 46px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Mobil menü tartalom */
.mobile-menu-content {
    padding: 20px 0;
}

/* Felhasználói műveletek (belépés/regisztráció) */
.mobile-menu-user-actions {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-user-actions .user-action {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 10px 0 10px 12px;
}

.mobile-menu-user-actions .user-action:last-child {
    margin-bottom: 0;
}

.mobile-menu-user-actions .user-action:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    color: #fff;
    text-decoration: none;
}

.mobile-menu-user-actions .user-action i {
    margin-right: 12px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Főmenü elemek */
.mobile-menu-nav {
    padding: 15px 20px;
    flex: 1;
}

.mobile-menu-nav-item {
    margin-bottom: 5px;
}

.mobile-menu-nav-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
}

.mobile-menu-nav-link:hover,
.mobile-menu-nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    color: #fff;
    text-decoration: none;
}

.mobile-menu-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background-color: #fff;
    transition: height 0.3s ease;
}

.mobile-menu-nav-link:hover::before,
.mobile-menu-nav-link.active::before {
    height: 60%;
}

/* Telefon info a menü alján */
.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.mobile-menu-footer .dropdown-center .btn{
    border-color: white;
    color: white;
}

.mobile-menu-phone {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

.mobile-menu-phone a{
    color: #fff;
    text-decoration: none;
}

.mobile-menu-phone:hover {
    color: #fff;
    text-decoration: none;
}

.mobile-menu-phone .phone-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #fff;
    color: #01693a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}

.mobile-menu-social{
    color: #fff;
    font-size: 22px;
    margin-bottom: 25px;
}

.mobile-menu-social a{
    color: #fff;
}

/* MOBIL NÉZET ALAPBEÁLLÍTÁSOK */
@media (max-width: 991.98px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding-right: 15px;
        padding-left: 15px;
    }

    /* Top Bar mobil optimalizálás */
    .top-bar {
        padding: 8px 0;
    }

    .top-bar .container .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .top-bar .contact-info,
    .top-bar .social-links {
        text-align: center;
    }

    .top-bar .social-links a {
        margin: 0 8px;
    }

    /* Main Header mobil layout - hamburger menü a header-ben */
    .main-header .row {
        position: relative;
    }

    .main-header .col-md-3,
    .main-header .col-md-5,
    .main-header .col-md-4 {
        width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
        text-align: center;
    }

    /* Logo és hamburger egy sorban */
    .main-header .col-md-3 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }

    /* Logo mobil méretezés */
    .navbar-brand {
        padding: 10px 0;
        text-align: left;
    }

    .navbar-brand h1 {
        font-size: 24px;
    }

    .tagline {
        font-size: 11px;
    }

    /* Mobile Cart Icon */
    .mobile-cart-icon {
        position: relative;
        color: #01693a;
        font-size: 24px;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        transition: color 0.3s ease;
    }

    .mobile-cart-icon:hover {
        color: #014627;
        text-decoration: none;
    }

    .mobile-cart-icon .badge{
        font-size: 14px;
    }

    /* Hamburger menü a header-ben */
    .header-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }

    /* Keresősáv mobil optimalizálás */
    .search-container {
        max-width: 100%;
        margin: 10px 0;
        width: 100%;
    }

    .search-input {
        height: 45px;
        font-size: 16px; /* iOS zoom elkerülésére */
        border-radius: 25px;
        padding: 0 50px 0 20px;
    }

    .search-btn {
        right: 5px;
        top: 5px;
        width: 35px;
        height: 35px;
    }

    /* Header ikonok elrejtése mobil nézetben */
    .header-icons {
        display: none !important; /* Elrejtjük, mert hamburger menüben lesznek */
    }

    /* Main Navigation mobil - hamburger eltávolítva innen */
    .main-navigation {
        padding: 15px 0;
    }

    .main-navigation .container > .d-flex {
        justify-content: center;
        align-items: center;
    }

    /* Kategóriák dropdown mobil - teljes szélességű */
    .main-navigation .dropdown {
        width: 100%;
    }

    .main-navigation .dropdown .btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
        border-radius: 8px;
        justify-content: space-between;
        display: flex;
        align-items: center;
    }

    .main-navigation .dropdown .dropdown-menu {
        width: 100% !important;
        max-height: 300px;
        overflow-y: auto;
        margin-top: 5px;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .main-navigation .dropdown .dropdown-item {
        padding: 12px 20px;
        font-size: 14px;
        border-bottom: 1px solid #f0f0f0;
    }

    /* Desktop menük elrejtése */
    .desktop-menu {
        display: none !important;
    }

    .tel-block {
        display: none !important;
    }
}

/* Extra kis képernyők (telefon) */
@media (max-width: 576px) {
    .container {
        padding-right: 10px;
        padding-left: 10px;
    }

    /* Top bar elrejtése nagyon kis képernyőkön */
    .top-bar {
        display: none;
    }

    /* Logo még kisebb */
    .navbar-brand h1 {
        font-size: 20px;
    }

    .tagline {
        font-size: 10px;
    }

    /* Keresősáv teljes szélességű */
    .search-container {
        margin: 15px 0;
    }

    .search-input {
        height: 42px;
        font-size: 16px;
    }

    /* Navigation padding csökkentése */
    .main-navigation {
        padding: 10px 0;
    }

    .main-navigation .dropdown .btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    /* Hamburger menü mérete */
    .mobile-menu-container {
        width: 100%;
        max-width: 280px;
    }
}

/* Desktop és mobil nézetek elválasztása */
@media (min-width: 992px) {
    /* Desktop nézetben elrejtjük a mobil elemeket */
    .mobile-menu-toggle,
    .mobile-menu-container,
    .mobile-menu-overlay {
        display: none !important;
    }

    /* Desktop menük megjelenítése */
    .desktop-menu {
        display: block !important;
    }

    .header-icons {
        display: flex !important;
    }

    .tel-block {
        display: block !important;
    }
}

/* Smooth animációk */
.main-navigation .nav,
.main-navigation .dropdown .dropdown-menu,
.header-icons {
    transition: all 0.3s ease;
}

/* Javított érintési területek mobil eszközökön */
@media (max-width: 991.98px) {
    .header-icon,
    .main-navigation .nav-link,
    .main-navigation .dropdown .dropdown-item,
    .mobile-menu-nav-link,
    .user-action {
        min-height: 44px; /* Apple ajánlás az érintési területhez */
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
}
