/* ============================================
   WML Grouped Logos
   ============================================ */

.wml-grouped-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    width: 100%;
}

/* Horizontal direction: groups side by side */
.wml-grouped-logos[data-direction="horizontal"] {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

.wml-grouped-logos[data-direction="horizontal"] .wml-logo-group {
    flex: 1 1 0;
    min-width: 250px;
}

/* --- Group Container --- */
.wml-logo-group {
    position: relative;
    width: 100%;
    max-width: 800px;
    background: #fff;
    border: 1px solid #e5e5e5;
    cursor: pointer;
}

/* --- Grid Layout --- */
.wml-logo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 160px;
}

.wml-grid-item {
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    overflow: hidden;
    padding: 20px;
}

/* Remove right border on last column item per row — handled dynamically via JS-free approach */
.wml-grid-item:last-child {
    border-right: none;
}

/* --- Logo Content (Default: Clear) --- */
.wml-logo-content {
    font-size: 20px;
    font-weight: bold;
    color: #111;
    filter: blur(0px);
    opacity: 1;
    transition: filter 0.4s ease, opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wml-logo-content img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

/* --- CTA Button (Default: Hidden) --- */
.wml-cta-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: #1a1a1a;
    color: #fff;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    white-space: nowrap;
}

.wml-cta-btn:hover {
    background-color: #000;
    transform: translate(-50%, -50%) scale(1.03);
}

/* --- Hover Logic --- */
.wml-logo-group:hover .wml-logo-content {
    filter: blur(var(--wml-gl-blur, 12px));
    opacity: 0.25;
}

.wml-logo-group:hover .wml-cta-btn {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   Responsive — Tablet (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {
    .wml-grouped-logos {
        gap: 40px;
    }

    .wml-grouped-logos[data-direction="horizontal"] {
        flex-direction: column;
        align-items: center;
    }

    .wml-grouped-logos[data-direction="horizontal"] .wml-logo-group {
        min-width: 0;
    }

    .wml-logo-content {
        font-size: 22px;
    }

    .wml-cta-btn {
        padding: 12px 24px;
        font-size: 12px;
    }
}

/* ============================================
   Responsive — Mobile (max-width: 480px)
   ============================================ */

@media (max-width: 480px) {
    .wml-grouped-logos {
        gap: 30px;
    }

    .wml-logo-content {
        font-size: 18px;
    }

    .wml-logo-content img {
        max-height: 30px;
    }

    .wml-cta-btn {
        padding: 10px 20px;
        font-size: 11px;
    }

    .wml-grid-item {
        padding: 15px;
    }
}