/* ==========================================================================
   WhatsApp Floating Widget
   ========================================================================== */
.wa-widget-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.wa-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
}

.wa-widget-btn i {
    color: white;
    font-size: 2rem;
}

.wa-widget-btn .wa-pulse {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: var(--accent-primary, #FF0066);
    border-radius: 50%;
    border: 2px solid var(--bg-primary, #0a0a0f);
    animation: wa-pulse-anim 2s infinite;
}

@keyframes wa-pulse-anim {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Widget Popup */
.wa-widget-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;
    width: 320px;
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wa-widget-popup.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.wa-popup-header {
    background: linear-gradient(135deg, #25D366, #1aa54f);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-popup-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.wa-popup-header-info h4 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.wa-popup-header-info span {
    color: rgba(255,255,255,0.9);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wa-online-dot {
    width: 8px;
    height: 8px;
    background: #a8ff78;
    border-radius: 50%;
    display: inline-block;
    animation: wa-pulse-anim 2s infinite;
}

.wa-popup-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.wa-popup-close:hover {
    color: white;
}

.wa-popup-body {
    padding: 20px;
}

.wa-popup-body p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.wa-form-group {
    margin-bottom: 12px;
}

.wa-form-group label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wa-form-group input,
.wa-form-group select {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 1.1rem; /* Further increased for visibility */
    font-weight: 600;   /* Bolder text */
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.wa-form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
}

.wa-form-group input:focus,
.wa-form-group select:focus {
    border-color: #25D366;
    background: var(--bg-secondary);
}

.wa-form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px;
}

.wa-start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
}

.wa-start-btn:hover {
    background: #1aa54f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.wa-powered-by {
    text-align: center;
    margin-top: 15px;
    font-size: 0.6rem; /* Smaller as requested */
    color: rgba(0,0,0,0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.wa-powered-by a {
    color: rgba(0,0,0,0.5);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.wa-powered-by a:hover {
    color: #25D366;
}

/* ==========================================================================
   Mega Menu Core (Desktop)
   ========================================================================== */
.mega-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    padding: 80px 0 0;
    transform: translateY(-10px);
    max-height: 0;
    overflow: hidden;
}

.mega-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
    max-height: 100vh;
}

.mega-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 5% 50px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.mega-menu-clients .mega-menu-inner {
    grid-template-columns: 1fr 1fr;
}

.mega-menu-products .mega-menu-inner {
    grid-template-columns: repeat(3, 1fr);
}

.mega-col h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-primary, #FF0066);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.mega-service-link {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 15px 0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.mega-service-link:last-child {
    border-bottom: none;
}

.mega-service-link .mega-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 102, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary, #FF0066);
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.mega-service-link:hover .mega-icon {
    background: var(--accent-primary, #FF0066);
    color: white;
    transform: scale(1.1);
}

.mega-service-link .mega-text strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.mega-service-link:hover .mega-text strong {
    color: var(--accent-primary, #FF0066);
}

.mega-service-link .mega-text span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}

.mega-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mega-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mega-mobile-header {
    display: none;
}

/* ==========================================================================
   Mobile Optimized Mega Menu (Grid Layout)
   ========================================================================== */
@media (max-width: 768px) {
    .mega-menu {
        position: fixed;
        top: 0;
        left: 100%;
        width: 100%;
        height: 100%;
        background: var(--bg-secondary);
        z-index: 10001;
        padding: 0 !important; /* Force zero padding */
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: none;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mega-menu.open {
        left: 0;
    }

    .mega-mobile-header {
        display: flex;
        align-items: center;
        padding: 20px 20px 15px; /* Increased top padding for notch */
        padding-top: max(20px, env(safe-area-inset-top));
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 100;
        gap: 15px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    }

    .mega-mobile-header span {
        font-weight: 700;
        font-size: 1.1rem;
        color: var(--text-primary);
    }

    .mega-mobile-close {
        background: var(--accent-primary, #FF0066);
        border: none;
        color: white;
        padding: 8px 16px;
        border-radius: 50px;
        font-size: 0.85rem;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 10px rgba(255, 0, 102, 0.3);
        flex-shrink: 0;
    }

    .mega-menu-inner {
        padding: 10px 20px 100px;
        display: flex;
        flex-direction: column;
        gap: 25px;
        max-width: none;
        height: auto;
    }

    /* Single column stack for categories */
    .mega-col {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 100%;
    }

    .mega-col h4 {
        font-size: 0.85rem;
        margin-bottom: 5px;
        padding-bottom: 8px;
        color: var(--accent-primary, #FF0066);
        opacity: 0.9;
        border-bottom: 1px solid var(--border-color);
    }

    .mega-service-link {
        flex-direction: row; /* Icon and text side-by-side */
        align-items: center;
        text-align: left;
        padding: 12px 15px;
        gap: 15px;
        background: rgba(0,0,0,0.02);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        width: 100%;
    }

    .mega-service-link .mega-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 1rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .mega-service-link .mega-text strong {
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1.2;
        margin-bottom: 0;
    }

    /* Minimalist: Keep descriptions hidden */
    .mega-service-link .mega-text span {
        display: none;
    }

    .mega-overlay {
        display: none !important;
    }
}
