/* General Body Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
}

/* Container for all contact cards */
.contact-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Individual Contact Card */
.contact-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header Section */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    margin: 0;
    font-size: 1.4em;
    color: #0056b3;
}

.card-header .contact-id {
    font-size: 0.8em;
    color: #777;
    background-color: #f0f0f0;
    padding: 5px 8px;
    border-radius: 4px;
}

.card-header .department-position {
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
}

/* Details Section */
.card-details {
    margin-bottom: 15px;
}

.card-details p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    font-size: 0.95em;
}

.card-details p strong {
    width: 90px; /* Align labels */
    flex-shrink: 0;
    color: #555;
}

.card-details .icon {
    margin-right: 8px;
    color: #007bff;
    font-size: 1.1em;
}

/* Action Buttons Section */
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto; /* Pushes actions to the bottom */
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.card-actions .action-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    text-decoration: none; /* For anchor tags styled as buttons */
    transition: background-color 0.2s ease;
}

.card-actions .action-button:hover {
    background-color: #0056b3;
}

.card-actions .action-button img {
    margin-right: 5px;
    width: 16px; /* Adjust icon size */
    height: 16px;
}

/* Status/Metadata Section */
.card-meta {
    font-size: 0.8em;
    color: #888;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #f0f0f0;
}

.card-meta p {
    margin: 3px 0;
}

/* Specific styles for hidden contacts */
.contact-card.hidden {
    opacity: 0.6;
    background-color: #fff3cd; /* Light yellow for hidden */
}

.contact-card.hidden .card-header h3 {
    color: #856404; /* Darker yellow text */
}

.contact-card.hidden .card-meta {
    color: #a18a4d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-cards-container {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-header .contact-id {
        margin-top: 10px;
    }
}