/* ========== COMMUNITY HELPERS SPECIFIC STYLES ========== */

.helpers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.grid-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.grid-section h3 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

/* ========== HELPERS CONTAINER ========== */
.helpers-container, .workplaces-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    min-height: 500px;
    max-width: 100%;
}

.helper-card, .workplace-card {
    background: white;
    border: 3px solid #667eea;
    border-radius: 12px;
    padding: 4px;
    text-align: center;
    cursor: grab;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 35px;
    width: 100px;
}

.helper-card:hover, .workplace-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.helper-card.dragging, .workplace-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.helper-image, .workplace-image {
    width: 100%;
    height: 45px;
    object-fit: contain;
    margin-bottom: 4px;
    border-radius: 8px;
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.helper-name, .workplace-name {
    font-weight: 600;
    color: #333;
    font-size: 0.75em;
    word-break: break-word;
    line-height: 1.2;
}

/* ========== WORKPLACE CONTAINER ========== */
.workplace-card {
    border-color: #28a745;
}

.workplace-card:hover {
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
}

/* ========== MATCHED STATE ========== */
.helper-card.matched, .workplace-card.matched {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    color: white;
    opacity: 0.7;
}

.helper-card.matched .helper-name, .workplace-card.matched .workplace-name {
    color: white;
}

.matched-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ffc107;
    color: #333;
    padding: 5px 10px;
    border-radius: 0 10px 0 10px;
    font-size: 0.8em;
    font-weight: bold;
}

/* ========== DROP ZONES ========== */
.drop-zone {
    min-height: 150px;
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.3s ease;
    font-weight: 600;
}

.drop-zone.drag-over {
    background: rgba(102, 126, 234, 0.2);
    border-color: #764ba2;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.drop-zone.matched {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    color: #28a745;
}

/* ========== ANIMATIONS ========== */
@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.helper-card, .workplace-card {
    animation: slideIn 0.5s ease;
}

@keyframes correctMatch {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.correct-match {
    animation: correctMatch 0.6s ease;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .helpers-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .helpers-container, .workplaces-container {
        grid-template-columns: repeat(4, 1fr);
        min-height: 400px;
        gap: 12px;
    }

    .grid-section {
        padding: 20px;
    }

    .helper-card, .workplace-card {
        padding: 12px;
        min-height: 170px;
    }

    .helper-image, .workplace-image {
        height: 120px;
        font-size: 4em;
    }

    .control-buttons .btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .helpers-grid {
        gap: 15px;
    }

    .grid-section {
        padding: 15px;
    }

    .grid-section h3 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    .helpers-container, .workplaces-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        min-height: 250px;
    }

    .helper-card, .workplace-card {
        padding: 10px;
        border-width: 2px;
        min-height: 150px;
    }

    .helper-image, .workplace-image {
        height: 100px;
        font-size: 3em;
    }

    .helper-name, .workplace-name {
        font-size: 0.85em;
    }

    .control-buttons {
        gap: 10px;
    }

    .control-buttons .btn {
        font-size: 0.9em;
        padding: 10px 15px;
        min-width: 100px;
    }
}
