/* STEM Social Icons Widget Styles */

.stem-social-icons {
    display: grid;
    gap: 12px;
    margin: 20px 0;
    align-items: center;
    justify-content: center;
}

/* Grid Column Layouts */
.stem-social-icons.stem-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.stem-social-icons.stem-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stem-social-icons.stem-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stem-social-icons.stem-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.stem-social-icons.stem-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Social Icon Base Styles */
.stem-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stem-social-icon i {
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.stem-social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--social-color, #667eea);
    transform: scale(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.stem-social-icon:hover::before {
    transform: scale(1);
}

.stem-social-icon:hover {
    color: white;
    border-color: var(--social-color, #667eea);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Icon Sizes */
.stem-size-small .stem-social-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.stem-size-medium .stem-social-icon {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.stem-size-large .stem-social-icon {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

.stem-size-extra-large .stem-social-icon {
    width: 80px;
    height: 80px;
    font-size: 30px;
}

/* Icon Styles */

/* Rounded Style */
.stem-style-rounded .stem-social-icon {
    border-radius: 12px;
}

/* Square Style */
.stem-style-square .stem-social-icon {
    border-radius: 0;
}

/* Circle Style */
.stem-style-circle .stem-social-icon {
    border-radius: 50%;
}

/* Minimal Style */
.stem-style-minimal .stem-social-icon {
    background: transparent;
    border: none;
    color: var(--social-color, #6c757d);
}

.stem-style-minimal .stem-social-icon::before {
    display: none;
}

.stem-style-minimal .stem-social-icon:hover {
    background: transparent;
    color: var(--social-color, #667eea);
    transform: translateY(-2px);
    box-shadow: none;
}

/* Platform-specific colors using CSS custom properties */
.stem-icon-facebook {
    --social-color: #1877f2;
}

.stem-icon-instagram {
    --social-color: #e4405f;
}

.stem-icon-twitter {
    --social-color: #1da1f2;
}

.stem-icon-youtube {
    --social-color: #ff0000;
}

.stem-icon-linkedin {
    --social-color: #0077b5;
}

.stem-icon-pinterest {
    --social-color: #bd081c;
}

.stem-icon-tiktok {
    --social-color: #000000;
}

.stem-icon-snapchat {
    --social-color: #fffc00;
    color: #000000;
}

.stem-icon-snapchat:hover {
    color: #000000;
}

.stem-icon-telegram {
    --social-color: #0088cc;
}

.stem-icon-whatsapp {
    --social-color: #25d366;
}

.stem-icon-email {
    --social-color: #34495e;
}

.stem-icon-website {
    --social-color: #667eea;
}

/* Special handling for Snapchat yellow background */
.stem-icon-snapchat::before {
    background: #fffc00;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Widget title styling if needed */
.widget .widget-title {
    margin-bottom: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stem-social-icons {
        gap: 10px;
    }
    
    /* Reduce columns on mobile for better spacing */
    .stem-social-icons.stem-columns-5,
    .stem-social-icons.stem-columns-6 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Smaller icons on mobile */
    .stem-size-large .stem-social-icon {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
    
    .stem-size-extra-large .stem-social-icon {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .stem-social-icons {
        gap: 8px;
    }
    
    /* Further reduce columns on small mobile */
    .stem-social-icons.stem-columns-4,
    .stem-social-icons.stem-columns-5,
    .stem-social-icons.stem-columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Even smaller icons on small mobile */
    .stem-size-medium .stem-social-icon {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    .stem-size-large .stem-social-icon {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
    
    .stem-size-extra-large .stem-social-icon {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
}

/* Animation */
@keyframes socialIconPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.stem-social-icon {
    animation: socialIconPop 0.6s ease-out;
}

/* Staggered animation delays */
.stem-social-icon:nth-child(1) { animation-delay: 0.1s; }
.stem-social-icon:nth-child(2) { animation-delay: 0.2s; }
.stem-social-icon:nth-child(3) { animation-delay: 0.3s; }
.stem-social-icon:nth-child(4) { animation-delay: 0.4s; }
.stem-social-icon:nth-child(5) { animation-delay: 0.5s; }
.stem-social-icon:nth-child(6) { animation-delay: 0.6s; }
.stem-social-icon:nth-child(7) { animation-delay: 0.7s; }
.stem-social-icon:nth-child(8) { animation-delay: 0.8s; }
.stem-social-icon:nth-child(9) { animation-delay: 0.9s; }
.stem-social-icon:nth-child(10) { animation-delay: 1.0s; }
.stem-social-icon:nth-child(11) { animation-delay: 1.1s; }
.stem-social-icon:nth-child(12) { animation-delay: 1.2s; }

/* Focus styles for accessibility */
.stem-social-icon:focus {
    outline: 3px solid rgba(102, 126, 234, 0.3);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .stem-social-icon {
        background: #2d3748;
        color: #a0aec0;
    }
    
    .widget .widget-title {
        color: #f7fafc;
    }
}

/* Alternative gradient hover effect for special icons */
.stem-icon-instagram::before {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stem-social-icon {
        border-width: 3px;
    }
    
    .stem-social-icon:hover {
        border-width: 3px;
    }
}