/**
 * Social Share Buttons
 * v2.13.0 - Botones Compartir Portfolio
 */

/* ============================================
   SHARE BUTTONS CONTAINER
   ============================================ */

.share-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.share-heading {
    color: #003366;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-heading::before {
    content: "📤";
    font-size: 1.4rem;
}

.share-subtext {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* ============================================
   SHARE BUTTONS GRID
   ============================================ */

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-button:active {
    transform: translateY(0);
}

/* Icon in button */
.share-button .icon {
    font-size: 1.2rem;
}

/* ============================================
   INDIVIDUAL BUTTON STYLES
   ============================================ */

/* WhatsApp - Green */
.share-button--whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.share-button--whatsapp:hover {
    background: linear-gradient(135deg, #20ba5a 0%, #0e7068 100%);
}

/* Facebook - Blue */
.share-button--facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0c63d4 100%);
}

.share-button--facebook:hover {
    background: linear-gradient(135deg, #166fe5 0%, #0a58c2 100%);
}

/* Twitter/X - Black */
.share-button--twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
}

.share-button--twitter:hover {
    background: linear-gradient(135deg, #1a8cd8 0%, #0c7bc4 100%);
}

/* Email - Red */
.share-button--email {
    background: linear-gradient(135deg, #ea4335 0%, #d33426 100%);
}

.share-button--email:hover {
    background: linear-gradient(135deg, #dd3f31 0%, #c62f21 100%);
}

/* Copy Link - Orange (brand color) */
.share-button--copy {
    background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
}

.share-button--copy:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #cc4f23 100%);
}

.share-button--copy.copied {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

/* ============================================
   TOAST NOTIFICATION (copy success)
   ============================================ */

.share-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    animation: slideInUp 0.3s ease, slideOutDown 0.3s ease 2.7s;
    opacity: 0;
}

.share-toast.show {
    opacity: 1;
    animation: slideInUp 0.3s ease;
}

.share-toast .icon {
    font-size: 1.5rem;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .share-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .share-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .share-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .share-buttons {
        grid-template-columns: 1fr;
    }

    .share-container {
        padding: 1.25rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.share-button:focus {
    outline: 3px solid rgba(255, 107, 53, 0.5);
    outline-offset: 2px;
}

/* Ensure good contrast for screen readers */
.share-button[aria-label]:focus::after {
    content: attr(aria-label);
    position: absolute;
    left: -9999px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .share-container {
        display: none;
    }
}
