/**
 * Social Grid Component
 */

.social-grid {
    padding: var(--spacing-md) 0;
}

.social-grid .banner-heading {
    margin-bottom: 10px;
}

/* ========================================
   DESKTOP GRID (>992px)
   ======================================== */

.social-grid__wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 297px;
    gap: 0.5px;
}

.social-grid__item {
    position: relative;
    overflow: hidden;
    border: 5px solid var(--color-primary);
    background-color: var(--color-primary);
}

.social-grid__item--tall {
    grid-row: span 2;
}

.social-grid__image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.social-grid__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.social-grid__link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.social-grid__hover-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 60px;
    background: var(--color-white);
    border-radius: 0;
    padding: 28px;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
    z-index: 3;
    pointer-events: none;
}

.social-grid__link:hover .social-grid__hover-overlay {
    opacity: 1;
    transform: scale(1);
}

.social-grid__hover-category {
    color: var(--color-red);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.social-grid__hover-title {
    color: var(--color-dark-gray);
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin-bottom: 8px !important;
    text-transform: none !important;
}

.social-grid__hover-excerpt {
    color: var(--color-dark-gray);
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.7;
}

.social-grid__hover-arrow {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    background: var(--color-red);
    border-radius: 16px 16px 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 4;
}

.social-grid__link:hover .social-grid__hover-arrow {
    opacity: 1;
    transform: scale(1);
}

.social-grid__hover-arrow:hover {
    border-radius: 16px;
}

.social-grid__hover-arrow svg {
    width: 16px;
    height: 16px;
}

.social-grid__item--news .social-grid__hover-arrow svg path {
    stroke: var(--color-white);
    fill: none;
}

.social-grid__item--linkedin .social-grid__hover-arrow svg path {
    fill: var(--color-white);
    stroke: none;
}

/* Hide mobile content on desktop */
.social-grid__mobile-content {
    display: none;
}

/* Hide navigation on desktop */
.social-grid__navigation {
    display: none;
}

/* ========================================
   MOBILE CAROUSEL (<992px)
   ======================================== */

@media screen and (max-width: 992px) {
    .social-grid__wrapper {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 24px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 21px;
    }
    
    .social-grid__wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .social-grid__item {
        flex: 0 0 305px;
        height: auto;
        scroll-snap-align: start;
        border: none;
        background: transparent;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .social-grid__link {
        position: static;
        height: auto;
        pointer-events: none;
    }
    
    .social-grid__image {
        height: 219px;
        width: 305px;
        flex-shrink: 0;
    }
    
    .social-grid__hover-overlay,
    .social-grid__hover-arrow {
        display: none;
    }
    
    .social-grid__mobile-content {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
    
    .social-grid__mobile-content .btn {
        align-self: flex-start;
    }
    
    .social-grid__mobile-meta {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .social-grid__mobile-category {
        color: #BFCEDE;
        font-size: 16px;
        font-weight: 500;
        line-height: 24px;
    }
    
    .social-grid__mobile-title {
        color: var(--color-white) !important;
        font-size: 20px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        text-transform: none !important;
    }
    
    /* Show navigation on mobile */
    .social-grid__navigation {
        display: flex;
        justify-content: flex-end;
        margin-top: 24px;
        padding: 0 21px;
    }
    
    .social-grid__nav-prev,
    .social-grid__nav-next {
        background: transparent;
        border: none;
        padding: 0;
        margin: 0;
        cursor: pointer;
        transition: 0.2s ease-in-out;
    }
    
    .social-grid__nav-prev:hover,
    .social-grid__nav-next:hover {
        transform: scale(1.1);
    }
    
    .social-grid__nav-next {
        margin-left: 20px;
    }
    
    .social-grid__nav-prev img,
    .social-grid__nav-next img {
        width: 36px;
        height: 36px;
        display: block;
    }
}

/* Small screens - show peek of next card */
@media screen and (max-width: 367px) {
    .social-grid__wrapper {
        padding: 0 16px;
    }
    
    .social-grid__item {
        flex: 0 0 calc(100vw - 80px);
    }
    
    .social-grid__image {
        width: 100%;
    }
    
    .social-grid__navigation {
        padding: 0 16px;
    }
}


@media(max-width:992px){
    .social-grid__mobile-category{
        margin-bottom:0px;
    }
}