/* ============================================================
   Brands Section — brands.css
   Location: assets/src/css/brands.css
   ============================================================ */

/* ---------- Section wrapper ---------- */
.brands-section {
    padding: 64px 0 72px;
    background: #f7f9fc;           /* very light blue-grey — distinct from white sections */
}

/* ---------- Heading reuses .blue-title (already defined in main.css) ---------- */
.brands-section__title {
    text-align: center;
    margin-bottom: 12px;
}

/* ---------- Subtitle ---------- */
.brands-section__subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: #555;
    margin: 0 auto 40px;
    max-width: 560px;
    line-height: 1.5;
}

/* ---------- Brand grid ---------- */
.brands-section__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------- Individual brand card (reuses .border-radius-block) ---------- */
.brands-section__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 10px;
    background: #fff;
    min-height: 90px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.brands-section__item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

/* ---------- Logo image ---------- */
.brands-section__logo {
    display: block;
    max-width: 150px;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    /* hide broken placeholder until real image loads */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* JS lazy-loader typically adds .loaded or swaps src;
   show image once data-src has been applied */
.brands-section__logo[src$="placeholder.svg"] { opacity: 0; }
.brands-section__logo:not([src$="placeholder.svg"]) { opacity: 1; }

/* ---------- Brand name text ---------- */
.brands-section__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a2a3a;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

/* ---------- Responsive ---------- */

/* Tablet: 2 columns → 5 looks cramped */
@media (max-width: 900px) {
    .brands-section__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile landscape */
@media (max-width: 600px) {
    .brands-section {
        padding: 48px 0 56px;
    }

    .brands-section__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .brands-section__item {
        padding: 18px 12px;
        min-height: 76px;
    }

    .brands-section__subtitle {
        font-size: 0.97rem;
        margin-bottom: 28px;
    }
}
