/* ==========================================================================
   V2 Logo Grid Block
   ========================================================================== */

/* ── 1. Section Base ── */
.v2-lg-section {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.v2-lg-section[style*="background-image"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ── 2. Background Presets ── */
.v2-lg-bg-white       { background-color: #ffffff; }
.v2-lg-bg-light-gray  { background-color: #f8fafc; }
.v2-lg-bg-dark        { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); }

/* ── 3. Text Color Themes ── */
.v2-lg-text-dark .v2-lg-title       { color: var(--primary-color); }
.v2-lg-text-dark .v2-lg-description { color: #475569; }

.v2-lg-text-light .v2-lg-title       { color: #ffffff; }
.v2-lg-text-light .v2-lg-description { color: #cbd5e1; }

/* ── 4. Header ── */
.v2-lg-header {
    text-align: center;
    margin-bottom: 40px;
}

.v2-lg-title {
    font-family: var(--heading-font);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
}

.v2-lg-decor-line {
    display: block;
    width: 35px;
    height: 6px;
    margin: 0 auto 16px;
    border-radius: 6px;
    background-color: #ea580c;
}

.v2-lg-description {
    font-size: 16px;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* ── 5. Logo Grid ── */
.v2-lg-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--lg-grid-gap, 30px);
    align-items: center;
}

/* Column variations */
.v2-lg-cols-4 .v2-lg-grid { grid-template-columns: repeat(4, 1fr); }
.v2-lg-cols-5 .v2-lg-grid { grid-template-columns: repeat(5, 1fr); }
.v2-lg-cols-3 .v2-lg-grid { grid-template-columns: repeat(3, 1fr); }
.v2-lg-cols-6 .v2-lg-grid { grid-template-columns: repeat(6, 1fr); }

/* ── 6. Logo Item ── */
.v2-lg-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #fff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    min-height: 80px;
}

.v2-lg-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.v2-lg-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.v2-lg-item img {
    max-width: var(--lg-logo-max-width, 180px);
    max-height: var(--lg-logo-max-height, 60px);
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ── 7. Grayscale Effect ── */
.v2-lg-grayscale .v2-lg-item img {
    filter: grayscale(100%);
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.v2-lg-grayscale.v2-lg-hover-color .v2-lg-item:hover img {
    filter: grayscale(0%);
}

/* ── 8. Dark Background Adjustments ── */
.v2-lg-bg-dark .v2-lg-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.v2-lg-bg-dark .v2-lg-item:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ── 9. Alignment Overrides ── */
.v2-lg-section.alignfull {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

.v2-lg-section.alignfull .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.v2-lg-section.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ── 10. Responsive ── */

/* Tablet */
@media (max-width: 991px) {
    .v2-lg-title {
        font-size: 28px;
    }

    .v2-lg-section {
        padding: 40px 0;
    }

    .v2-lg-section.alignfull .container {
        padding: 0 20px;
    }

    /* Tablet column overrides via data attributes */
    .v2-lg-section[data-cols-tablet="2"] .v2-lg-grid { grid-template-columns: repeat(2, 1fr); }
    .v2-lg-section[data-cols-tablet="3"] .v2-lg-grid { grid-template-columns: repeat(3, 1fr); }
    .v2-lg-section[data-cols-tablet="4"] .v2-lg-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Mobile */
@media (max-width: 575px) {
    .v2-lg-title {
        font-size: 24px;
    }

    .v2-lg-section {
        padding: 30px 0;
    }

    .v2-lg-header {
        margin-bottom: 24px;
    }

    .v2-lg-item {
        padding: 15px;
        min-height: 80px;
    }

    .v2-lg-item img {
        max-width: 120px;
    }

    /* Mobile column overrides via data attributes */
    .v2-lg-section[data-cols-mobile="1"] .v2-lg-grid { grid-template-columns: 1fr; }
    .v2-lg-section[data-cols-mobile="2"] .v2-lg-grid { grid-template-columns: repeat(2, 1fr); }
    .v2-lg-section[data-cols-mobile="3"] .v2-lg-grid { grid-template-columns: repeat(3, 1fr); }

    /* Show logos in color by default on mobile */
    .v2-lg-grayscale .v2-lg-item img {
        filter: grayscale(0%);
    }
}
