/* =====================================================
   BRANDS.CSS — Wonder Digimech
   Matches index page dark/light alternating theme
   ===================================================== */



/* ---- HERO ---- */
.page-hero.brands-hero {
    /* inherits .page-hero from shared.css */
}

/* ---- FEATURED BRANDS (Light Section) ---- */
.featured-brands.bg-light-section {
    padding: 100px 0;
    background: #edf0f4;
}

.brands-tagline {
    font-size: 1.1rem;
    color: #475569;
    max-width: 520px;
    margin: 10px auto 0;
}

#brandsLoading {
    color: var(--primary-color);
    padding: 60px 0;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
    margin-top: 50px;
}

/* Brand card — light style redesigned */
.brand-card {
    background: #ffffff;
    border: 2px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.brand-img-wrapper {
    height: 160px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
    overflow: hidden;
}

.brand-info {
    padding: 28px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 2px;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.3), rgba(56, 189, 248, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 5;
}

.brand-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.06), transparent);
    transition: left 0.6s ease;
    z-index: 4;
}

.brand-card:hover::before {
    opacity: 1;
}

.brand-card:hover::after {
    left: 150%;
}

.brand-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 50px rgba(13, 148, 136, 0.12);
    border-color: transparent;
}

.brand-card img {
    max-height: 80px;
    max-width: 160px;
    object-fit: contain;
    transition: all 0.4s ease;
}

.brand-card:hover img {
    transform: scale(1.06);
}

.brand-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.brand-card p {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

/* ---- CTA BANNER (Dark) ---- */
/* .cta-banner already styled in shared.css */
.cta-banner.brands-consultation-cta {
    /* inherits .cta-banner from shared.css */
}

/* Utilities */
.mt-4  { margin-top: 1.5rem; }
.relative  { position: relative; }
.z-index-2 { z-index: 2; }
.justify-center { justify-content: center; }

/* Responsive */
@media (max-width: 768px) {
    .brands-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media (max-width: 480px) {
    .brands-grid { grid-template-columns: 1fr; }
    .brand-card { padding: 30px 22px; }
}

/* ---- CLIENTS SECTION ---- */
.our-clients {
    padding: 100px 0;
    background: radial-gradient(circle at 80% 80%, rgba(13, 148, 136, 0.04) 0%, transparent 60%), #050914;
    position: relative;
    z-index: 1;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 50px;
}

.client-card {
    background: rgba(15, 23, 42, 0.45);
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-height: 120px;
}

.client-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.client-card img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(1) brightness(0.8) contrast(1.2);
    transition: all 0.4s ease;
}

.client-card:hover img {
    filter: none;
    transform: scale(1.06);
}

.brand-card {
    cursor: pointer; /* make brands clickable too */
}

/* ---- LIGHTBOX MODAL ---- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    user-select: none;
}

.lightbox-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 85%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.lightbox-content {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #ffffff;
    padding: 20px;
}

.lightbox-caption {
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Lightbox controls */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #94a3b8;
    font-size: 38px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 100000;
}

.lightbox-close:hover {
    color: #ffffff;
    transform: scale(1.1) rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100000;
}

.lightbox-prev { left: 40px; }
.lightbox-next { right: 40px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 0 25px rgba(13, 148, 136, 0.6);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive Lightbox */
@media (max-width: 768px) {
    .lightbox-prev { left: 10px; width: 48px; height: 48px; font-size: 1.2rem; background: rgba(2, 6, 23, 0.6); border: 1px solid rgba(255, 255, 255, 0.3); }
    .lightbox-next { right: 10px; width: 48px; height: 48px; font-size: 1.2rem; background: rgba(2, 6, 23, 0.6); border: 1px solid rgba(255, 255, 255, 0.3); }
    .lightbox-close { top: 20px; right: 20px; font-size: 32px; }
    .clients-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
}
