/* ============================================
   MENU MOBILE SIMPLES - GRUPO ESCF
   Versão: 1.0
   ============================================ */

/* Backdrop */
.escf-mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.escf-mobile-backdrop.escf-active {
    background: rgba(0, 0, 0, 0.7);
    visibility: visible;
}

/* Container do Menu */
.escf-mobile-menu {
    position: fixed;
    right: -100%;
    top: 0;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.escf-mobile-menu.escf-open {
    right: 0;
}

/* Header */
.escf-mobile-header {
    padding: 20px;
    background: linear-gradient(135deg, #015023 0%, #32b74a 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #32b74a;
}

.escf-mobile-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.escf-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.escf-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Área de Navegação */
.escf-mobile-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

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

.escf-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.escf-nav-link {
    display: block;
    padding: 16px 20px;
    color: #333333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.escf-nav-link:hover,
.escf-nav-item.current-menu-item > .escf-nav-link,
.escf-nav-item.current_page_item > .escf-nav-link {
    background: rgba(1, 80, 35, 0.05);
    color: #015023;
    padding-left: 28px;
}

.escf-nav-link:hover::before,
.escf-nav-item.current-menu-item > .escf-nav-link::before,
.escf-nav-item.current_page_item > .escf-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #32b74a;
}

/* Submenu */
.escf-nav-item.escf-has-dropdown > .escf-nav-link {
    padding-right: 50px;
}

.escf-dropdown-toggle {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666666;
    transition: all 0.2s ease;
}

.escf-dropdown-toggle:hover {
    background: rgba(1, 80, 35, 0.05);
}

.escf-dropdown-toggle::before {
    content: '▼';
    font-size: 12px;
    transition: transform 0.2s ease;
    display: inline-block;
}

.escf-nav-item.escf-dropdown-open > .escf-dropdown-toggle::before {
    transform: rotate(180deg);
}

.escf-submenu {
    display: none !important;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #e8f5e9;
    border-left: 3px solid #32b74a;
}

.escf-nav-item.escf-dropdown-open > .escf-submenu {
    display: block !important;
}

/* Garantir que submenus comecem fechados - sobrescrever classes WP */
.escf-nav-item.menu-item-has-children > .escf-submenu,
.escf-nav-item.page_item_has_children > .escf-submenu {
    display: none !important;
}

.escf-submenu-item {
    border-bottom: 1px solid rgba(1, 80, 35, 0.1);
}

.escf-submenu-link {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #2c5f2d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.escf-submenu-link::before {
    content: '→';
    position: absolute;
    left: 20px;
    color: #32b74a;
    font-size: 12px;
    font-weight: bold;
}

.escf-submenu-link:hover,
.escf-submenu-item.current-menu-item > .escf-submenu-link,
.escf-submenu-item.current_page_item > .escf-submenu-link {
    background: #ffffff;
    color: #015023;
    font-weight: 600;
    padding-left: 45px;
}

/* Footer */
.escf-mobile-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 2px solid #e9ecef;
}

.escf-footer-info {
    margin-bottom: 15px;
}

.escf-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.escf-footer-item {
    padding: 8px 0;
    font-size: 13px;
    color: #666666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.escf-footer-item::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #32b74a;
    border-radius: 50%;
}

.escf-footer-link {
    color: inherit;
    text-decoration: none;
}

.escf-footer-link:hover {
    color: #015023;
}

.escf-social-links {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.escf-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 50%;
    color: #015023;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.escf-social-link:hover {
    background: #015023;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Botão Hamburguer */
.escf-hamburger {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.escf-hamburger:hover {
    background: rgba(1, 80, 35, 0.1);
}

.escf-hamburger-line {
    width: 24px;
    height: 2px;
    background: #015023;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.escf-hamburger.escf-active .escf-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.escf-hamburger.escf-active .escf-hamburger-line:nth-child(2) {
    opacity: 0;
}

.escf-hamburger.escf-active .escf-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* Scrollbar */
.escf-mobile-nav::-webkit-scrollbar {
    width: 6px;
}

.escf-mobile-nav::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.escf-mobile-nav::-webkit-scrollbar-thumb {
    background: #32b74a;
    border-radius: 3px;
}

.escf-mobile-nav::-webkit-scrollbar-thumb:hover {
    background: #015023;
}

/* Utilitários */
.escf-no-scroll {
    overflow: hidden;
}

/* Responsividade */
@media (max-width: 480px) {
    .escf-mobile-menu {
        max-width: 90%;
    }
}

/* Acessibilidade */
.escf-nav-link:focus,
.escf-close-btn:focus,
.escf-hamburger:focus,
.escf-dropdown-toggle:focus {
    outline: 2px solid #32b74a;
    outline-offset: 2px;
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .escf-mobile-menu,
    .escf-mobile-backdrop,
    .escf-nav-link,
    .escf-hamburger-line {
        transition: none !important;
    }
}
