/**
 * hub-search.css - Estilos para el buscador del Hub
 * @version 2.0.0 - Diseño mejorado para móviles
 */

/* ============================================ */
/* CAMPO DE BÚSQUEDA PEQUEÑO */
/* ============================================ */

#hub-mini-search {
    position: fixed;
    top: 20px;
    right: 80px;
    z-index: 9998;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.15);
    border: 2.5px solid #3498db;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 8px 8px 8px 20px;
    max-width: 240px;
    min-width: 200px;
    height: 52px;
    gap: 8px;
    user-select: none;
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

#hub-mini-search:hover {
    border-color: #2980b9;
    box-shadow: 0 6px 30px rgba(52, 152, 219, 0.3);
    transform: scale(1.03);
    background: #f8faff;
}

#hub-mini-search:active {
    transform: scale(0.97);
}

#hub-mini-search .mini-search-text {
    color: #2c3e50;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 10px;
}

#hub-mini-search .mini-search-text i {
    color: #3498db;
    font-size: 18px;
}

#hub-mini-search .mini-search-text .placeholder {
    color: #6c757d;
    font-weight: 400;
}

#hub-mini-search .mini-search-shortcut {
    background: #e8f4fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #3498db;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
}

#hub-mini-search:hover .mini-search-shortcut {
    background: #d4e8fc;
    border-color: rgba(52, 152, 219, 0.4);
}

/* ============================================ */
/* OVERLAY DEL BUSCADOR */
/* ============================================ */

.hub-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    overscroll-behavior: contain;
}

.hub-search-overlay.active {
    display: flex;
    opacity: 1;
}

/* ============================================ */
/* MODAL DEL BUSCADOR */
/* ============================================ */

.hub-search-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    max-height: 90dvh;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: auto;
}

.hub-search-overlay.active .hub-search-modal {
    transform: translateY(0) scale(1);
}

/* ============================================ */
/* HEADER DEL BUSCADOR */
/* ============================================ */

.hub-search-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: white;
    border-radius: 20px 20px 0 0;
}

.hub-search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    min-width: 0;
}

.hub-search-icon {
    position: absolute;
    left: 16px;
    color: #adb5bd;
    font-size: 18px;
    pointer-events: none;
}

.hub-search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 18px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    color: #2c3e50;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.hub-search-input:focus {
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.hub-search-input::placeholder {
    color: #adb5bd;
    font-size: 16px;
}

.hub-search-close {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-search-close:hover {
    background: #f1f3f5;
    color: #2c3e50;
}

.hub-search-shortcuts {
    color: #6c757d;
    font-size: 13px;
    white-space: nowrap;
}

.hub-search-shortcuts kbd {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
}

/* ============================================ */
/* ESTADOS DE CARGA Y VACÍO */
/* ============================================ */

.hub-search-loading,
.hub-search-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.hub-search-loading .spinner-border {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
}

.hub-search-empty i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.hub-search-empty p {
    font-size: 18px;
    margin-bottom: 8px;
}

.hub-search-empty #hubSearchQuery {
    font-weight: 600;
    color: #2c3e50;
}

/* ============================================ */
/* RESULTADOS */
/* ============================================ */

.hub-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px 16px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.hub-search-results::-webkit-scrollbar {
    width: 6px;
}

.hub-search-results::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 3px;
}

.hub-search-results::-webkit-scrollbar-thumb {
    background: #c1c7cd;
    border-radius: 3px;
}

.hub-search-results::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* ============================================ */
/* ITEM DE RESULTADO */
/* ============================================ */

.hub-search-result-item {
    display: block;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 4px;
    cursor: pointer;
}

.hub-search-result-item:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
    text-decoration: none;
    color: #2c3e50;
}

.hub-search-result-item:active {
    background: #e9ecef;
}

.hub-search-result-item.active {
    background: #e8f4fd;
    border-color: #3498db;
}

.hub-search-result-content {
    width: 100%;
}

.hub-search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.hub-search-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
    line-height: 1.4;
}

.hub-search-result-category {
    font-size: 12px;
    color: #3498db;
    background: #e8f4fd;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.hub-search-result-category i {
    font-size: 11px;
}

.hub-search-result-snippet {
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hub-search-result-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #6c757d;
    flex-wrap: wrap;
}

.hub-search-result-footer span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hub-search-result-footer i {
    font-size: 12px;
}

.hub-search-result-tags {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

.hub-search-result-tag {
    background: #f1f3f5;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: #495057;
}

/* ============================================ */
/* FOOTER DEL MODAL */
/* ============================================ */

.hub-search-footer {
    padding: 12px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6c757d;
    flex-wrap: wrap;
    gap: 8px;
    background: white;
    border-radius: 0 0 20px 20px;
}

.hub-search-count {
    font-weight: 500;
    color: #2c3e50;
}

.hub-search-info kbd {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.hub-search-error {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

/* ============================================ */
/* RESALTADO DE PALABRAS */
/* ============================================ */

.hub-search-highlight {
    background: rgba(52, 152, 219, 0.15);
    color: #2471a3;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 3px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
    transition: all 0.2s ease;
}

.hub-search-result-item:hover .hub-search-highlight {
    background: rgba(52, 152, 219, 0.25);
    border-bottom-color: #2980b9;
}

.hub-search-result-tag .hub-search-highlight {
    background: rgba(52, 152, 219, 0.2);
    color: #2471a3;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

.hub-search-result-category .hub-search-highlight {
    background: rgba(52, 152, 219, 0.2);
    color: #1a5276;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

/* ============================================ */
/* ANIMACIONES */
/* ============================================ */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ============================================ */
/* RESPONSIVE - MÓVILES */
/* ============================================ */

@media (max-width: 992px) {
    #hub-mini-search {
        top: 16px;
        right: 75px;
        max-width: 200px;
        min-width: 160px;
        height: 46px;
        padding: 6px 6px 6px 16px;
    }
    
    #hub-mini-search .mini-search-text {
        font-size: 13px;
    }
    
    #hub-mini-search .mini-search-text i {
        font-size: 16px;
    }
    
    #hub-mini-search .mini-search-shortcut {
        font-size: 10px;
        padding: 3px 10px;
    }
}

@media (max-width: 768px) {
    /* Mini buscador */
    #hub-mini-search {
        top: 12px;
        right: 70px;
        max-width: 160px;
        min-width: 130px;
        height: 40px;
        padding: 4px 4px 4px 14px;
        border-width: 2px;
        z-index: 9999;
    }
    
    #hub-mini-search .mini-search-text {
        font-size: 12px;
        gap: 6px;
    }
    
    #hub-mini-search .mini-search-text i {
        font-size: 14px;
    }
    
    #hub-mini-search .mini-search-text .placeholder {
        display: none;
    }
    
    #hub-mini-search .mini-search-shortcut {
        font-size: 9px;
        padding: 2px 8px;
    }

    /* Overlay y modal */
    .hub-search-overlay {
        padding: 10px;
    }

    .hub-search-modal {
        max-height: 95vh;
        max-height: 95dvh;
        border-radius: 16px;
    }

    .hub-search-header {
        padding: 12px 16px;
        gap: 10px;
        border-radius: 16px 16px 0 0;
    }

    .hub-search-input {
        font-size: 16px;
        padding: 14px 16px 14px 44px;
        min-height: 48px;
        border-radius: 10px;
    }

    .hub-search-icon {
        left: 14px;
        font-size: 16px;
    }

    .hub-search-close {
        padding: 10px;
        min-width: 40px;
        min-height: 40px;
        font-size: 18px;
        right: 8px;
    }

    .hub-search-shortcuts {
        display: none;
    }

    /* Resultados */
    .hub-search-results {
        padding: 4px 8px 12px;
    }

    .hub-search-result-item {
        padding: 14px 16px;
        border-radius: 10px;
        margin-bottom: 6px;
    }

    .hub-search-result-title {
        font-size: 15px;
        line-height: 1.3;
    }

    .hub-search-result-snippet {
        font-size: 13px;
        -webkit-line-clamp: 3;
        line-height: 1.4;
        margin-bottom: 6px;
    }

    .hub-search-result-category {
        font-size: 11px;
        padding: 3px 10px;
    }

    .hub-search-result-footer {
        font-size: 11px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .hub-search-result-tag {
        font-size: 10px;
        padding: 2px 8px;
    }

    /* Footer */
    .hub-search-footer {
        padding: 10px 16px;
        font-size: 12px;
        border-radius: 0 0 16px 16px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .hub-search-info {
        font-size: 11px;
    }

    .hub-search-info kbd {
        font-size: 10px;
        padding: 1px 6px;
    }

    /* Estados vacío/carga */
    .hub-search-empty p {
        font-size: 16px;
    }
    
    .hub-search-empty i {
        font-size: 40px;
    }
    
    .hub-search-loading .spinner-border {
        width: 32px;
        height: 32px;
    }

    /* Animación en móviles */
    .hub-search-overlay.active .hub-search-modal {
        animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (max-width: 480px) {
    /* Mini buscador */
    #hub-mini-search {
        top: 10px;
        right: 60px;
        max-width: 120px;
        min-width: 90px;
        height: 36px;
        padding: 3px 3px 3px 10px;
        border-width: 2px;
        border-radius: 30px;
        z-index: 9999;
    }
    
    #hub-mini-search .mini-search-text {
        font-size: 11px;
        gap: 4px;
    }
    
    #hub-mini-search .mini-search-text i {
        font-size: 12px;
    }
    
    #hub-mini-search .mini-search-text .placeholder {
        display: none;
    }
    
    #hub-mini-search .mini-search-shortcut {
        display: none;
    }

    /* Overlay y modal */
    .hub-search-overlay {
        padding: 6px;
    }

    .hub-search-modal {
        border-radius: 12px;
        max-height: 98vh;
        max-height: 98dvh;
    }

    .hub-search-header {
        padding: 10px 12px;
        border-radius: 12px 12px 0 0;
        gap: 6px;
    }

    .hub-search-input-wrapper {
        width: 100%;
    }

    .hub-search-input {
        font-size: 15px;
        padding: 12px 12px 12px 38px;
        min-height: 44px;
        border-radius: 8px;
    }

    .hub-search-icon {
        left: 12px;
        font-size: 14px;
    }

    .hub-search-close {
        padding: 8px;
        min-width: 36px;
        min-height: 36px;
        font-size: 16px;
        right: 6px;
    }

    /* Resultados */
    .hub-search-results {
        padding: 4px 6px 10px;
    }

    .hub-search-result-item {
        padding: 12px 14px;
        border-radius: 8px;
        margin-bottom: 4px;
    }

    .hub-search-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 4px;
    }

    .hub-search-result-title {
        font-size: 14px;
        width: 100%;
    }

    .hub-search-result-category {
        font-size: 10px;
        padding: 2px 8px;
        align-self: flex-start;
    }

    .hub-search-result-snippet {
        font-size: 12px;
        -webkit-line-clamp: 3;
        line-height: 1.3;
        margin-bottom: 4px;
    }

    .hub-search-result-footer {
        font-size: 10px;
        gap: 4px;
        flex-wrap: wrap;
    }

    .hub-search-result-footer span {
        gap: 2px;
    }

    .hub-search-result-tag {
        font-size: 9px;
        padding: 1px 6px;
    }

    /* Footer */
    .hub-search-footer {
        padding: 8px 12px;
        font-size: 11px;
        border-radius: 0 0 12px 12px;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .hub-search-count {
        font-size: 12px;
    }

    .hub-search-info {
        font-size: 10px;
    }

    .hub-search-info kbd {
        font-size: 9px;
        padding: 1px 5px;
    }

    /* Estados vacío/carga */
    .hub-search-empty {
        padding: 30px 16px;
    }
    
    .hub-search-empty p {
        font-size: 14px;
    }
    
    .hub-search-empty i {
        font-size: 32px;
    }
    
    .hub-search-empty small {
        font-size: 12px;
    }
    
    .hub-search-loading {
        padding: 30px 16px;
    }
    
    .hub-search-loading .spinner-border {
        width: 28px;
        height: 28px;
    }
    
    .hub-search-loading p {
        font-size: 14px;
    }

    /* Animación en móviles pequeños */
    .hub-search-overlay.active .hub-search-modal {
        animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(20px) scale(0.95);
            opacity: 0;
        }
        to {
            transform: translateY(0) scale(1);
            opacity: 1;
        }
    }
}

/* ============================================ */
/* CUANDO EL TECLADO ESTÁ ABIERTO EN MÓVILES */
/* ============================================ */

@media (max-height: 600px) and (max-width: 768px) {
    .hub-search-modal {
        max-height: 85vh;
        max-height: 85dvh;
    }
    
    .hub-search-header {
        padding: 8px 12px;
    }
    
    .hub-search-input {
        font-size: 14px;
        padding: 10px 12px 10px 36px;
        min-height: 38px;
    }
    
    .hub-search-results {
        padding: 4px 6px 8px;
    }
    
    .hub-search-result-item {
        padding: 10px 12px;
    }
    
    .hub-search-result-title {
        font-size: 13px;
    }
    
    .hub-search-result-snippet {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
}

/* ============================================ */
/* MEJORAS PARA PANTALLAS MUY PEQUEÑAS */
/* ============================================ */

@media (max-width: 360px) {
    #hub-mini-search {
        max-width: 90px;
        min-width: 70px;
        height: 32px;
        padding: 2px 2px 2px 8px;
        right: 50px;
        top: 8px;
    }
    
    #hub-mini-search .mini-search-text {
        font-size: 10px;
        gap: 2px;
    }
    
    #hub-mini-search .mini-search-text i {
        font-size: 10px;
    }
    
    .hub-search-result-title {
        font-size: 13px;
    }
    
    .hub-search-result-snippet {
        font-size: 11px;
    }
    
    .hub-search-result-category {
        font-size: 9px;
        padding: 2px 6px;
    }
}
/* ============================================ */
/* BOTONES PARA COMPARTIR - VERSIÓN MEJORADA */
/* ============================================ */

.hub-share-wrapper {
    margin: 30px 0 20px;
    padding: 28px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 1px solid rgba(52, 152, 219, 0.1);
    position: relative;
    overflow: hidden;
}

/* Decoración de fondo */
.hub-share-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hub-share-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hub-share-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* ============================================ */
/* HEADER CON MENSAJE PERSONALIZADO */
/* ============================================ */

.hub-share-header {
    display: flex;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px dashed rgba(52, 152, 219, 0.2);
}

.hub-share-message {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
}

.hub-share-emoji {
    font-size: 28px;
    line-height: 1.2;
    flex-shrink: 0;
    animation: pulseEmoji 2s ease-in-out infinite;
}

@keyframes pulseEmoji {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.hub-share-message > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hub-share-title {
    font-size: 17px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
}

.hub-share-title .highlight {
    color: #3498db;
}

.hub-share-subtitle {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

.hub-share-subtitle i {
    color: #3498db;
    margin: 0 2px;
}

/* ============================================ */
/* BOTONES DE COMPARTIR */
/* ============================================ */

.hub-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding-top: 4px;
}

.hub-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    min-width: 100px;
    min-height: 48px;
    border-radius: 50px;
    border: none;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hub-share-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.hub-share-btn .hub-share-btn-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Efectos hover mejorados */
.hub-share-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white;
}

.hub-share-btn:hover i {
    transform: scale(1.15) rotate(-5deg);
}

.hub-share-btn:active {
    transform: scale(0.95);
}

/* Efecto de onda */
.hub-share-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.hub-share-btn:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================ */
/* COLORES ESPECÍFICOS POR RED SOCIAL */
/* ============================================ */

.hub-share-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
}

.hub-share-facebook:hover {
    background: linear-gradient(135deg, #0d65d9 0%, #0a4faa 100%);
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.4);
}

.hub-share-twitter {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
}

.hub-share-twitter:hover {
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hub-share-linkedin {
    background: linear-gradient(135deg, #0a66c2 0%, #084a8a 100%);
}

.hub-share-linkedin:hover {
    background: linear-gradient(135deg, #084a8a 0%, #06356a 100%);
    box-shadow: 0 8px 25px rgba(10, 102, 194, 0.4);
}

.hub-share-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #1da851 100%);
}

.hub-share-whatsapp:hover {
    background: linear-gradient(135deg, #1da851 0%, #15833d 100%);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.hub-share-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

.hub-share-telegram:hover {
    background: linear-gradient(135deg, #006699 0%, #004466 100%);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
}

.hub-share-copy {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.hub-share-copy:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
    color: white;
}

.hub-share-copy.copied {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    animation: pop 0.4s ease;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

/* ============================================ */
/* ANIMACIONES */
/* ============================================ */

@keyframes pop {
    0% { transform: scale(1); }
    30% { transform: scale(1.15); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

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

.hub-share-btn {
    animation: fadeInUp 0.5s ease backwards;
}

.hub-share-btn:nth-child(1) { animation-delay: 0.05s; }
.hub-share-btn:nth-child(2) { animation-delay: 0.10s; }
.hub-share-btn:nth-child(3) { animation-delay: 0.15s; }
.hub-share-btn:nth-child(4) { animation-delay: 0.20s; }
.hub-share-btn:nth-child(5) { animation-delay: 0.25s; }
.hub-share-btn:nth-child(6) { animation-delay: 0.30s; }

/* ============================================ */
/* TOOLTIP MEJORADO */
/* ============================================ */

.hub-share-copy-tooltip {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2c3e50;
    color: white;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hub-share-copy-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.hub-share-copy-tooltip i {
    font-size: 20px;
}

.hub-share-copy-tooltip.success i {
    color: #28a745;
}

.hub-share-copy-tooltip.error i {
    color: #dc3545;
}

/* ============================================ */
/* RESPONSIVE MEJORADO */
/* ============================================ */

@media (max-width: 768px) {
    .hub-share-wrapper {
        padding: 20px 16px;
        margin: 20px 0;
        border-radius: 12px;
    }

    .hub-share-message {
        gap: 10px;
    }

    .hub-share-emoji {
        font-size: 24px;
    }

    .hub-share-title {
        font-size: 15px;
    }

    .hub-share-subtitle {
        font-size: 13px;
    }

    .hub-share-buttons {
        justify-content: center;
        gap: 8px;
    }

    .hub-share-btn {
        padding: 10px 16px;
        min-width: 80px;
        min-height: 44px;
        font-size: 14px;
        gap: 8px;
        flex: 1 1 auto;
        max-width: 140px;
    }

    .hub-share-btn i {
        font-size: 16px;
    }

    .hub-share-btn .hub-share-btn-label {
        font-size: 12px;
    }

    .hub-share-copy-tooltip {
        font-size: 13px;
        padding: 10px 18px;
        bottom: 20px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .hub-share-wrapper {
        padding: 16px 12px;
        margin: 15px 0;
        border-radius: 10px;
    }

    .hub-share-header {
        padding-bottom: 8px;
    }

    .hub-share-message {
        gap: 8px;
        flex-direction: row;
    }

    .hub-share-emoji {
        font-size: 20px;
    }

    .hub-share-title {
        font-size: 14px;
    }

    .hub-share-subtitle {
        font-size: 12px;
    }

    .hub-share-buttons {
        gap: 6px;
    }

    .hub-share-btn {
        padding: 8px 12px;
        min-width: 60px;
        min-height: 38px;
        font-size: 12px;
        gap: 5px;
        border-radius: 30px;
        flex: 1 1 auto;
        max-width: 100px;
    }

    .hub-share-btn i {
        font-size: 14px;
    }

    .hub-share-btn .hub-share-btn-label {
        font-size: 10px;
    }

    .hub-share-copy-tooltip {
        font-size: 12px;
        padding: 8px 14px;
        bottom: 15px;
        border-radius: 8px;
        gap: 8px;
    }

    /* Móviles muy pequeños: solo iconos */
    @media (max-width: 380px) {
        .hub-share-btn {
            min-width: 44px;
            max-width: 44px;
            padding: 0;
            width: 44px;
            height: 44px;
            border-radius: 50%;
        }
        
        .hub-share-btn .hub-share-btn-label {
            display: none;
        }
    }
}

/* ============================================ */
/* MODO OSCURO */
/* ============================================ */

@media (prefers-color-scheme: dark) {
    .hub-share-wrapper {
        background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
        border-color: rgba(52, 152, 219, 0.2);
    }

    .hub-share-title {
        color: #ecf0f1;
    }

    .hub-share-subtitle {
        color: #b0b8c1;
    }

    .hub-share-wrapper::before,
    .hub-share-wrapper::after {
        opacity: 0.3;
    }
}