/* Masonry Layout Specific Styles */
.masonry-container {
    column-count: 4;
    column-gap: 20px;
    padding: 20px 0;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.masonry-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.masonry-item:hover .pin-overlay {
    opacity: 1;
}

.pin-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px 16px 0 0;
}

.pin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.pin-overlay-actions {
    display: flex;
    gap: 12px;
}

.overlay-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.overlay-btn:hover {
    background: #e60023;
    color: #fff;
    transform: scale(1.1);
}

.pin-content {
    padding: 16px;
}

.pin-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pin-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pin-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pin-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pin-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
}

.pin-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pin-author-name {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.pin-category {
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.pin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pin-stats {
    display: flex;
    gap: 16px;
}

.pin-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 14px;
}

.pin-stat i {
    font-size: 16px;
}

.pin-actions-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    background: #f0f0f0;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.action-btn:hover {
    background: #e60023;
    color: #fff;
    transform: translateY(-1px);
}

.action-btn.liked {
    background: #e60023;
    color: #fff;
}

.action-btn.saved {
    background: #e60023;
    color: #fff;
}

.action-btn i {
    font-size: 16px;
}

/* Board Card Styles */
.board-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.board-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.board-cover {
    height: 120px;
    background: linear-gradient(45deg, #e60023, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.board-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.board-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.board-card:hover .board-cover-overlay {
    opacity: 1;
}

.board-info {
    padding: 16px;
}

.board-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
}

.board-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.board-pin-count {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.board-pin-count i {
    font-size: 16px;
}

.board-actions {
    display: flex;
    gap: 8px;
}

.board-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 16px;
    background: #f0f0f0;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 500;
}

.board-action-btn:hover {
    background: #e60023;
    color: #fff;
}

/* Responsive Masonry */
@media (max-width: 1200px) {
    .masonry-container {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .masonry-container {
        column-count: 2;
        column-gap: 16px;
    }
    
    .masonry-item {
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .masonry-container {
        column-count: 1;
        column-gap: 0;
    }
    
    .masonry-item {
        margin-bottom: 12px;
    }
}

/* Loading States */
.masonry-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.masonry-loading i {
    font-size: 24px;
    margin-bottom: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Empty State */
.masonry-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.masonry-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.masonry-empty h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #333;
}

.masonry-empty p {
    font-size: 16px;
    margin-bottom: 24px;
}

/* Pin Grid for Profile */
.profile-pins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.profile-pin-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-pin-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.profile-pin-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.profile-pin-info {
    padding: 12px;
}

.profile-pin-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-pin-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
