/**
 * Campus Lane Holdings - Social Buttons Fix
 * Fixes for social media buttons visibility, z-index conflicts, and positioning
 */

/* ============================================
   SOCIAL LINKS STYLING - FOOTER
   ============================================ */

.social-links {
    display: flex;
    gap: var(--spacing-md, 1rem);
    margin-top: var(--spacing-md, 1rem);
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.social-link:hover {
    background-color: var(--primary-color, #2c5f7c);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(44, 95, 124, 0.4);
}

.social-link i {
    transition: transform 0.3s ease;
}

.social-link:hover i {
    transform: scale(1.15);
}

/* ============================================
   Z-INDEX HIERARCHY - COMPLETE CONTROL
   ============================================ */

/* Base layers */
.site-header {
    z-index: 100 !important;
}

.site-footer {
    z-index: 10 !important;
}

/* Overlays */
.nav-overlay {
    z-index: 900 !important;
}

.modal-overlay {
    z-index: 9000 !important;
}

/* FLOATING BUTTONS - Standard positioning */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 1001;
}

/* High priority elements */
.toast-container {
    z-index: 9999 !important;
}

.scroll-indicator {
    z-index: 10000 !important;
}

.skip-to-content:focus {
    z-index: 10001 !important;
}

/* ============================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Stack floating buttons vertically with proper spacing */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .back-to-top {
        bottom: 90px; /* Stack above WhatsApp */
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    /* Add extra spacing if bottom nav exists */
    body.has-bottom-nav .whatsapp-float {
        bottom: 90px;
    }
    
    body.has-bottom-nav .back-to-top {
        bottom: 160px;
    }
}

@media (max-width: 480px) {
    .social-links {
        gap: 0.75rem;
    }
    
    .social-link {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
}

/* ============================================
   WHATSAPP FLOATING BUTTON ENHANCED
   ============================================ */

.whatsapp-float {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.8rem;
    animation: whatsappPulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    color: white;
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* ============================================
   BACK TO TOP BUTTON ENHANCED
   ============================================ */

.back-to-top {
    background: linear-gradient(135deg, var(--primary-color, #2c5f7c), var(--primary-dark, #1e3d52));
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(44, 95, 124, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(44, 95, 124, 0.6);
}

.back-to-top i {
    color: white;
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

.social-link:focus,
.whatsapp-float:focus,
.back-to-top:focus {
    outline: 3px solid var(--primary-color, #2c5f7c);
    outline-offset: 3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .social-link {
        border: 2px solid currentColor;
    }
    
    .whatsapp-float,
    .back-to-top {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .social-link,
    .whatsapp-float,
    .back-to-top {
        transition: none;
        animation: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .social-links,
    .whatsapp-float,
    .back-to-top {
        display: none !important;
    }
}
