/* 
 * ZAR Tech Main CSS 
 * Elementor overrides and custom utilities
 */

.bundle-glow:hover {
    box-shadow: 0 0 20px rgba(0, 168, 89, 0.2);
    border-color: rgba(0, 168, 89, 0.4);
}

.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-hover:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Menu Styles */
.main-navigation a {
    font-weight: 500;
    color: var(--on-surface-variant, #3f4a3c);
    text-decoration: none;
    transition: color 0.3s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--primary, #006e11);
    font-weight: 700;
}

/* Modal animation classes */
.hidden {
    display: none !important;
}

.modal-open {
    overflow: hidden;
}

/* AJAX Search Styles */
.search-results-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8fafc;
}

/* 
 * CRITICAL LAYOUT FIX 
 * Prevents WordPress (wpautop) or Elementor Text widgets from injecting 
 * empty paragraph and line break tags that destroy Tailwind CSS Grid and Flexbox layouts.
 */
.grid > p, 
.grid > br,
.flex > br {
    display: none !important;
}
.grid > p:empty,
.flex > p:empty {
    display: none !important;
}

/* Header Responsive Visibility */
.desktop-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 767px) {
    .desktop-menu {
        display: none !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block;
    }
}
