/* =========================================================
   BELAIR HILL JUNIOR SCHOOL
   SOCIAL COMPONENT CSS

   File:
   css/social.css

   Contains:
   - Floating social media icons
   - Social hover labels
   - Social gallery
   - Responsive behavior

   Platforms:
   - Instagram
   - Facebook
   - YouTube
   - X
   - LinkedIn
   - WhatsApp
========================================================= */


/* =========================================================
   FLOATING SOCIAL MEDIA
========================================================= */

.floating-social {
    position: fixed;

    top: 50%;
    right: 16px;

    transform: translateY(-50%);

    z-index: 99999;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 15px;

    width: auto;
    height: auto;

    padding: 0;
    margin: 0;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    overflow: visible;
}


/* =========================================================
   INDIVIDUAL SOCIAL LINK
========================================================= */

.floating-social-link {
    position: relative;

    width: 42px;
    height: 42px;

    min-width: 42px;
    min-height: 42px;

    flex: 0 0 42px;

    display: flex !important;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    background: transparent;
    border: 0;
    border-radius: 50%;

    color: var(--dark);

    text-decoration: none;

    visibility: visible !important;
    opacity: 1 !important;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        color 0.25s ease;
}


/* =========================================================
   ICON
========================================================= */

.floating-social-icon {
    width: 38px;
    height: 38px;

    min-width: 38px;
    min-height: 38px;

    display: flex !important;
    align-items: center;
    justify-content: center;

    visibility: visible !important;
    opacity: 1 !important;

    flex: 0 0 38px;

    background: transparent;
    border: 0;
    border-radius: 50%;

    filter:
        drop-shadow(
            0 0 4px
            rgba(255, 255, 255, 0.95)
        )
        drop-shadow(
            0 4px 8px
            rgba(36, 50, 56, 0.18)
        );

    transition:
        transform 0.25s ease,
        filter 0.25s ease;
}


.floating-social-icon svg {
    width: 24px;
    height: 24px;

    min-width: 24px;
    min-height: 24px;

    display: block !important;

    visibility: visible !important;
    opacity: 1 !important;

    overflow: visible;

    flex: 0 0 auto;
}


/* =========================================================
   SOCIAL BRAND COLORS
========================================================= */

.floating-social-link.instagram {
    color: #b24e69;
}

.floating-social-link.facebook {
    color: #315da8;
}

.floating-social-link.youtube {
    color: #c43d32;
}

.floating-social-link.x {
    color: #202124;
}

.floating-social-link.linkedin {
    color: #1769a8;

    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.floating-social-link.whatsapp {
    color: #23864d;

    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* =========================================================
   EXTRA PROTECTION FOR LINKEDIN + WHATSAPP
========================================================= */

.floating-social > .linkedin,
.floating-social > .whatsapp {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    width: 42px !important;
    height: 42px !important;

    min-width: 42px !important;
    min-height: 42px !important;

    flex: 0 0 42px !important;
}

.floating-social > .linkedin .floating-social-icon,
.floating-social > .whatsapp .floating-social-icon {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.floating-social > .linkedin svg,
.floating-social > .whatsapp svg {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* =========================================================
   HOVER
========================================================= */

.floating-social-link:hover {
    transform:
        translateX(-5px)
        scale(1.08);
}


.floating-social-link:hover
.floating-social-icon {
    transform: scale(1.08);

    filter:
        drop-shadow(
            0 0 5px
            rgba(255, 255, 255, 1)
        )
        drop-shadow(
            0 5px 12px
            rgba(36, 50, 56, 0.24)
        );
}


/* =========================================================
   HOVER BRAND COLORS
========================================================= */

.floating-social-link.instagram:hover {
    color: #963d57;
}

.floating-social-link.facebook:hover {
    color: #244d91;
}

.floating-social-link.youtube:hover {
    color: #a92f26;
}

.floating-social-link.x:hover {
    color: #000000;
}

.floating-social-link.linkedin:hover {
    color: #105783;
}

.floating-social-link.whatsapp:hover {
    color: #176c3d;
}


/* =========================================================
   HOVER LABEL
========================================================= */

.floating-social-label {
    position: absolute;

    right: calc(100% + 14px);
    top: 50%;

    transform:
        translateY(-50%)
        translateX(8px);

    opacity: 0;
    visibility: hidden;

    white-space: nowrap;

    padding: 7px 11px;

    border-radius: 7px;

    background: rgba(36, 50, 56, 0.94);
    color: #ffffff;

    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;

    letter-spacing: 0.01em;

    box-shadow:
        0 8px 24px
        rgba(36, 50, 56, 0.18);

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}


.floating-social-link:hover
.floating-social-label {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(-50%)
        translateX(0);
}


/* =========================================================
   KEYBOARD FOCUS
========================================================= */

.floating-social-link:focus-visible {
    outline: 3px solid rgba(7, 151, 166, 0.35);
    outline-offset: 4px;
}


/* =========================================================
   DISABLED / EMPTY SOCIAL LINK
========================================================= */

.floating-social-link[aria-disabled="true"] {
    cursor: default;

    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* =========================================================
   SOCIAL GALLERY
========================================================= */

.social {
    position: relative;

    overflow: hidden;
}


.social-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 40px;

    margin-bottom: 38px;
}


.social-heading > div {
    flex: 1;
}


.social-heading p {
    max-width: 520px;

    margin: 0;

    line-height: 1.75;
}


/* =========================================================
   SOCIAL GALLERY GRID
========================================================= */

.social-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 16px;
}


/* =========================================================
   SOCIAL GALLERY ITEM
========================================================= */

.social-item {
    position: relative;

    display: block;

    overflow: hidden;

    border-radius: 18px;

    background: #eeeeee;

    text-decoration: none;
}


.social-item img {
    display: block;

    width: 100%;
    height: 260px;

    object-fit: cover;

    transition:
        transform 0.45s ease;
}


.social-item:hover img {
    transform: scale(1.05);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .social-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 760px) {

    /* -----------------------------------------
       Floating social icons
    ----------------------------------------- */

    .floating-social {
        right: 9px;

        gap: 11px;
    }


    .floating-social-link {
        width: 38px;
        height: 38px;

        min-width: 38px;
        min-height: 38px;

        flex: 0 0 38px !important;
    }


    .floating-social-icon {
        width: 34px;
        height: 34px;

        min-width: 34px;
        min-height: 34px;

        flex: 0 0 34px !important;

        filter:
            drop-shadow(
                0 0 4px
                rgba(255, 255, 255, 0.95)
            )
            drop-shadow(
                0 3px 7px
                rgba(36, 50, 56, 0.18)
            );
    }


    .floating-social-icon svg {
        width: 22px;
        height: 22px;

        min-width: 22px;
        min-height: 22px;
    }


    /* -----------------------------------------
       LinkedIn + WhatsApp
    ----------------------------------------- */

    .floating-social > .linkedin,
    .floating-social > .whatsapp {
        width: 38px !important;
        height: 38px !important;

        min-width: 38px !important;
        min-height: 38px !important;

        flex: 0 0 38px !important;
    }


    /* -----------------------------------------
       Labels hidden on mobile
    ----------------------------------------- */

    .floating-social-label {
        display: none;
    }


    .floating-social-link:hover {
        transform:
            translateX(-3px)
            scale(1.08);
    }


    /* -----------------------------------------
       Social heading
    ----------------------------------------- */

    .social-heading {
        align-items: flex-start;

        flex-direction: column;

        gap: 18px;

        margin-bottom: 28px;
    }


    /* -----------------------------------------
       Gallery
    ----------------------------------------- */

    .social-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }


    .social-item {
        border-radius: 14px;
    }


    .social-item img {
        height: 220px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .floating-social {
        right: 6px;

        gap: 9px;
    }


    .floating-social-link {
        width: 34px;
        height: 34px;

        min-width: 34px;
        min-height: 34px;

        flex: 0 0 34px !important;
    }


    .floating-social-icon {
        width: 30px;
        height: 30px;

        min-width: 30px;
        min-height: 30px;

        flex: 0 0 30px !important;

        filter:
            drop-shadow(
                0 0 3px
                rgba(255, 255, 255, 0.95)
            )
            drop-shadow(
                0 3px 6px
                rgba(36, 50, 56, 0.18)
            );
    }


    .floating-social-icon svg {
        width: 20px;
        height: 20px;

        min-width: 20px;
        min-height: 20px;
    }


    .floating-social > .linkedin,
    .floating-social > .whatsapp {
        width: 34px !important;
        height: 34px !important;

        min-width: 34px !important;
        min-height: 34px !important;

        flex: 0 0 34px !important;
    }


    .social-grid {
        grid-template-columns: 1fr;
    }


    .social-item img {
        height: 240px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .floating-social-link,
    .floating-social-icon,
    .floating-social-label,
    .social-item img {
        transition: none;
    }

}